dolthub/dolt

Dolt differs from MySQL on allowing query global only system variable with session scope

Geschlossen

#6.722 geöffnet am 26.09.2023

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Go (429 Forks)batch import
bugcorrectnessgood first issuegood reprosql

Repository-Metriken

Stars
 (15.227 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Dolt display incorrect header for querying global only variable without specifying the scope. It also should error on querying global only variable with SESSION scope. Dolt:

mysql> SELECT @@system_time_zone;
+----------------------------+
| @@SESSION.system_time_zone |
+----------------------------+
| PDT                        |
+----------------------------+
1 row in set (0.00 sec)

mysql> SELECT @@SESSION.system_time_zone;
+----------------------------+
| @@SESSION.system_time_zone |
+----------------------------+
| PDT                        |
+----------------------------+
1 row in set (0.00 sec)

MySQL:

mysql> SELECT @@system_time_zone;
+--------------------+
| @@system_time_zone |
+--------------------+
| PDT                |
+--------------------+
1 row in set (0.00 sec)

mysql> SELECT @@SESSION.system_time_zone;
ERROR 1238 (HY000): Variable 'system_time_zone' is a GLOBAL variable

Contributor Guide