2003-01-06 00:48:59 +01:00
|
|
|
drop table if exists t1,t2;
|
|
|
|
drop database if exists mysqltest;
|
2001-09-28 07:05:54 +02:00
|
|
|
create temporary table t1(n int not null primary key);
|
|
|
|
create table t2(n int);
|
|
|
|
insert into t2 values(3);
|
|
|
|
select * from t1;
|
2001-03-23 04:04:59 +01:00
|
|
|
n
|
|
|
|
3
|
2001-09-28 07:05:54 +02:00
|
|
|
flush tables with read lock;
|
|
|
|
drop table t2;
|
2005-03-16 08:40:19 +01:00
|
|
|
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
2006-10-03 15:33:44 +02:00
|
|
|
drop table t2;
|
2001-09-28 07:05:54 +02:00
|
|
|
unlock tables;
|
2001-12-22 14:13:31 +01:00
|
|
|
create database mysqltest;
|
|
|
|
create table mysqltest.t1(n int);
|
|
|
|
insert into mysqltest.t1 values (23);
|
2001-09-28 07:05:54 +02:00
|
|
|
flush tables with read lock;
|
2006-10-03 15:33:44 +02:00
|
|
|
drop database mysqltest;
|
2001-12-22 14:13:31 +01:00
|
|
|
select * from mysqltest.t1;
|
2001-06-02 01:43:32 +02:00
|
|
|
n
|
2001-06-21 23:59:51 +02:00
|
|
|
23
|
2001-09-28 07:05:54 +02:00
|
|
|
unlock tables;
|
|
|
|
create table t1 (n int);
|
|
|
|
flush tables with read lock;
|
|
|
|
insert into t1 values (345);
|
|
|
|
select * from t1;
|
2001-06-21 23:59:51 +02:00
|
|
|
n
|
2001-06-02 01:43:32 +02:00
|
|
|
345
|
2001-09-28 07:05:54 +02:00
|
|
|
drop table t1;
|
2005-08-05 15:37:24 +02:00
|
|
|
create table t1 (c1 int);
|
|
|
|
lock table t1 write;
|
|
|
|
flush tables with read lock;
|
|
|
|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
|
|
|
lock table t1 read;
|
|
|
|
flush tables with read lock;
|
|
|
|
lock table t1 write;
|
|
|
|
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
|
|
|
lock table t1 read;
|
|
|
|
lock table t1 write;
|
|
|
|
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
|
|
|
unlock tables;
|
|
|
|
create table t2 (c1 int);
|
|
|
|
create table t3 (c1 int);
|
|
|
|
lock table t1 read, t2 read, t3 write;
|
|
|
|
flush tables with read lock;
|
|
|
|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
|
|
|
lock table t1 read, t2 read, t3 read;
|
|
|
|
flush tables with read lock;
|
|
|
|
unlock tables;
|
|
|
|
drop table t1, t2, t3;
|
2006-05-24 16:21:35 +02:00
|
|
|
create table t1 (c1 int);
|
|
|
|
create table t2 (c1 int);
|
|
|
|
lock table t1 write;
|
Update tests and result files after running with new mysqltest that better detects problems with test files
mysql-test/r/csv.result:
Update after add of missing semicolon
mysql-test/r/drop.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_block_commit.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_read_lock_kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/grant2.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/handler.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/innodb_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/lock_multi.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/multi_update.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/mysqltest.result:
Update result
mysql-test/r/query_cache.result:
Update after add of missing semicolon
mysql-test/r/query_cache_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp-threads.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp_notembedded.result:
Update after add of missing semicolon
mysql-test/r/type_blob.result:
Remove extra drop table
mysql-test/t/csv.test:
Add missing semicolon
mysql-test/t/query_cache.test:
Add missing semicolon
mysql-test/t/sp-error.test:
Remove "tab" from end of error declaration
mysql-test/t/sp.test:
Wrong delimiter, used ; instead of |
mysql-test/t/sp_notembedded.test:
Wrong delimiter, used ; instead of |
mysql-test/t/view_grant.test:
An incomplete error name specification was used.
2006-10-04 13:09:37 +02:00
|
|
|
flush tables with read lock;
|
|
|
|
insert into t2 values(1);
|
2006-05-24 16:21:35 +02:00
|
|
|
unlock tables;
|
|
|
|
drop table t1, t2;
|
2007-11-22 13:18:19 +01:00
|
|
|
drop table if exists t1, t2;
|
|
|
|
set session low_priority_updates=1;
|
|
|
|
create table t1 (a int);
|
|
|
|
create table t2 (b int);
|
|
|
|
lock tables t1 write;
|
|
|
|
flush tables with read lock;
|
|
|
|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
|
|
|
unlock tables;
|
|
|
|
lock tables t1 read, t2 write;
|
|
|
|
flush tables with read lock;
|
|
|
|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
|
|
|
unlock tables;
|
|
|
|
lock tables t1 read;
|
|
|
|
flush tables with read lock;
|
|
|
|
unlock tables;
|
|
|
|
drop table t1, t2;
|
|
|
|
set session low_priority_updates=default;
|
2008-03-19 12:51:22 +01:00
|
|
|
select benchmark(200, (select sin(1))) > 1000;
|
2007-06-17 06:56:33 +02:00
|
|
|
End of 5.0 tests
|
|
|
|
set @old_general_log= @@general_log;
|
|
|
|
set @old_read_only= @@read_only;
|
|
|
|
set global general_log= on;
|
|
|
|
flush tables with read lock;
|
|
|
|
flush logs;
|
|
|
|
unlock tables;
|
|
|
|
set global read_only=1;
|
|
|
|
flush logs;
|
|
|
|
unlock tables;
|
|
|
|
flush tables with read lock;
|
|
|
|
flush logs;
|
|
|
|
unlock tables;
|
|
|
|
set global general_log= @old_general_log;
|
|
|
|
set global read_only= @old_read_only;
|
|
|
|
End of 5.1 tests
|