summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-05-14 16:48:56 +0300
committerunknown <heikki@hundin.mysql.fi>2004-05-14 16:48:56 +0300
commit7bd91ac065746ba673f24d39c646dcbf7cb74386 (patch)
treeb754d8cebf93bbb70cb8401e05e31ea14aeecf85 /sql/sql_db.cc
parent2d743fe227f469c0dbaba803e818b4e23a3e2a76 (diff)
downloadmariadb-git-7bd91ac065746ba673f24d39c646dcbf7cb74386.tar.gz
Many files:
Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query sql/sql_class.h: Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query sql/ha_innodb.cc: Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query sql/log_event.cc: Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query sql/slave.cc: Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query sql/sql_db.cc: Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query sql/sql_parse.cc: Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query sql/sql_show.cc: Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 7dd458a3b5d..865b2e1328f 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -95,6 +95,7 @@ int mysql_create_db(THD *thd, char *db, uint create_options, bool silent)
{
VOID(pthread_mutex_lock(&LOCK_thread_count));
thd->query= 0;
+ thd->query_length= 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
}
send_ok(&thd->net, result);
@@ -202,6 +203,7 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
{
VOID(pthread_mutex_lock(&LOCK_thread_count));
thd->query= 0;
+ thd->query_length= 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
}
send_ok(&thd->net,(ulong) deleted);