527
527
SELECT * FROM t3 WHERE a = 'uk';
529
529
DROP TABLE t1,t2,t3;
530
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
531
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
532
switch to connection c1
534
INSERT INTO t2 VALUES (1);
535
switch to connection c2
537
LOCK TABLES t1 READ, t2 READ;
538
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
539
switch to connection c1
541
INSERT INTO t1 VALUES (1);
542
switch to connection default
543
SET AUTOCOMMIT=default;
545
530
CREATE TABLE t1 (
546
531
id int NOT NULL auto_increment PRIMARY KEY,
713
drop table if exists t1;
714
create table t1 (a int) engine=innodb;
715
alter table t1 alter a set default 1;
718
Bug#24918 drop table and lock / inconsistent between
721
Check transactional tables under LOCK TABLES
723
drop table if exists t24918, t24918_tmp, t24918_trans, t24918_trans_tmp,
725
create table t24918_access (id int);
726
create table t24918 (id int) engine=myisam;
727
create temporary table t24918_tmp (id int) engine=myisam;
728
create table t24918_trans (id int) engine=innodb;
729
create temporary table t24918_trans_tmp (id int) engine=innodb;
730
lock table t24918 write, t24918_tmp write, t24918_trans write, t24918_trans_tmp write;
732
select * from t24918_access;
733
ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
734
drop table t24918_trans;
735
select * from t24918_access;
736
ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
737
drop table t24918_trans_tmp;
738
select * from t24918_access;
739
ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
740
drop table t24918_tmp;
741
select * from t24918_access;
742
ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
744
drop table t24918_access;
745
698
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a), KEY bkey (b)) ENGINE=InnoDB;
746
699
INSERT INTO t1 VALUES (1,2),(3,2),(2,2),(4,2),(5,2),(6,2),(7,2),(8,2);
747
700
INSERT INTO t1 SELECT a + 8, 2 FROM t1;
1302
drop table if exists t1, t2;
1303
create table t1 (i int);
1304
alter table t1 modify i int default 1;
1305
alter table t1 modify i int default 2, rename t2;
1306
lock table t2 write;
1307
alter table t2 modify i int default 3;
1309
lock table t2 write;
1310
alter table t2 modify i int default 4, rename t1;
1313
drop table if exists t1;
1314
create table t1 (i int);
1315
insert into t1 values ();
1316
lock table t1 write;
1317
alter table t1 modify i int default 1;
1318
insert into t1 values ();
1323
alter table t1 change i c char(10) default "Two";
1324
insert into t1 values ();
1337
1255
create table t1(f1 varchar(5) unique, f2 timestamp NOT NULL DEFAULT
1338
1256
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
1339
1257
insert into t1(f1) values(1);