Commit 22c9663d authored by Alexander Barkov's avatar Alexander Barkov

MDEV-13527 Crash when EXPLAIN SELECT .. INTO row_sp_variable.field

parent 6179a8ef
...@@ -2246,3 +2246,13 @@ b ...@@ -2246,3 +2246,13 @@ b
10 10
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-13527 Crash when EXPLAIN SELECT .. INTO row_sp_variable.field
#
BEGIN NOT ATOMIC
DECLARE a ROW(a INT);
EXPLAIN SELECT 1 INTO a.a;
END;
$$
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
...@@ -3070,3 +3070,14 @@ b ...@@ -3070,3 +3070,14 @@ b
10 10
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-13527 Crash when EXPLAIN SELECT .. INTO row_sp_variable.field
#
DECLARE
a ROW(a INT);
BEGIN
EXPLAIN SELECT 1 INTO a.a;
END;
$$
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
...@@ -2375,3 +2375,16 @@ DELIMITER ;$$ ...@@ -2375,3 +2375,16 @@ DELIMITER ;$$
CALL p1; CALL p1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-13527 Crash when EXPLAIN SELECT .. INTO row_sp_variable.field
--echo #
DELIMITER $$;
DECLARE
a ROW(a INT);
BEGIN
EXPLAIN SELECT 1 INTO a.a;
END;
$$
DELIMITER ;$$
...@@ -1471,3 +1471,16 @@ DELIMITER ;$$ ...@@ -1471,3 +1471,16 @@ DELIMITER ;$$
CALL p1; CALL p1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-13527 Crash when EXPLAIN SELECT .. INTO row_sp_variable.field
--echo #
DELIMITER $$;
BEGIN NOT ATOMIC
DECLARE a ROW(a INT);
EXPLAIN SELECT 1 INTO a.a;
END;
$$
DELIMITER ;$$
...@@ -12155,7 +12155,7 @@ select_outvar: ...@@ -12155,7 +12155,7 @@ select_outvar:
} }
| ident '.' ident | ident '.' ident
{ {
if (!($$= Lex->create_outvar(thd, &$1, &$3))) if (!($$= Lex->create_outvar(thd, &$1, &$3)) && Lex->result)
MYSQL_YYABORT; MYSQL_YYABORT;
} }
; ;
......
...@@ -12218,7 +12218,7 @@ select_outvar: ...@@ -12218,7 +12218,7 @@ select_outvar:
} }
| ident '.' ident | ident '.' ident
{ {
if (!($$= Lex->create_outvar(thd, &$1, &$3))) if (!($$= Lex->create_outvar(thd, &$1, &$3)) && Lex->result)
MYSQL_YYABORT; MYSQL_YYABORT;
} }
; ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment