diff options
author | unknown <monty@mysql.com> | 2004-09-09 07:26:28 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-09-09 07:26:28 +0300 |
commit | e18b7ea95942cb8ab0b31d453929dde50dcf3756 (patch) | |
tree | e2b882265e31ada44f3adec357920530f0c0ac31 /sql/sql_lex.cc | |
parent | c92b5349701ba68fa7ab97abf14933de8d6352fe (diff) | |
parent | 33efc9677d6f6a68d3dba69f4c036856ac4af5fe (diff) | |
download | mariadb-git-e18b7ea95942cb8ab0b31d453929dde50dcf3756.tar.gz |
Merge on pull
BitKeeper/etc/logging_ok:
auto-union
include/my_sys.h:
Auto merged
mysql-test/r/func_in.result:
Auto merged
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 07888a8443b..241e9b863f1 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -24,6 +24,16 @@ #include "sp.h" #include "sp_head.h" + +/* + Fake table list object, pointer to which is used as special value for + st_lex::time_zone_tables_used indicating that we implicitly use time + zone tables in this statement but real table list was not yet created. + Pointer to it is also returned by my_tz_get_tables_list() as indication + of transient error; +*/ +TABLE_LIST fake_time_zone_tables_list; + /* Macros to look like lex */ #define yyGet() *(lex->ptr++) @@ -1004,7 +1014,7 @@ void st_select_lex::init_query() subquery_in_having= explicit_limit= 0; first_execution= 1; first_cond_optimization= 1; - parsing_place= SELECT_LEX_NODE::NO_MATTER; + parsing_place= NO_MATTER; no_wrap_view_item= 0; } @@ -1376,7 +1386,7 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num) We have to create array in prepared statement memory if it is prepared statement */ - Item_arena *arena= thd->current_arena ? thd->current_arena : thd; + Item_arena *arena= thd->current_arena; return (ref_pointer_array= (Item **)arena->alloc(sizeof(Item*) * (item_list.elements + @@ -1785,10 +1795,10 @@ void st_lex::link_first_table_back(TABLE_LIST *first, void st_select_lex::fix_prepare_information(THD *thd, Item **conds) { - if (thd->current_arena && first_execution) + if (thd->current_arena->is_stmt_prepare() && first_execution) { - prep_where= where; first_execution= 0; + prep_where= where; } } |