-
-
Notifications
You must be signed in to change notification settings - Fork 584
Closed
dolthub/go-mysql-server
#1564Closed
Copy link
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersgood reproEasily reproducible bugsEasily reproducible bugssqlIssue with SQLIssue with SQL
Description
MySQL allows all set types to set their value to ''. Additionally, set types may declare that '' is a valid set value and it is then allowed to be combined with any other set values. To match MySQL's output, the explicitly included '' value should not be included in the string representation of the value, but Dolt/GMS is currently displaying it.
Repro:
create table z (pk int primary key, s1 set('','a','b','c'));
insert into z values (1, ",a,b,c"), (2, "a,b,c");
select pk, s1, cast(s1 as unsigned) from z;With MySQL, this produces:
mysql> select pk, s1, cast(s1 as unsigned) from z;
+----+-------+----------------------+
| pk | s1 | cast(s1 as unsigned) |
+----+-------+----------------------+
| 1 | a,b,c | 15 |
| 2 | a,b,c | 14 |
+----+-------+----------------------+With Dolt, it produces:
fri> select pk, s1, cast(s1 as unsigned) from z;
+----+--------+----------------------+
| pk | s1 | cast(s1 as unsigned) |
+----+--------+----------------------+
| 1 | ,a,b,c | 15 |
| 2 | a,b,c | 14 |
+----+--------+----------------------+Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersgood reproEasily reproducible bugsEasily reproducible bugssqlIssue with SQLIssue with SQL