Skip to content

Commit 6e1880b

Browse files
committed
MDEV-38005 Assertion `(yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)' failed
relax assertion to account for a query being killed in the parser
1 parent cfaaf93 commit 6e1880b

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

mysql-test/main/max_session_mem_used.result

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,13 @@ REPAIR LOCAL TABLE t1 USE_FRM;
4545
REPAIR LOCAL TABLE t1;
4646
DROP TABLE t1;
4747
SET max_session_mem_used=default;
48+
#
49+
# MDEV-38005 Assertion `(yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)' failed
50+
#
51+
SET max_session_mem_used=1;
52+
Warnings:
53+
Warning 1292 Truncated incorrect max_session_mem_used value: '1'
54+
CREATE TABLE t SELECT 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c;
55+
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
56+
SET max_session_mem_used=default;
4857
# End of 10.6 tests

mysql-test/main/max_session_mem_used.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,12 @@ REPAIR LOCAL TABLE t1;
8282
DROP TABLE t1;
8383
SET max_session_mem_used=default;
8484

85+
--echo #
86+
--echo # MDEV-38005 Assertion `(yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)' failed
87+
--echo #
88+
SET max_session_mem_used=1;
89+
--error ER_OPTION_PREVENTS_STATEMENT
90+
CREATE TABLE t SELECT 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c;
91+
SET max_session_mem_used=default;
92+
8593
--echo # End of 10.6 tests

sql/sql_yacc.yy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9369,7 +9369,7 @@ select_item:
93699369
}
93709370
| remember_name expr remember_end select_alias
93719371
{
9372-
DBUG_ASSERT($1 < $3);
9372+
DBUG_ASSERT($1 < $3 || thd->killed);
93739373

93749374
if (unlikely(add_item_to_list(thd, $2)))
93759375
MYSQL_YYABORT;

0 commit comments

Comments
 (0)