diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-10-11 19:27:53 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-10-11 19:27:53 +0400 |
commit | 3e8f7c8516d643a6e6fae95596cb426082c2c7f5 (patch) | |
tree | 3e9066183086e925cdfbce4310cb1f157e631bd3 /mysql-test/t/explain_non_select.test | |
parent | a1705b762e26eb86ded808d426c43eafb47193ec (diff) | |
download | mariadb-git-3e8f7c8516d643a6e6fae95596cb426082c2c7f5.tar.gz |
MDEV-5122: "Commands out of sync", "Malformed packet" or client hang up...
- When INSERT catches an error, it should not attempt to send parts of
EXPLAIN output.
Diffstat (limited to 'mysql-test/t/explain_non_select.test')
-rw-r--r-- | mysql-test/t/explain_non_select.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/explain_non_select.test b/mysql-test/t/explain_non_select.test index 316cc1bf8d2..f05373c312e 100644 --- a/mysql-test/t/explain_non_select.test +++ b/mysql-test/t/explain_non_select.test @@ -169,3 +169,32 @@ explain insert into t2 values (11, 1+(select max(a+1) from t1)); drop table t1,t2; + +--echo # +--echo # MDEV-5122: "Commands out of sync", "Malformed packet" or client hang up on unique key violation +--echo # +drop table if exists t1; + +--disable_warnings +drop function if exists f1; +--enable_warnings + +create table t1 (a int, unique(a)); + +delimiter |; +create function f1(x int) + returns int +begin + insert into t1 values(x),(x); + return 10; +end| +delimiter ;| + +--error ER_DUP_ENTRY +select f1(100); +select 'OK'; + +drop function f1; +drop table t1; + + |