summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2004-10-14 02:53:59 +0400
committerkonstantin@mysql.com <>2004-10-14 02:53:59 +0400
commit5abc3de22bbef2e9818a890a61f840fb5daaf1b7 (patch)
tree27ce02a5ecb8610d69b81dc15a3d96a62126e80a /sql/sql_class.h
parentcc57252bb76feab94caf3035a2ca083b0734222f (diff)
downloadmariadb-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_class.h')
-rw-r--r--sql/sql_class.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index aaa81fbe165..f25689aa512 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -565,12 +565,6 @@ public:
void restore_backup_statement(Statement *stmt, Statement *backup);
/* return class type */
virtual Type type() const;
-
- /*
- Cleanup statement parse state (parse tree, lex) after execution of
- a non-prepared SQL statement.
- */
- void end_statement();
};
@@ -1064,6 +1058,12 @@ public:
void nocheck_register_item_tree_change(Item **place, Item *old_value,
MEM_ROOT *runtime_memroot);
void rollback_item_tree_changes();
+
+ /*
+ Cleanup statement parse state (parse tree, lex) and execution
+ state after execution of a non-prepared SQL statement.
+ */
+ void end_statement();
};
/* Flags for the THD::system_thread (bitmap) variable */