summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-07-08 23:54:48 +0300
committerunknown <monty@mashka.mysql.fi>2003-07-08 23:54:48 +0300
commit531a5d76bf5c38589df89985fa43b6a0d215b28e (patch)
tree6605f287527ecbfa819a64516db88bfd63ff07ea /sql/sql_parse.cc
parent1f3cf79378ce32ef1602c5bc69fd04d1fccc45d3 (diff)
parent0e1d651e8b5e479427b89c5e164499a5eda3993d (diff)
downloadmariadb-git-531a5d76bf5c38589df89985fa43b6a0d215b28e.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1 sql/share/czech/errmsg.txt: Auto merged sql/share/danish/errmsg.txt: Auto merged sql/share/dutch/errmsg.txt: Auto merged sql/share/english/errmsg.txt: Auto merged sql/share/french/errmsg.txt: Auto merged sql/share/german/errmsg.txt: Auto merged sql/share/italian/errmsg.txt: Auto merged sql/share/norwegian-ny/errmsg.txt: Auto merged sql/share/norwegian/errmsg.txt: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/share/portuguese/errmsg.txt: Auto merged sql/share/romanian/errmsg.txt: Auto merged sql/share/serbian/errmsg.txt: Auto merged sql/share/slovak/errmsg.txt: Auto merged sql/share/spanish/errmsg.txt: Auto merged sql/share/swedish/errmsg.txt: Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 00917e296ca..9e670a97e92 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3575,15 +3575,20 @@ mysql_new_select(LEX *lex, bool move_down)
void create_select_for_variable(const char *var_name)
{
+ THD *thd;
LEX *lex;
- LEX_STRING tmp;
+ LEX_STRING tmp, null_lex_string;
DBUG_ENTER("create_select_for_variable");
- lex= current_lex;
+
+ thd= current_thd;
+ lex= &thd->lex;
mysql_init_select(lex);
lex->sql_command= SQLCOM_SELECT;
tmp.str= (char*) var_name;
tmp.length=strlen(var_name);
- add_item_to_list(lex->thd, get_system_var(OPT_SESSION, tmp));
+ bzero((char*) &null_lex_string.str, sizeof(null_lex_string));
+ add_item_to_list(thd, get_system_var(thd, OPT_SESSION, tmp,
+ null_lex_string));
DBUG_VOID_RETURN;
}