1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fixed length of current database name if it is dropped (BUG#1986)

This commit is contained in:
bell@sanja.is.com.ua
2003-12-04 23:57:10 +02:00
parent 84acc2054f
commit ccb07a4fbb
3 changed files with 24 additions and 2 deletions

View File

@ -809,4 +809,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;

View File

@ -585,4 +585,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;

View File

@ -409,7 +409,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<7A>'"
'h4zI<7A><EFBFBD>'"
- segfault
- hang in "free(vio)" (yes!) in the I/O or SQL slave threads (so slave
server hangs at shutdown etc).
@ -419,6 +419,7 @@ exit:
if (!(thd->slave_thread)) /* a slave thread will free it itself */
x_free(thd->db);
thd->db= 0;
thd->db_length= 0;
}
exit2:
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));