mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for MDEV-14141 Crash in print_keydup_error()
May also fix: MDEV-14970 "MariaDB crashed with signal 11 and Aria table" I am not able to reproduce a crash, however there was no protection in print_keydup_error() if the storage engine reported the wrong key number. This patch adds such a protection and should stop any further crashes in this case. Other things: - Added extra protection in Aria to not set errkey to more than number of keys. (Don't think this is cause of this crash, but better safe than sorry) - Extend test_if_equal_repl_errors() to handle different cases of ER_DUP_ENTRY. This is just mainly precaution for the future.
This commit is contained in:
@@ -1559,7 +1559,7 @@ CREATE TABLE m1 (
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(t1);
|
||||
|
||||
insert into m1 (col1) values (1);
|
||||
--error ER_DUP_ENTRY
|
||||
--error ER_DUP_KEY
|
||||
insert into m1 (col1) values (1);
|
||||
|
||||
drop table m1, t1;
|
||||
@@ -1593,7 +1593,7 @@ CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1), UNIQUE (c2));
|
||||
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c1)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||
INSERT INTO m1 VALUES (1,2);
|
||||
--echo # insert the duplicate value into the merge table
|
||||
--error ER_DUP_ENTRY
|
||||
--error ER_DUP_KEY
|
||||
INSERT INTO m1 VALUES (3,2);
|
||||
DROP TABLE m1,t1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user