Commit f409eb4d authored by Alexander Barkov's avatar Alexander Barkov

MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status ||...

MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status || thd->lex->select_stack_top == 0' failed in parse_sql upon DELETE HISTORY under ORACLE mode
parent 829fce9e
......@@ -14,3 +14,11 @@ SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
a
20
DROP TABLE t1;
#
# MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status || thd->lex->select_stack_top == 0' failed in parse_sql upon DELETE HISTORY under ORACLE mode
#
SET SQL_MODE= ORACLE;
CREATE TABLE t1 (a INT);
DELETE HISTORY FROM t1;
ERROR HY000: Table `t1` is not system-versioned
DROP TABLE t1;
......@@ -11,3 +11,13 @@ INSERT INTO t1 VALUES (20);
SELECT * FROM t1 FOR SYSTEM_TIME ALL;
SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
DROP TABLE t1;
--echo #
--echo # MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status || thd->lex->select_stack_top == 0' failed in parse_sql upon DELETE HISTORY under ORACLE mode
--echo #
SET SQL_MODE= ORACLE;
CREATE TABLE t1 (a INT);
--error ER_VERS_NOT_VERSIONED
DELETE HISTORY FROM t1;
DROP TABLE t1;
......@@ -13679,6 +13679,7 @@ delete_part2:
| HISTORY_SYM delete_single_table opt_delete_system_time
{
Lex->last_table()->vers_conditions= Lex->vers_conditions;
Lex->pop_select(); //main select
}
;
......
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