Commit e2d9929d authored by unknown's avatar unknown

BUG#9922 - INSERT SELECT with UNIONs allows concurrent INSERTs

don't set lex->lock_option=TL_READ in the parser for SELECT

parent 2a8f6bb1
...@@ -147,6 +147,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length) ...@@ -147,6 +147,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length)
lex->select->in_sum_expr=0; lex->select->in_sum_expr=0;
lex->select->expr_list.empty(); lex->select->expr_list.empty();
lex->select->ftfunc_list.empty(); lex->select->ftfunc_list.empty();
lex->lock_option=TL_READ;
lex->convert_set=(lex->thd=thd)->variables.convert_set; lex->convert_set=(lex->thd=thd)->variables.convert_set;
lex->yacc_yyss=lex->yacc_yyvs=0; lex->yacc_yyss=lex->yacc_yyvs=0;
lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE); lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE);
......
...@@ -1531,7 +1531,6 @@ select_init: ...@@ -1531,7 +1531,6 @@ select_init:
select_part2: select_part2:
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->lock_option=TL_READ;
mysql_init_select(lex); mysql_init_select(lex);
} }
select_options select_item_list select_into select_lock_type; select_options select_item_list select_into select_lock_type;
......
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