summaryrefslogtreecommitdiff
path: root/sql/event_data_objects.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2009-09-08 00:50:10 +0400
committerSergey Petrunya <psergey@askmonty.org>2009-09-08 00:50:10 +0400
commit29f0dcb56337a3e352ad7a70dcff6b25bb605325 (patch)
tree84935c21dc958724ae7dcbeeca0c0f08986fc430 /sql/event_data_objects.cc
parent915a624cbcb58a10a2cfb2e2e4fd5029191fa86a (diff)
parent8a2454f8e9fce648272577fcf8006ae6e6806cf9 (diff)
downloadmariadb-git-29f0dcb56337a3e352ad7a70dcff6b25bb605325.tar.gz
Merge MySQL->MariaDB
* Finished Monty and Jani's merge * Some InnoDB tests still fail (because it's old xtradb code run against newer testsuite). They are expected to go after mergning with the latest xtradb.
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r--sql/event_data_objects.cc20
1 files changed, 4 insertions, 16 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index fdc18954c55..d11aa67ac65 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -1429,13 +1429,7 @@ Event_job_data::execute(THD *thd, bool drop)
thd->variables.sql_mode= sql_mode;
thd->variables.time_zone= time_zone;
- /*
- Peculiar initialization order is a crutch to avoid races in SHOW
- PROCESSLIST which reads thd->{query/query_length} without a mutex.
- */
- thd->query_length= 0;
- thd->query= sp_sql.c_ptr_safe();
- thd->query_length= sp_sql.length();
+ thd->set_query(sp_sql.c_ptr_safe(), sp_sql.length());
{
Parser_state parser_state(thd, thd->query, thd->query_length);
@@ -1496,13 +1490,8 @@ end_no_lex_start:
else
{
ulong saved_master_access;
- /*
- Peculiar initialization order is a crutch to avoid races in SHOW
- PROCESSLIST which reads thd->{query/query_length} without a mutex.
- */
- thd->query_length= 0;
- thd->query= sp_sql.c_ptr_safe();
- thd->query_length= sp_sql.length();
+
+ thd->set_query(sp_sql.c_ptr_safe(), sp_sql.length());
/*
NOTE: even if we run in read-only mode, we should be able to lock
@@ -1527,8 +1516,7 @@ end_no_lex_start:
thd->end_statement();
thd->cleanup_after_query();
/* Avoid races with SHOW PROCESSLIST */
- thd->query_length= 0;
- thd->query= NULL;
+ thd->set_query(NULL, 0);
DBUG_PRINT("info", ("EXECUTED %s.%s ret: %d", dbname.str, name.str, ret));