dolthub/dolt

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

Open

#6722 aperta il 26 set 2023

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)Go (429 fork)batch import
bugcorrectnessgood first issuegood reprosql

Metriche repository

Star
 (15.227 star)
Metriche merge PR
 (Merge medio 2g 21h) (58 PR mergiate in 30 g)

Descrizione

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

Guida contributor