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

enum value convert to float failed #20168

Closed
ChenPeng2013 opened this issue Sep 23, 2020 · 13 comments · Fixed by #20221
Closed

enum value convert to float failed #20168

ChenPeng2013 opened this issue Sep 23, 2020 · 13 comments · Fixed by #20221
Labels
challenge-program severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@ChenPeng2013
Copy link
Contributor

ChenPeng2013 commented Sep 23, 2020

Development Task

Fix bug:

1. Minimal reproduce step (Required)

use test;
drop table if exists t;
create table t(a enum('a', 'b', 'c'));
insert into t values(1), (2), (3);
select * from t where a;
show warnings;

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

mysql> select * from t where a;
+------+
| a    |
+------+
| a    |
| b    |
| c    |
+------+
3 rows in set (0.00 sec)

mysql> show warnings;
Empty set (0.00 sec)

3. What did you see instead (Required)

mysql> select * from t where a;                                                                                                                Empty set, 3 warnings (0.00 sec)

mysql> show warnings;
+---------+------+--------------------------------------+
| Level   | Code | Message                              |
+---------+------+--------------------------------------+
| Warning | 1292 | Truncated incorrect FLOAT value: 'a' |
| Warning | 1292 | Truncated incorrect FLOAT value: 'b' |
| Warning | 1292 | Truncated incorrect FLOAT value: 'c' |
+---------+------+--------------------------------------+
3 rows in set (0.00 sec)

4. What is your TiDB version? (Required)

master 462927b and release-4.0 476c992

Please comment on this issue if you are interested in.

SIG slack channel

#sig-exec

Score

  • 300

Mentor

@ChenPeng2013 ChenPeng2013 added the type/bug The issue is confirmed as a bug. label Sep 23, 2020
@ChenPeng2013
Copy link
Contributor Author

set value convert to float failed

use test;
drop table if exists t;
create table t(a set('a', 'b', 'c'));
insert into t values(3);
select * from t where a;
show warnings;

expect

mysql> select * from t where a;
+------+
| a    |
+------+
| a,b  |
+------+
1 row in set (0.00 sec)

mysql> show warnings;
Empty set (0.00 sec)

got

mysql> select * from t where a;
Empty set, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+----------------------------------------+
| Level   | Code | Message                                |
+---------+------+----------------------------------------+
| Warning | 1292 | Truncated incorrect FLOAT value: 'a,b' |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)

@ti-challenge-bot
Copy link

This issue does not belong to any SIG.

More

Tip : Currently, we only support sig labels starting with sig/, maybe you should add this type of label.

Warning: None

@XuHuaiyu
Copy link
Contributor

/pick-up

@ti-challenge-bot
Copy link

Pick up success.

@XuHuaiyu
Copy link
Contributor

/give-up

@ti-challenge-bot ti-challenge-bot bot removed the picked label Sep 23, 2020
@ti-challenge-bot
Copy link

Give up success.

@ti-challenge-bot
Copy link

The issue has been removed from the challenge program.

@ti-challenge-bot
Copy link

The issue has been removed from the challenge program.

@xiaodong-ji
Copy link
Contributor

/pick-up

@ti-challenge-bot
Copy link

Pick up success.

@sre-bot
Copy link
Contributor

sre-bot commented Sep 27, 2020

Integrity check:
RCA symptom trigger_condition affect_version fix_version fields are empty

Please comment /info to get template

@ti-srebot
Copy link
Contributor

ti-srebot commented Sep 27, 2020

Please edit this comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

@ti-srebot
Copy link
Contributor

( FixedVersions AffectedVersions ) fields are empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenge-program severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants