diff options
author | konstantin@mysql.com <> | 2004-10-14 02:53:59 +0400 |
---|---|---|
committer | konstantin@mysql.com <> | 2004-10-14 02:53:59 +0400 |
commit | 5abc3de22bbef2e9818a890a61f840fb5daaf1b7 (patch) | |
tree | 27ce02a5ecb8610d69b81dc15a3d96a62126e80a /sql/sql_lex.h | |
parent | cc57252bb76feab94caf3035a2ca083b0734222f (diff) | |
download | mariadb-git-5abc3de22bbef2e9818a890a61f840fb5daaf1b7.tar.gz |
A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)"
crashes server." The fix makes Item_func_rand prepared-statements
aware plus it fixes the case when RAND is used in prepared
statements and replication is on (as well as several similar issues).
Until now we did not reset THD before every execution of a prepared
statement, so if some execution had set thd->time_zone_used
or thd->rand_used they would not be reset until next mysql_parse.
Some of post-review fixes done.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index d198855a2d3..38cdde019ff 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -369,7 +369,7 @@ public: ulong init_prepare_fake_select_lex(THD *thd); int change_result(select_subselect *result, select_subselect *old_result); - friend void mysql_init_query(THD *thd, uchar *buf, uint length); + friend void lex_start(THD *thd, uchar *buf, uint length); friend int subselect_union_engine::exec(); private: bool create_total_list_n_last_return(THD *thd, st_lex *lex, @@ -508,7 +508,7 @@ public: bool test_limit(); - friend void mysql_init_query(THD *thd, uchar *buf, uint length); + friend void lex_start(THD *thd, uchar *buf, uint length); st_select_lex() {} void make_empty_select() { |