1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-28190 sql_mode makes MDEV-371 virtual column expressions nondeterministic

This problem was fixed earlier by MDEV-27653.
Adding MTR tests only.
This commit is contained in:
Alexander Barkov
2023-04-06 14:50:26 +04:00
parent 54715a1074
commit ed2adc8c6f
5 changed files with 213 additions and 0 deletions

View File

@ -0,0 +1,31 @@
--echo #
--echo # MDEV-28190 sql_mode makes MDEV-371 virtual column expressions nondeterministic
--echo #
CREATE TABLE t1 (a INT,b CHAR(20));
SHOW CREATE TABLE t1;
CREATE UNIQUE INDEX bi USING HASH ON t1 (b);
INSERT INTO t1 VALUES (0,0);
SET sql_mode='pad_char_to_full_length';
DELETE FROM t1;
DROP TABLE t1;
SET sql_mode='';
CREATE TABLE t1 (a INT,b CHAR(20));
SHOW CREATE TABLE t1;
CREATE UNIQUE INDEX bi USING HASH ON t1 (b);
SET sql_mode='pad_char_to_full_length';
INSERT INTO t1 VALUES (0,0);
DELETE FROM t1;
DROP TABLE t1;
SET sql_mode='';
CREATE OR REPLACE TABLE t1 (a CHAR(20),b CHAR(20));
SHOW CREATE TABLE t1;
CREATE UNIQUE INDEX bi USING HASH ON t1 (b);
INSERT INTO t1 VALUES (0,0);
SET sql_mode='pad_char_to_full_length';
DELETE FROM t1;
DROP TABLE t1;