dolthub/dolt

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

Open

#6 722 ouverte le 26 sept. 2023

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Go (429 forks)batch import
bugcorrectnessgood first issuegood reprosql

Métriques du dépôt

Stars
 (15 227 stars)
Métriques de merge PR
 (Merge moyen 2j 21h) (58 PRs mergées en 30 j)

Description

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

Guide contributeur