diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-30 11:35:52 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-30 11:38:41 +0200 |
commit | 5b035c84567b60c2ca680de96f5179a6dd3d9e61 (patch) | |
tree | bc4407cc8a8672f6e2a22b14c4db31e85eb0beac /mysql-test | |
parent | a8793a2c02f805a4a1c4dbd1416b594169b77541 (diff) | |
download | mariadb-git-5b035c84567b60c2ca680de96f5179a6dd3d9e61.tar.gz |
MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX
(the same but in other way made before INSERT/DELETE/SELECT)
Without it, mysql_update() didn't know that there will be EXPLAIN result set and was sending OK at the end of the update, which conflicted with the EOF sent later by EXPLAIN.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ps.result | 17 | ||||
-rw-r--r-- | mysql-test/t/ps.test | 16 |
2 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index b509a2122b0..0d305b37bd3 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -4397,5 +4397,22 @@ END; 1 1 # +# MDEV-14572: Assertion `! is_set()' failed in +# Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +PREPARE stmt FROM 'EXPLAIN UPDATE t1, t2 SET a = 1'; +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +deallocate prepare stmt; +DROP TABLE t1, t2; +# # End of 10.1 tests # diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index e1e8dfeeb17..c8fc3e3177e 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3927,6 +3927,22 @@ END; / DELIMITER ;/ +--echo # +--echo # MDEV-14572: Assertion `! is_set()' failed in +--echo # Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS +--echo # + +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); + +#EXPLAIN UPDATE t1, t2 SET a = 1; +PREPARE stmt FROM 'EXPLAIN UPDATE t1, t2 SET a = 1'; +EXECUTE stmt; +EXECUTE stmt; +deallocate prepare stmt; + +# Cleanup +DROP TABLE t1, t2; --echo # --echo # End of 10.1 tests |