summaryrefslogtreecommitdiff
path: root/mysql-test/main/type_temporal_innodb.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/type_temporal_innodb.result')
-rw-r--r--mysql-test/main/type_temporal_innodb.result61
1 files changed, 43 insertions, 18 deletions
diff --git a/mysql-test/main/type_temporal_innodb.result b/mysql-test/main/type_temporal_innodb.result
index b869822722d..2aad1e02d02 100644
--- a/mysql-test/main/type_temporal_innodb.result
+++ b/mysql-test/main/type_temporal_innodb.result
@@ -56,7 +56,7 @@ SELECT DATE'0000-00-00'='';
DATE'0000-00-00'=''
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
CREATE TABLE t1 (a ENUM('a'), b DATE, c INT, KEY(b)) ENGINE=InnoDB;
INSERT IGNORE INTO t1 VALUES ('','0000-00-00',0);
Warnings:
@@ -65,49 +65,49 @@ SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
ALTER TABLE t1 ENGINE=MyISAM;
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
DROP TABLE t1;
SELECT TIMESTAMP'0000-00-00 00:00:00'='';
TIMESTAMP'0000-00-00 00:00:00'=''
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
CREATE TABLE t1 (a ENUM('a'), b DATETIME, c INT, KEY(b)) ENGINE=InnoDB;
INSERT IGNORE INTO t1 VALUES ('','0000-00-00 00:00:00',0);
Warnings:
@@ -116,43 +116,43 @@ SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
ALTER TABLE t1 ENGINE=MyISAM;
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
DROP TABLE t1;
CREATE TABLE t1 (d DATE) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('2012-12-21');
@@ -160,3 +160,28 @@ SELECT * FROM t1 WHERE LEAST( UTC_TIME(), d );
d
2012-12-21
DROP TABLE t1;
+#
+# MDEV-17969 Assertion `name' failed in THD::push_warning_truncated_value_for_field
+#
+CREATE TABLE t1 (c1 DATE , c2 TIMESTAMP) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('2006-07-17','0000-00-00 00:00:00');
+CREATE TABLE t2 (pk INT, a1 TIME) Engine=InnoDB;
+INSERT INTO t2 VALUES (6,'00:00:00');
+SET SESSION sql_mode= 'strict_all_tables,no_zero_date';
+CREATE TABLE tbl SELECT * FROM t1 WHERE t1.c1 = (SELECT c2 FROM t2 WHERE pk = 6);
+ERROR 22007: Truncated incorrect datetime value: '0000-00-00 00:00:00'
+DROP TABLE t1,t2;
+SET sql_mode=DEFAULT;
+#
+# MDEV-19166 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv
+#
+CREATE TABLE t1 (f TIMESTAMP DEFAULT 0) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('2024-02-29');
+SELECT * FROM t1 WHERE SUBSTR(1 FROM BIT_LENGTH(f) FOR DEFAULT(f));
+f
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#