1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-30539 EXPLAIN EXTENDED: no message with queries for DML statements

EXPLAIN EXTENDED for an UPDATE/DELETE/INSERT/REPLACE statement did not
produce the warning containing the text representation of the query
obtained after the optimization phase. Such warning was produced for
SELECT statements, but not for DML statements.
The patch fixes this defect of EXPLAIN EXTENDED for DML statements.
This commit is contained in:
Igor Babaev
2023-03-22 21:59:18 -07:00
parent 011261f4e9
commit f33fc2fae5
18 changed files with 565 additions and 59 deletions

View File

@ -788,6 +788,22 @@ INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
DROP TABLE t1;
--echo #75
CREATE TABLE t1 (id INT PRIMARY KEY, i INT);
--let $query = INSERT INTO t1 VALUES (3,10), (7,11), (3,11) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id);
--source include/explain_utils.inc
DROP TABLE t1;
--echo #76
CREATE TABLE t1 (id INT PRIMARY KEY, i INT);
CREATE TABLE t2 (a INT, b INT);
INSERT INTO t2 VALUES (1,10), (3,10), (7,11), (3,11);
--let $query = INSERT INTO t1 SELECT * FROM t2 ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id);
--source include/explain_utils.inc
DROP TABLE t1,t2;
--echo #
--echo # Bug #12949629: CLIENT LOSES CONNECTION AFTER EXECUTING A PROCEDURE WITH
--echo # EXPLAIN UPDATE/DEL/INS