dolthub/dolt

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

Open

#6.722 geöffnet am 26. Sept. 2023

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (429 Forks)batch import
bugcorrectnessgood first issuegood reprosql

Repository-Metriken

Stars
 (15.227 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 21h) (58 gemergte PRs in 30 T)

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