diff options
author | Monty <monty@mariadb.org> | 2018-01-23 19:21:44 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-01-24 00:09:34 +0200 |
commit | b3c7cf81e3578fef828aa749de4c75258c3fbd76 (patch) | |
tree | 4272441997be7c44e2c06a581f254f7a07c97ebc /mysql-test/t | |
parent | a4663af05c1d1bd3abb537205df070ed2158e702 (diff) | |
download | mariadb-git-b3c7cf81e3578fef828aa749de4c75258c3fbd76.tar.gz |
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.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/merge.test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 0cf37a24f8e..311eb6f12f3 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -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; |