Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.1.19
-
None
-
Linux Fedora 24
Description
MariaDB [test]> CREATE TABLE `t_example` ( |
-> `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
-> `description` VARCHAR(10) DEFAULT NULL, |
-> `insert_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, |
-> PRIMARY KEY (`id`) |
-> );
|
Query OK, 0 rows affected (0.05 sec) |
|
MariaDB [test]> CREATE VIEW `v_example` AS ( |
-> SELECT |
-> `id` AS `id`, |
-> `description` AS `description`, |
-> `insert_time` AS `insert_time` |
-> FROM `t_example`); |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> CREATE TEMPORARY TABLE `tt_example` SELECT * FROM `v_example` WHERE 0; |
ERROR 1067 (42000): Invalid default value for 'insert_time' |
MariaDB [test]> SELECT @@SQL_MODE; |
+---------------------------------------------------------------------------------------------------------------------------+ |
| @@SQL_MODE |
|
+---------------------------------------------------------------------------------------------------------------------------+ |
| NO_BACKSLASH_ESCAPES,STRICT_ALL_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
|
+---------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.00 sec) |
|
MariaDB [test]> SELECT VERSION(); |
+-----------------+ |
| VERSION() |
|
+-----------------+ |
| 10.1.17-MariaDB |
|
+-----------------+ |
1 row in set (0.00 sec) |
|