summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-01-17 10:02:01 +0200
committerunknown <bell@sanja.is.com.ua>2004-01-17 10:02:01 +0200
commite0bd7faf5bc2845f49f60d067579a20092bf62b6 (patch)
treed280a2988c0e2b39555dbdb6b26e22103205af71
parentd5191e8026c75f5e8a6228bae720a5456a3e347d (diff)
parent8c75a406722c41ac12adeefa60543d27d7460734 (diff)
downloadmariadb-git-e0bd7faf5bc2845f49f60d067579a20092bf62b6.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-drop-4.1 mysql-test/r/query_cache.result: Auto merged mysql-test/t/query_cache.test: Auto merged sql/sql_db.cc: Auto merged
-rw-r--r--mysql-test/r/query_cache.result8
-rw-r--r--mysql-test/t/query_cache.test13
-rw-r--r--sql/sql_db.cc5
3 files changed, 24 insertions, 2 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index fe2ded691d4..49ae082dead 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -816,4 +816,12 @@ show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 4
DROP TABLE t1;
+CREATE TABLE t1 (a int(1));
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+SELECT * FROM test.t1;
+a
+USE test;
+DROP TABLE t1;
SET GLOBAL query_cache_size=0;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index d7681e9c2ec..dba5619b777 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -589,4 +589,17 @@ show status like "Qcache_queries_in_cache";
# Keep things tidy
#
DROP TABLE t1;
+
+#
+# DROP current database test
+#
+CREATE TABLE t1 (a int(1));
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+SELECT * FROM test.t1;
+USE test;
+DROP TABLE t1;
+
+
SET GLOBAL query_cache_size=0;
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 08f9ace529d..697859eb264 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -408,7 +408,7 @@ exit:
when the slave is replicating a DROP DATABASE:
- garbage characters in the error message:
"Error 'Can't drop database 'test2'; database doesn't exist' on query
- 'h4zIż'"
+ 'h4zI©'"
- segfault
- hang in "free(vio)" (yes!) in the I/O or SQL slave threads (so slave
server hangs at shutdown etc).
@@ -417,7 +417,8 @@ exit:
{
if (!(thd->slave_thread)) /* a slave thread will free it itself */
x_free(thd->db);
- thd->db= 0;
+ thd->db= 0;
+ thd->db_length= 0;
}
exit2:
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));