mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@@ -152,3 +152,41 @@ SELECT * FROM t1;
|
||||
a b d
|
||||
1 NULL NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-22637 Rollback of insert fails when column reorder happens
|
||||
#
|
||||
SET @@SQL_MODE = REPLACE(@@SQL_MODE, 'STRICT_TRANS_TABLES', '');
|
||||
SET @@SQL_MODE = REPLACE(@@SQL_MODE, 'STRICT_ALL_TABLES', '');
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 CHAR(100),
|
||||
f3 CHAR(100), f4 CHAR(100))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1, "This is column2", "This is column3",
|
||||
"This is column4");
|
||||
set DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done';
|
||||
ALTER TABLE t1 ADD COLUMN f6 int after f3, add primary key(f6, f4(3), f3(3));
|
||||
connect con1,localhost,root,,;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
|
||||
BEGIN;
|
||||
INSERT INTO t1(f1, f2) VALUES(2, "This is column2 value");
|
||||
ROLLBACK;
|
||||
set DEBUG_SYNC = 'now SIGNAL insert_done';
|
||||
connection default;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f4' at row 3
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f1` int(11) NOT NULL,
|
||||
`f2` char(100) DEFAULT NULL,
|
||||
`f3` char(100) NOT NULL,
|
||||
`f6` int(11) NOT NULL,
|
||||
`f4` char(100) NOT NULL,
|
||||
PRIMARY KEY (`f6`,`f4`(3),`f3`(3))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
disconnect con1;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET SQL_MODE=DEFAULT;
|
||||
|
Reference in New Issue
Block a user