Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible corrupted bit default value #17642

Closed
zanmato1984 opened this issue Jun 3, 2020 · 3 comments · Fixed by #18036
Closed

Possible corrupted bit default value #17642

zanmato1984 opened this issue Jun 3, 2020 · 3 comments · Fixed by #18036
Assignees
Labels
duplicate Issues or pull requests already exists. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@zanmato1984
Copy link
Contributor

Bug Report

1. Minimal reproduce step (Required)

Once #17641 get fixed, we'll see:

mysql> create table t(i int);
Query OK, 0 rows affected (0.10 sec)

mysql> insert into t values(1);
Query OK, 1 row affected (0.02 sec)

mysql> alter table t add column b bit(1) default b'<SOME VALUE TREATED AS INVALID STRING>';
Query OK, 0 rows affected (0.28 sec)

mysql> select b from t;
+------------+
| b          |
+------------+
| <SOME VALUE TREATED AS INVALID STRING> | // this value comes from `default_bit` which is OK.
+------------+
1 row in set (0.00 sec)

mysql> alter table t modify column b bit(1) default b'1';
Query OK, 0 rows affected (0.09 sec)

mysql> select b from t;
+------------+
| b          |
+------------+
| <CORRUPTED VALUE> | // this value comes from `origin_default` which is corrupted.
+------------+
1 row in set (0.01 sec)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. Affected version (Required)

v3.0.0, v3.1.0, v4.0.0

5. Root Cause Analysis

Lack something like "origin_default_bit".

@zanmato1984 zanmato1984 added the type/bug The issue is confirmed as a bug. label Jun 3, 2020
@gengliqi gengliqi added the sig/sql-infra SIG: SQL Infra label Jun 4, 2020
@tangenta
Copy link
Contributor

tangenta commented Jun 4, 2020

Let me fix it.

@sre-bot
Copy link
Contributor

sre-bot commented Oct 9, 2020

Integrity check:
RCA symptom trigger_condition affect_version fix_version fields are empty
@tangenta
Please comment /info to get template

@ti-srebot
Copy link
Contributor

ti-srebot commented Oct 9, 2020

Duplicate bug

Duplicated with #17641.

@tangenta tangenta added the duplicate Issues or pull requests already exists. label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues or pull requests already exists. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants