diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-04-06 09:31:59 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-04-06 09:35:58 +0200 |
commit | 16f2cf8f6fff884d75c5680230e2a54009ae5097 (patch) | |
tree | 116d781590c61e2c59e2e3e0f98910068eec2b6e /mysql-test/t/check.test | |
parent | 75b9014fedd8bb85d15501a2281fbade6b56fe78 (diff) | |
download | mariadb-git-bb-10.2-MDEV-25638.tar.gz |
MDEV-25638 Assertion `!result' failed in convert_const_to_intbb-10.2-MDEV-25638
The test suite triggers 3 bugs:
I. Absence of STATUS_NO_RECORD on an empty record
II. Mismatch signed and unsigned becaue parameter is not
taking from the item but was a constant.
III. Problem with rollback changes made for Items in the TABLE object:
A cycle of live of Items (expressions) in table is following:
1) Parsed in the query arena of the table
2) Prepared with the permanent query arena of the table be active as a
runtime and stmt (permanent) arena (here is difference from usual
execution)
3) usage (can be sorter of one query live (CREATE TABLE for example) or
longer then several queries (SELECT and using table cache), it is not a
problem because all fields are local to the table).
4) cleanup and deallocate with the TABLE object
So looking on the above all changes in the expressions belonged to
a TABLE object should be just ignored.
Diffstat (limited to 'mysql-test/t/check.test')
-rw-r--r-- | mysql-test/t/check.test | 21 |
1 files changed, 21 insertions, 0 deletions
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 # |