summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index d650f696d14..b0707955522 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++)
@@ -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 +
@@ -1649,6 +1659,11 @@ void st_select_lex_unit::set_limit(SELECT_LEX *values,
}
+st_lex::st_lex()
+ :result(0)
+{}
+
+
/*
Unlink first table from global table list and first table from outer select
list (lex->select_lex)