~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/include/mix1.inc

  • Committer: Brian Aker
  • Date: 2009-06-05 23:10:06 UTC
  • mto: This revision was merged to the branch mainline in revision 1055.
  • Revision ID: brian@gaz-20090605231006-01nyw7pfpj2z2v8p
Remove guts in parser for LOCK TABLE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
577
577
DROP TABLE t1,t2,t3;
578
578
 
579
579
#
580
 
# Bug #29154: LOCK TABLES is not atomic when >1 InnoDB tables are locked
581
 
#
582
 
 
583
 
CREATE TABLE t1 (a INT) ENGINE=InnoDB; 
584
 
CREATE TABLE t2 (a INT) ENGINE=InnoDB; 
585
 
 
586
 
CONNECT (c1,localhost,root,,);
587
 
CONNECT (c2,localhost,root,,);
588
 
 
589
 
--echo switch to connection c1
590
 
CONNECTION c1;
591
 
SET AUTOCOMMIT=0;
592
 
INSERT INTO t2 VALUES (1);
593
 
 
594
 
--echo switch to connection c2
595
 
CONNECTION c2;
596
 
SET AUTOCOMMIT=0;
597
 
--error ER_LOCK_WAIT_TIMEOUT
598
 
LOCK TABLES t1 READ, t2 READ;
599
 
 
600
 
--echo switch to connection c1
601
 
CONNECTION c1;
602
 
COMMIT;
603
 
INSERT INTO t1 VALUES (1);
604
 
 
605
 
--echo switch to connection default
606
 
CONNECTION default;
607
 
SET AUTOCOMMIT=default;
608
 
DISCONNECT c1;
609
 
DISCONNECT c2;
610
 
DROP TABLE t1,t2;
611
 
 
612
 
#
613
580
# Bug #25798: a query with forced index merge returns wrong result 
614
581
#
615
582
 
742
709
--source include/innodb_rollback_on_timeout.inc
743
710
 
744
711
#
745
 
# Bug#27296 Assertion in ALTER TABLE SET DEFAULT in Linux Debug build
746
 
# (possible deadlock).
747
 
#
748
 
# The bug is applicable only to a transactoinal table.
749
 
# Cover with tests behavior that no longer causes an
750
 
# assertion.
751
 
#
752
 
--disable_warnings
753
 
drop table if exists t1;
754
 
--enable_warnings
755
 
create table t1 (a int) engine=innodb;
756
 
alter table t1 alter a set default 1;
757
 
drop table t1;
758
 
 
759
 
--echo
760
 
--echo Bug#24918 drop table and lock / inconsistent between 
761
 
--echo perm and temp tables
762
 
--echo
763
 
--echo Check transactional tables under LOCK TABLES
764
 
--echo
765
 
--disable_warnings
766
 
drop table if exists t24918, t24918_tmp, t24918_trans, t24918_trans_tmp, 
767
 
t24918_access;
768
 
--enable_warnings
769
 
create table t24918_access (id int);
770
 
create table t24918 (id int) engine=myisam;
771
 
create temporary table t24918_tmp (id int) engine=myisam;
772
 
create table t24918_trans (id int) engine=innodb;
773
 
create temporary table t24918_trans_tmp (id int) engine=innodb;
774
 
 
775
 
lock table t24918 write, t24918_tmp write, t24918_trans write, t24918_trans_tmp write;
776
 
drop table t24918;
777
 
--error ER_TABLE_NOT_LOCKED
778
 
select * from t24918_access;
779
 
drop table t24918_trans;
780
 
--error ER_TABLE_NOT_LOCKED
781
 
select * from t24918_access;
782
 
drop table t24918_trans_tmp;
783
 
--error ER_TABLE_NOT_LOCKED
784
 
select * from t24918_access;
785
 
drop table t24918_tmp;
786
 
--error ER_TABLE_NOT_LOCKED
787
 
select * from t24918_access;
788
 
unlock tables;
789
 
 
790
 
drop table t24918_access;
791
 
#
792
712
# Bug #28591: MySQL need not sort the records in case of ORDER BY
793
713
# primary_key on InnoDB table
794
714
#
1051
971
 
1052
972
 
1053
973
#
1054
 
# Tests for bug #28415 "Some ALTER TABLE statements no longer work
1055
 
# under LOCK TABLES" and some aspects of fast ALTER TABLE behaviour
1056
 
# for transactional tables.
1057
 
#
1058
 
--disable_warnings
1059
 
drop table if exists t1, t2;
1060
 
--enable_warnings
1061
 
create table t1 (i int);
1062
 
alter table t1 modify i int default 1;
1063
 
alter table t1 modify i int default 2, rename t2;
1064
 
lock table t2 write;
1065
 
alter table t2 modify i int default 3;
1066
 
unlock tables;
1067
 
lock table t2 write;
1068
 
alter table t2 modify i int default 4, rename t1;
1069
 
unlock tables;
1070
 
drop table t1;
1071
 
 
1072
 
 
1073
 
1074
 
# Some more tests for ALTER TABLE and LOCK TABLES for transactional tables.
1075
 
#
1076
 
# Table which is altered under LOCK TABLES should stay in list of locked
1077
 
# tables and be available after alter takes place unless ALTER contains
1078
 
# RENAME clause. We should see the new definition of table, of course.
1079
 
# Before 5.1 this behavior was inconsistent across the platforms and
1080
 
# different engines. See also tests in alter_table.test
1081
 
#
1082
 
--disable_warnings
1083
 
drop table if exists t1;
1084
 
--enable_warnings
1085
 
create table t1 (i int);
1086
 
insert into t1 values ();
1087
 
lock table t1 write;
1088
 
# Example of so-called 'fast' ALTER TABLE
1089
 
alter table t1 modify i int default 1;
1090
 
insert into t1 values ();
1091
 
select * from t1;
1092
 
# And now full-blown ALTER TABLE
1093
 
alter table t1 change i c char(10) default "Two";
1094
 
insert into t1 values ();
1095
 
select * from t1;
1096
 
unlock tables;
1097
 
select * from t1;
1098
 
drop tables t1;
1099
 
 
1100
 
#
1101
974
# Bug#29310: An InnoDB table was updated when the data wasn't actually changed.
1102
975
#
1103
976
create table t1(f1 varchar(5) unique, f2 timestamp NOT NULL DEFAULT