Skip to content

Instantly share code, notes, and snippets.

@bronson
Created February 9, 2016 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bronson/e9257b65671314737448 to your computer and use it in GitHub Desktop.
Save bronson/e9257b65671314737448 to your computer and use it in GitHub Desktop.
MariaDB [(none)]> set old_mode=ZERO_DATE_TIME_CAST;
Query OK, 0 rows affected (0.00 sec)
MariaDB [test]> select @@old_mode, @@global.old_mode;
+---------------------+-------------------+
| @@old_mode | @@global.old_mode |
+---------------------+-------------------+
| ZERO_DATE_TIME_CAST | |
+---------------------+-------------------+
1 row in set (0.00 sec)
MariaDB [test]> create table t1 (id serial, t time);
Query OK, 0 rows affected (0.04 sec)
MariaDB [test]> insert into t1 (t) values ('12:30:00');
Query OK, 1 row affected (0.00 sec)
MariaDB [test]> select * from t1 where t = '2000-01-01 12:30:00';
Empty set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment