From d0acda900c1b2f8f242a81097409692a691a280e Mon Sep 17 00:00:00 2001 From: "ram@mysql.r18.ru" <> Date: Wed, 10 Sep 2003 11:19:01 +0500 Subject: [PATCH] Fix for the fix for the bug #1209: SELECT DATABASE(). --- sql/sql_db.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 343eb6e42f2..0d0d1d897d0 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -392,7 +392,10 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) exit: start_waiting_global_read_lock(thd); if (thd->db && !strcmp(thd->db, db)) + { + x_free(thd->db); thd->db= 0; + } exit2: VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));