mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	preserve originating server id in Intvar events to avoid inifinite loops include/mysqld_error.h: new error messages mysql-test/r/drop.result: updated result mysql-test/r/flush.result: updated result mysql-test/t/drop.test: test for proper handling of drop/create database when holding global read lock mysql-test/t/flush.test: test to see if other thread would block on drop database if we are holding global read lock sql/log.cc: preserve originating server id in Intvar log event sql/share/czech/errmsg.txt: new error messages sql/share/danish/errmsg.txt: new error messages sql/share/dutch/errmsg.txt: new error messages sql/share/english/errmsg.txt: new error messages sql/share/estonian/errmsg.txt: new error messages sql/share/french/errmsg.txt: new error messages sql/share/german/errmsg.txt: new error messages sql/share/greek/errmsg.txt: new error messages sql/share/hungarian/errmsg.txt: new error messages sql/share/italian/errmsg.txt: new error messages sql/share/japanese/errmsg.txt: new error messages sql/share/korean/errmsg.txt: new error messages sql/share/norwegian-ny/errmsg.txt: new error messages sql/share/norwegian/errmsg.txt: new error messages sql/share/polish/errmsg.txt: new error messages sql/share/portuguese/errmsg.txt: new error messages sql/share/romanian/errmsg.txt: new error messages sql/share/russian/errmsg.txt: new error messages sql/share/slovak/errmsg.txt: new error messages sql/share/spanish/errmsg.txt: new error messages sql/share/swedish/errmsg.txt: new error messages sql/slave.cc: fixed typo in comment sql/sql_db.cc: global read lock should block drop/create database
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| connect (con1,localhost,root,,);
 | |
| connect (con2,localhost,root,,);
 | |
| connection con1;
 | |
| drop table if exists t1;
 | |
| create temporary table t1(n int not null primary key);
 | |
| drop table if exists t2;
 | |
| create table t2(n int);
 | |
| insert into t2 values(3);
 | |
| let $1=100;
 | |
| while ($1)
 | |
| {
 | |
|  connection con1;
 | |
|  send replace into t1 select n from t2;
 | |
|  connection con2;
 | |
|  send flush tables;
 | |
|  connection con1;
 | |
|  reap;
 | |
|  connection con2;
 | |
|  reap;
 | |
|  dec $1;
 | |
| }
 | |
| 
 | |
| connection con1;
 | |
| select * from t1;
 | |
| connection con2;
 | |
| flush tables with read lock;
 | |
| --error 1099;
 | |
| drop table t2;
 | |
| connection con1;
 | |
| send drop table t2;
 | |
| connection con2;
 | |
| unlock tables;
 | |
| connection con1;
 | |
| reap;
 | |
| 
 | |
| #test if drop database will wait until we release the global read lock
 | |
| connection con1;
 | |
| drop database if exists foo;
 | |
| create database foo;
 | |
| create table foo.t1(n int);
 | |
| insert into foo.t1 values (23);
 | |
| flush tables with read lock;
 | |
| connection con2;
 | |
| send drop database foo;
 | |
| connection con1;
 | |
| select * from foo.t1;
 | |
| unlock tables;
 | |
| connection con2;
 | |
| reap;
 | |
| 
 | |
| # test if dirty close releases global read lock
 | |
| connection con1;
 | |
| create table t1 (n int);
 | |
| flush tables with read lock;
 | |
| dirty_close con1;
 | |
| connection con2;
 | |
| insert into t1 values (345);
 | |
| select * from t1;
 | |
| drop table t1;
 |