-
-
Notifications
You must be signed in to change notification settings - Fork 584
Open
Labels
analyzercorrectnessWe don't return the same result as MySQLWe don't return the same result as MySQLsqlIssue with SQLIssue with SQL
Description
When converting between strings and decimals for HASH IN <tuple> expressions, trailing 0s cause a problems.
There's a skipped test added in this PR:
dolthub/go-mysql-server#2267
Setup:
create table t (v varchar(100));
insert into t values ('0'), ('0.0'), ('123'), ('123.0');
create table t_idx (v varchar(100));
create index idx on t_idx(v);
insert into t_idx values ('0'), ('0.0'), ('123'), ('123.0');MySQL:
mysql> select * from t where (v in (0.0, 123));
+-------+
| v |
+-------+
| 0 |
| 0.0 |
| 123 |
| 123.0 |
+-------+
4 rows in set (0.0343 sec)
mysql> select * from t_idx where (v in (0.0, 123));
+-------+
| v |
+-------+
| 0 |
| 0.0 |
| 123 |
| 123.0 |
+-------+
4 rows in set (0.0069 sec)Dolt:
tmp> select * from t where (v in (0.0, 123));
+-----+
| v |
+-----+
| 123 |
+-----+
1 row in set (0.00 sec)
tmp> select * from t_idx where (v in (0.0, 123));
+-----+
| v |
+-----+
| 123 |
+-----+
1 row in set (0.01 sec)Metadata
Metadata
Assignees
Labels
analyzercorrectnessWe don't return the same result as MySQLWe don't return the same result as MySQLsqlIssue with SQLIssue with SQL