diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/check.result | 34 | ||||
-rw-r--r-- | mysql-test/t/check.test | 21 |
2 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/r/check.result b/mysql-test/r/check.result index 11ed734da0c..33f89735a15 100644 --- a/mysql-test/r/check.result +++ b/mysql-test/r/check.result @@ -102,3 +102,37 @@ Note 1091 Can't DROP CONSTRAINT `non_existing_constraint`; check that it exists insert into t1 () values (); ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1` drop table t1; +# +# MDEV-25638: Assertion `!result' failed in convert_const_to_int +# +CREATE TABLE v0 ( v1 bigint CHECK ( v1 NOT IN ( 'x' , 'x111' ) ) ) ; +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'x' +Warning 1292 Truncated incorrect DOUBLE value: 'x111' +select * from v0; +v1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'x' +Warning 1292 Truncated incorrect DOUBLE value: 'x111' +select v1 from v0; +v1 +select * from v0; +v1 +prepare stmt from "select * from v0"; +execute stmt; +v1 +execute stmt; +v1 +flush tables; +select * from v0; +v1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'x' +Warning 1292 Truncated incorrect DOUBLE value: 'x111' +select * from v0; +v1 +deallocate prepare stmt; +drop table v0; +# +# End of 10.2 test +# diff --git a/mysql-test/t/check.test b/mysql-test/t/check.test index 29587a9f623..9cefdee8418 100644 --- a/mysql-test/t/check.test +++ b/mysql-test/t/check.test @@ -124,3 +124,24 @@ alter table t1 drop constraint if exists non_existing_constraint; --error ER_CONSTRAINT_FAILED insert into t1 () values (); drop table t1; + +--echo # +--echo # MDEV-25638: Assertion `!result' failed in convert_const_to_int +--echo # + +CREATE TABLE v0 ( v1 bigint CHECK ( v1 NOT IN ( 'x' , 'x111' ) ) ) ; +select * from v0; +select v1 from v0; +select * from v0; +prepare stmt from "select * from v0"; +execute stmt; +execute stmt; +flush tables; +select * from v0; +select * from v0; +deallocate prepare stmt; +drop table v0; + +--echo # +--echo # End of 10.2 test +--echo # |