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

Incorrect results when comparing types.systemSetType against other types #8825

Open
jycor opened this issue Feb 5, 2025 · 0 comments
Open
Labels
correctness We don't return the same result as MySQL

Comments

@jycor
Copy link
Contributor

jycor commented Feb 5, 2025

Dolt:

tmp/main> select @@sql_mode;
+---------------------------------------------------------------+
| @@sql_mode                                                    |
+---------------------------------------------------------------+
| NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES |
+---------------------------------------------------------------+
1 row in set (0.00 sec)

tmp/main> select @@sql_mode = 0;
+----------------+
| @@sql_mode = 0 |
+----------------+
| false          |
+----------------+
1 row in set (0.00 sec)

tmp/main> select @@sql_mode = 'asd';
value asd was not found in the set

MySQL:

mysql> select @@sql_mode;
+---------------------------------------------------------------+
| @@sql_mode                                                    |
+---------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |
+---------------------------------------------------------------+
1 row in set (0.0005 sec)

mysql> select @@sql_mode = 0;
+----------------+
| @@sql_mode = 0 |
+----------------+
|              1 |
+----------------+
1 row in set, 1 warning (0.0006 sec)
Warning (code 1292): Truncated incorrect DOUBLE value: 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION'

mysql> select @@sql_mode = 'asd';
+--------------------+
| @@sql_mode = 'asd' |
+--------------------+
|                  0 |
+--------------------+
1 row in set (0.0015 sec)

Related: dolthub/go-mysql-server#2842

@jycor jycor added the correctness We don't return the same result as MySQL label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
correctness We don't return the same result as MySQL
Projects
None yet
Development

No branches or pull requests

1 participant