summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authordlenev@mysql.com <>2005-07-09 22:04:18 +0400
committerdlenev@mysql.com <>2005-07-09 22:04:18 +0400
commit75b8d4fa08966baa22bf2e1126c1df8cb6618a80 (patch)
treea5f776a966cf0d153d69ffe3d90f3c7513a727c3 /sql/sql_lex.cc
parent94310faa2e549a480bba595fd6941b4b37f76bca (diff)
parent923fe817e0d7d4ae6ba8fa16d6c5381bd58ac4b9 (diff)
downloadmariadb-git-75b8d4fa08966baa22bf2e1126c1df8cb6618a80.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bg8406
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc29
1 files changed, 25 insertions, 4 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 20f5092c5ce..dc4c8f3727f 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -172,10 +172,9 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex->proc_list.first= 0;
lex->query_tables_own_last= 0;
- if (lex->spfuns.records)
- my_hash_reset(&lex->spfuns);
- if (lex->spprocs.records)
- my_hash_reset(&lex->spprocs);
+ if (lex->sroutines.records)
+ my_hash_reset(&lex->sroutines);
+ lex->sroutines_list.empty();
DBUG_VOID_RETURN;
}
@@ -1572,6 +1571,28 @@ void st_select_lex::print_limit(THD *thd, String *str)
/*
+ Initialize LEX object.
+
+ SYNOPSIS
+ st_lex::st_lex()
+
+ NOTE
+ LEX object initialized with this constructor can be used as part of
+ THD object for which one can safely call open_tables(), lock_tables()
+ and close_thread_tables() functions. But it is not yet ready for
+ statement parsing. On should use lex_start() function to prepare LEX
+ for this.
+*/
+
+st_lex::st_lex()
+ :result(0), sql_command(SQLCOM_END), query_tables_own_last(0)
+{
+ hash_init(&sroutines, system_charset_info, 0, 0, 0, sp_sroutine_key, 0, 0);
+ sroutines_list.empty();
+}
+
+
+/*
Check whether the merging algorithm can be used on this VIEW
SYNOPSIS