Skip to content

Instantly share code, notes, and snippets.

@nirbhayc
Created November 3, 2016 17:26
Show Gist options
  • Save nirbhayc/efebed90bb9562cdc9964c7c52940d12 to your computer and use it in GitHub Desktop.
Save nirbhayc/efebed90bb9562cdc9964c7c52940d12 to your computer and use it in GitHub Desktop.
sql_mode='STRICT_TRANS_TABLES' & SET @@var=<out-of-range>
MariaDB [test]> select @@version;
+----------------------+
| @@version |
+----------------------+
| 10.2.3-MariaDB-debug |
+----------------------+
1 row in set (0.00 sec)
MariaDB [test]> select @@sql_mode;
+---------------------+
| @@sql_mode |
+---------------------+
| STRICT_TRANS_TABLES |
+---------------------+
1 row in set (0.00 sec)
MariaDB [test]> SET @@global.table_definition_cache = 100;
ERROR 1231 (42000): Variable 'table_definition_cache' can't be set to the value of '100'
mysql> select @@version;
+--------------+
| @@version |
+--------------+
| 5.7.16-debug |
+--------------+
1 row in set (0.00 sec)
mysql> select @@sql_mode;
+---------------------+
| @@sql_mode |
+---------------------+
| STRICT_TRANS_TABLES |
+---------------------+
1 row in set (0.00 sec)
mysql> SET @@global.table_definition_cache = 100;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> show warnings;
+---------+------+---------------------------------------------------------+
| Level | Code | Message |
+---------+------+---------------------------------------------------------+
| Warning | 1292 | Truncated incorrect table_definition_cache value: '100' |
+---------+------+---------------------------------------------------------+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment