From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- mysql-test/main/ps_innodb.result | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 mysql-test/main/ps_innodb.result (limited to 'mysql-test/main/ps_innodb.result') diff --git a/mysql-test/main/ps_innodb.result b/mysql-test/main/ps_innodb.result new file mode 100644 index 00000000..2b9ec621 --- /dev/null +++ b/mysql-test/main/ps_innodb.result @@ -0,0 +1,64 @@ +# +# MDEV-17042: prepared statement does not return error with +# SQL_MODE STRICT_TRANS_TABLES. (Part 2) +# +set @save_sql_mode=@@sql_mode; +set sql_mode='STRICT_TRANS_TABLES'; +CREATE TABLE t1 (id int, count int) engine=innodb; +insert into t1 values (1,1),(0,2); +update t1 set count = count + 1 where id = '1bad'; +ERROR 22007: Truncated incorrect DECIMAL value: '1bad' +prepare stmt from "update t1 set count = count + 1 where id = '1bad'"; +execute stmt; +ERROR 22007: Truncated incorrect DECIMAL value: '1bad' +deallocate prepare stmt; +prepare stmt from 'update t1 set count = count + 1 where id = ?'; +set @a = '1bad'; +execute stmt using @a; +ERROR 22007: Truncated incorrect DECIMAL value: '1bad' +deallocate prepare stmt; +drop table t1; +CREATE TABLE t1 (id decimal(10,5), count int) engine=innodb; +insert into t1 values (1,1),(0,2); +update t1 set count = count + 1 where id = '1bad'; +ERROR 22007: Truncated incorrect DECIMAL value: '1bad' +prepare stmt from "update t1 set count = count + 1 where id = '1bad'"; +execute stmt; +ERROR 22007: Truncated incorrect DECIMAL value: '1bad' +deallocate prepare stmt; +prepare stmt from 'update t1 set count = count + 1 where id = ?'; +set @a = '1bad'; +execute stmt using @a; +ERROR 22007: Truncated incorrect DECIMAL value: '1bad' +deallocate prepare stmt; +drop table t1; +CREATE TABLE t1 (id double, count int) engine=innodb; +insert into t1 values (1,1),(0,2); +update t1 set count = count + 1 where id = '1bad'; +ERROR 22007: Truncated incorrect DOUBLE value: '1bad' +prepare stmt from "update t1 set count = count + 1 where id = '1bad'"; +execute stmt; +ERROR 22007: Truncated incorrect DOUBLE value: '1bad' +deallocate prepare stmt; +prepare stmt from 'update t1 set count = count + 1 where id = ?'; +set @a = '1bad'; +execute stmt using @a; +ERROR 22007: Truncated incorrect DOUBLE value: '1bad' +deallocate prepare stmt; +drop table t1; +CREATE TABLE t1 (id date, count int) engine=innodb; +insert into t1 values ("2019-06-11",1),("2019-06-12",2); +update t1 set count = count + 1 where id = '1bad'; +ERROR 22007: Truncated incorrect datetime value: '1bad' +prepare stmt from "update t1 set count = count + 1 where id = '1bad'"; +execute stmt; +ERROR 22007: Truncated incorrect datetime value: '1bad' +deallocate prepare stmt; +prepare stmt from 'update t1 set count = count + 1 where id = ?'; +set @a = '1bad'; +execute stmt using @a; +ERROR 22007: Truncated incorrect datetime value: '1bad' +deallocate prepare stmt; +drop table t1; +set sql_mode=@save_sql_mode; +# End of 5.5 tests -- cgit v1.2.3