summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-19 02:00:26 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-19 02:00:26 +0200
commit88df4e732605df862dd264f65788ab1d58a9b153 (patch)
treeb0e673f712bc31db28ac10bae4d5f3302fd63710 /sql/sql_db.cc
parentb2ba400f07d843903ab6efd946940a6e6e76fc3c (diff)
downloadmariadb-git-88df4e732605df862dd264f65788ab1d58a9b153.tar.gz
Fixes cases where thd->query was not protected.
This fixes a problem with SHOW PROCESSLIST sql/log_event.cc: Fixes cases where thd->query was not protected sql/sql_acl.cc: Table privileges was not reset on FLUSH PRIVILEGES if tables_priv was empty sql/sql_db.cc: Fixes cases where thd->query was not protected
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index ffb02cd36c1..4cb46c00bed 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -78,9 +78,9 @@ int mysql_create_db(THD *thd, char *db, uint create_options, bool silent)
if (!thd->query)
{
/* The client used the old obsolete mysql_create_db() call */
- thd->query_length = (uint) (strxmov(path,"create database `", db, "`",
- NullS) - path);
- thd->query = path;
+ thd->query_length= (uint) (strxmov(path,"create database `", db, "`",
+ NullS) - path);
+ thd->query= path;
}
{
mysql_update_log.write(thd,thd->query, thd->query_length);
@@ -93,7 +93,7 @@ int mysql_create_db(THD *thd, char *db, uint create_options, bool silent)
if (thd->query == path)
{
VOID(pthread_mutex_lock(&LOCK_thread_count));
- thd->query = 0; // just in case
+ thd->query= 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
}
send_ok(&thd->net, result);
@@ -182,7 +182,7 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
if (thd->query == path)
{
VOID(pthread_mutex_lock(&LOCK_thread_count));
- thd->query = 0; // just in case
+ thd->query= 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
}
send_ok(&thd->net,(ulong) deleted);