diff options
author | bell@sanja.is.com.ua <> | 2004-07-01 01:52:05 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-07-01 01:52:05 +0300 |
commit | 24a8dc2337a717ff340bac228383ef04437a4666 (patch) | |
tree | ecefd13b04f2de8e7b4f2ddf9b370a3344e3b8d0 | |
parent | a0c83c0f68af0f0446b4da318ed08f88af8bdc41 (diff) | |
download | mariadb-git-24a8dc2337a717ff340bac228383ef04437a4666.tar.gz |
fixed WHERE condition optimisation in PS
-rw-r--r-- | sql/sql_prepare.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 87fb379321f..a8a2f5e8515 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1584,6 +1584,7 @@ void reset_stmt_for_execute(THD *thd, LEX *lex) unit->reinit_exec_mechanism(); } } + lex->current_select= &lex->select_lex; } @@ -1666,10 +1667,12 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length) mysql_delete(), mysql_update() and mysql_select() to not to have re-check on setup_* and other things .. */ + thd->current_arena= stmt; thd->protocol= &thd->protocol_prep; // Switch to binary protocol mysql_execute_command(thd); thd->lex->unit.cleanup(); thd->protocol= &thd->protocol_simple; // Use normal protocol + thd->current_arena= 0; if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(), WAIT_PRIOR); |