Commit b685909d authored by unknown's avatar unknown

moved procedure list initialization (BUG#6517)

mysql-test/r/subselect.result:
  Subselect in non-select command just after connection
mysql-test/t/subselect.test:
  Subselect in non-select command just after connection
sql/sql_lex.cc:
  moved procedure initialization
sql/sql_parse.cc:
  moved procedure initialization
parent fe37a147
...@@ -1990,3 +1990,4 @@ ac ...@@ -1990,3 +1990,4 @@ ac
700 700
NULL NULL
drop tables t1,t2; drop tables t1,t2;
set @got_val= (SELECT 1 FROM (SELECT 'A' as my_col) as T1 ) ;
...@@ -1282,3 +1282,10 @@ INSERT INTO `t2` VALUES (6,5,12,7,'a'),(12,0,0,7,'a'),(12,1,0,7,'a'),(12,5,5,7,' ...@@ -1282,3 +1282,10 @@ INSERT INTO `t2` VALUES (6,5,12,7,'a'),(12,0,0,7,'a'),(12,1,0,7,'a'),(12,5,5,7,'
SELECT b.sc FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b; SELECT b.sc FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b;
SELECT b.ac FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b; SELECT b.ac FROM (SELECT (SELECT a.access FROM t1 a WHERE a.map = op.map AND a.slave = op.pid AND a.master = 1) ac FROM t2 op WHERE op.id = 12 AND op.map = 0) b;
drop tables t1,t2; drop tables t1,t2;
#
# Subselect in non-select command just after connection
#
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root;
set @got_val= (SELECT 1 FROM (SELECT 'A' as my_col) as T1 ) ;
...@@ -157,6 +157,7 @@ void lex_start(THD *thd, uchar *buf,uint length) ...@@ -157,6 +157,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE); lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE);
lex->sql_command=SQLCOM_END; lex->sql_command=SQLCOM_END;
lex->duplicates= DUP_ERROR; lex->duplicates= DUP_ERROR;
lex->proc_list.first= 0;
} }
void lex_end(LEX *lex) void lex_end(LEX *lex)
......
...@@ -3940,7 +3940,6 @@ mysql_init_select(LEX *lex) ...@@ -3940,7 +3940,6 @@ mysql_init_select(LEX *lex)
{ {
DBUG_ASSERT(lex->result == 0); DBUG_ASSERT(lex->result == 0);
lex->exchange= 0; lex->exchange= 0;
lex->proc_list.first= 0;
} }
} }
......
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