Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4.12
-
None
Description
The MySQL documentation says the following:
To set a global system variable value to the compiled-in MySQL default value or a session system variable to the current corresponding global value, set the variable to the value DEFAULT.
https://dev.mysql.com/doc/refman/5.6/en/set-variable.html#set-variable-system-variables
However, this does not appear to work for all system variables in MariaDB. For example, it does not seem to work for foreign_key_checks:
MariaDB [(none)]> SET SESSION foreign_key_checks=OFF; |
Query OK, 0 rows affected (0.000 sec) |
|
MariaDB [(none)]> SHOW SESSION VARIABLES LIKE 'foreign_key_checks'; |
+--------------------+-------+ |
| Variable_name | Value |
|
+--------------------+-------+ |
| foreign_key_checks | OFF | |
+--------------------+-------+ |
1 row in set (0.001 sec) |
|
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'foreign_key_checks'; |
+--------------------+-------+ |
| Variable_name | Value |
|
+--------------------+-------+ |
| foreign_key_checks | ON | |
+--------------------+-------+ |
1 row in set (0.001 sec) |
|
MariaDB [(none)]> SET SESSION foreign_key_checks=DEFAULT; |
Query OK, 0 rows affected (0.000 sec) |
|
MariaDB [(none)]> SHOW SESSION VARIABLES LIKE 'foreign_key_checks'; |
+--------------------+-------+ |
| Variable_name | Value |
|
+--------------------+-------+ |
| foreign_key_checks | OFF | |
+--------------------+-------+ |
1 row in set (0.001 sec) |