summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date_strict.result
blob: c4d73e2f57de01fd917f156aeb34d08911d5190c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
DROP TABLE IF EXISTS timestamps;
CREATE TABLE timestamps (
id INT PRIMARY KEY AUTO_INCREMENT,
create_dt DATETIME
) DEFAULT CHARSET UTF8;
SHOW CREATE TABLE timestamps;
Table	Create Table
timestamps	CREATE TABLE `timestamps` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_dt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8
SET sql_mode='STRICT_TRANS_TABLES';
INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00");
ERROR 22003: Out of range value for column 'create_dt' at row 1
SET sql_mode=default;
SELECT * FROM timestamps;
id	create_dt
INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00");
SELECT * FROM timestamps;
id	create_dt
2	2015-06-17 00:00:00
DROP TABLE timestamps;