1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-20 10:24:14 +03:00
Files
mariadb/mysql-test/include/sql_mode_pad_char_to_full_length.inc
Alexander Barkov ed2adc8c6f MDEV-28190 sql_mode makes MDEV-371 virtual column expressions nondeterministic
This problem was fixed earlier by MDEV-27653.
Adding MTR tests only.
2023-04-06 16:17:50 +04:00

32 lines
770 B
SQL

--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;