Skip to content

Commit bc40985

Browse files
committed
MDEV-29074 GET_BIT variables crash in SET STATEMENT
1 parent 0ee5cf8 commit bc40985

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

mysql-test/main/set_statement.result

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,3 +1242,15 @@ t1 CREATE TABLE `t1` (
12421242
`c1` varchar(3) NOT NULL
12431243
) ENGINE=MyISAM DEFAULT CHARSET=latin1
12441244
DROP TABLE t1;
1245+
#
1246+
# MDEV-29074 GET_BIT variables crash in SET STATEMENT
1247+
#
1248+
set statement log_queries_not_using_indexes=1 for select @@log_queries_not_using_indexes;
1249+
@@log_queries_not_using_indexes
1250+
1
1251+
select @@log_queries_not_using_indexes;
1252+
@@log_queries_not_using_indexes
1253+
0
1254+
#
1255+
# End of 10.3 tests
1256+
#

mysql-test/main/set_statement.test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,3 +1159,13 @@ SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT
11591159
SHOW CREATE TABLE t1;
11601160

11611161
DROP TABLE t1;
1162+
1163+
--echo #
1164+
--echo # MDEV-29074 GET_BIT variables crash in SET STATEMENT
1165+
--echo #
1166+
set statement log_queries_not_using_indexes=1 for select @@log_queries_not_using_indexes;
1167+
select @@log_queries_not_using_indexes;
1168+
1169+
--echo #
1170+
--echo # End of 10.3 tests
1171+
--echo #

sql/sql_parse.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3313,6 +3313,7 @@ bool run_set_statement_if_requested(THD *thd, LEX *lex)
33133313
{
33143314
switch (v->var->option.var_type & GET_TYPE_MASK)
33153315
{
3316+
case GET_BIT:
33163317
case GET_BOOL:
33173318
case GET_INT:
33183319
case GET_LONG:

0 commit comments

Comments
 (0)