diff options
author | unknown <monty@work.mysql.com> | 2001-07-18 23:58:10 +0200 |
---|---|---|
committer | unknown <monty@work.mysql.com> | 2001-07-18 23:58:10 +0200 |
commit | 61c04f0e9c934455eddef0cb97f2f8950980c131 (patch) | |
tree | fb907efd0b1549145b9fc6f82ddd7107f4ab8a55 /mysql-test | |
parent | 90acfb9ff36c796650b40c8b85f2f4042c60d1fc (diff) | |
parent | dece009c8b84f6ee60cf43e32931debc361b932c (diff) | |
download | mariadb-git-61c04f0e9c934455eddef0cb97f2f8950980c131.tar.gz |
merge
myisam/mi_check.c:
Auto merged
myisam/myisamchk.c:
Auto merged
sql/mysqld.cc:
Auto merged
mysql-test/t/bdb.test:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
configure.in:
New version
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/auto_increment.result | 5 | ||||
-rw-r--r-- | mysql-test/r/bdb.result | 11 | ||||
-rw-r--r-- | mysql-test/r/limit.result | 3 | ||||
-rw-r--r-- | mysql-test/r/lock.result | 4 | ||||
-rw-r--r-- | mysql-test/r/rpl_mystery22.result | 4 | ||||
-rw-r--r-- | mysql-test/r/rpl_sporadic_master.result | 12 | ||||
-rw-r--r-- | mysql-test/t/auto_increment.test | 11 | ||||
-rw-r--r-- | mysql-test/t/bdb.test | 15 | ||||
-rw-r--r-- | mysql-test/t/limit.test | 11 | ||||
-rw-r--r-- | mysql-test/t/lock.test | 42 | ||||
-rw-r--r-- | mysql-test/t/rpl_mystery22.test | 43 | ||||
-rw-r--r-- | mysql-test/t/rpl_sporadic_master.test | 21 |
12 files changed, 170 insertions, 12 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index 9ff02d7a7b8..bf6265e5b64 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -55,3 +55,8 @@ ordid ord 2 sdj 3 sdj 1 zzz +a +0 +Table Op Msg_type Msg_text +test.t1 check warning Found row where the auto_increment column has the value 0 +test.t1 check status OK diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index c88b7375aec..89d9c56b3b0 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -511,3 +511,14 @@ id id3 100 2 KINMU_DATE KINMU_DATE +a b +1 1 +1 2 +a b a b +1 1 1 1 +1 1 1 2 +1 2 1 1 +1 2 1 2 +a b +1 1 +1 2 diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result index 0f5586e3b31..6c3a1ed17e4 100644 --- a/mysql-test/r/limit.result +++ b/mysql-test/r/limit.result @@ -20,3 +20,6 @@ a b a b 2 2 3 4 +i +2 +1 diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 7b1be604024..ccd3c02558d 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -4,3 +4,7 @@ Table Op Msg_type Msg_text test.t1 check status OK Table Op Msg_type Msg_text test.t2 check error Table 't2' was not locked with LOCK TABLES +n +4 +n +1 diff --git a/mysql-test/r/rpl_mystery22.result b/mysql-test/r/rpl_mystery22.result new file mode 100644 index 00000000000..f85b057eefa --- /dev/null +++ b/mysql-test/r/rpl_mystery22.result @@ -0,0 +1,4 @@ +n +1 +2 +3 diff --git a/mysql-test/r/rpl_sporadic_master.result b/mysql-test/r/rpl_sporadic_master.result index 414468f0998..ed616c26b67 100644 --- a/mysql-test/r/rpl_sporadic_master.result +++ b/mysql-test/r/rpl_sporadic_master.result @@ -1,7 +1,7 @@ n -1 -2 -3 -4 -5 -6 +10 +11 +12 +13 +14 +15 diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index 1741b51b2d6..b9b8c244699 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -64,3 +64,14 @@ create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null insert into t1 values (NULL,'sdj'),(NULL,'sdj'),(NULL,"abc"),(NULL,'abc'),(NULL,'zzz'),(NULL,'sdj'),(NULL,'abc'); select * from t1; drop table t1; + +# +# Test of auto_increment columns when they are set to 0 +# + +create table t1 (a int not null primary key auto_increment); +insert into t1 values (0); +update t1 set a=0; +select * from t1; +check table t1; +drop table t1; diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index d9e08ed33dc..f0c24722e90 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -715,3 +715,18 @@ CREATE TABLE t2 ( SYAIN_NO char(5) NOT NULL default '',STR_DATE char(8) NOT NULL select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO; select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO; DROP TABLE t1,t2; + +# +# Test problem with joining table to itself on a multi-part unique key +# + +drop table if exists t; +create table t (a int(11) not null, b int(11) not null, unique (a,b)) type=bdb; + +insert into t values (1,1), (1,2); + +select * from t where a = 1; +select t1.*, t2.* from t t1, t t2 where t1.a = t2.a and t2.a = 1; +select * from t where a = 1; + +drop table t; diff --git a/mysql-test/t/limit.test b/mysql-test/t/limit.test index ba075f73d37..112761abd87 100644 --- a/mysql-test/t/limit.test +++ b/mysql-test/t/limit.test @@ -17,3 +17,14 @@ select * from t1; delete from t1 limit 1; select * from t1; drop table t1; + +create table t1 (i int); +insert into t1 (i) values(1); +insert into t1 (i) values(1); +insert into t1 (i) values(1); +delete from t1 limit 1; +update t1 set i=2 limit 1; +delete from t1 limit 0; +update t1 set i=3 limit 0; +select * from t1; +drop table t1; diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test index 385713174d2..77354e63252 100644 --- a/mysql-test/t/lock.test +++ b/mysql-test/t/lock.test @@ -53,3 +53,45 @@ lock tables t1 write; check table t2; unlock tables; drop table t1,t2; + +#test to see if select will get the lock ahead of low priority update +connect (locker,localhost,root,,); +connect (reader,localhost,root,,); +connect (writer,localhost,root,,); + +connection locker; +create table t1(n int); +insert into t1 values (1); +lock tables t1 write; +connection writer; +send update low_priority t1 set n = 4; +connection reader; +--sleep 2 +send select n from t1; +connection locker; +--sleep 2 +unlock tables; +connection writer; +reap; +connection reader; +reap; +drop table t1; + +connection locker; +create table t1(n int); +insert into t1 values (1); +lock tables t1 read; +connection writer; +send update low_priority t1 set n = 4; +connection reader; +--sleep 2 +send select n from t1; +connection locker; +--sleep 2 +unlock tables; +connection writer; +reap; +connection reader; +reap; +drop table t1; + diff --git a/mysql-test/t/rpl_mystery22.test b/mysql-test/t/rpl_mystery22.test new file mode 100644 index 00000000000..3a48ef84dc1 --- /dev/null +++ b/mysql-test/t/rpl_mystery22.test @@ -0,0 +1,43 @@ +# test case to make slave thread get ahead by 22 bytes + +source include/master-slave.inc; +connection master; +# first, cause a duplicate key problem on the slave +create table t1(n int auto_increment primary key); +save_master_pos; +connection slave; +sync_with_master; +insert into t1 values (2); +connection master; +insert into t1 values(NULL); +insert into t1 values(NULL); +save_master_pos; +connection slave; +sleep 1; # there is no way around this sleep - we have to wait until +# the slave tries to run the query, fails and aborts slave thread +delete from t1 where n = 2; +slave start; +sync_with_master; +#now the buggy slave would be confused on the offset but it can replicate +#in order to make it break, we need to stop/start the slave one more time +slave stop; +connection master; +# to be able to really confuse the slave, we need some non-auto-increment +# events in the log +create table t2(n int); +drop table t2; +insert into t1 values(NULL); +save_master_pos; +connection slave; +slave start; +#now the truth comes out - if the slave is buggy, it will never sync because +#the slave thread is not able to read events +sync_with_master; +select * from t1; +#clean up +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + diff --git a/mysql-test/t/rpl_sporadic_master.test b/mysql-test/t/rpl_sporadic_master.test index b22a95612ba..a8d953b94a4 100644 --- a/mysql-test/t/rpl_sporadic_master.test +++ b/mysql-test/t/rpl_sporadic_master.test @@ -1,24 +1,33 @@ -#test to see if replication can continue when master sporadically fails on +# test to see if replication can continue when master sporadically fails on # COM_BINLOG_DUMP and additionally limits the number of events per dump + source include/master-slave.inc; connection master; -drop table if exists t1; +drop table if exists t1,t2; +create table t2(n int); create table t1(n int not null auto_increment primary key); insert into t1 values (NULL),(NULL); truncate table t1; -insert into t1 values (NULL),(NULL); +# We have to use 4 in the following to make this test work with all table types +insert into t1 values (4),(NULL); +save_master_pos; +connection slave; +sync_with_master; +slave stop; +slave start; +connection master; insert into t1 values (NULL),(NULL); flush logs; truncate table t1; -insert into t1 values (NULL),(NULL); -insert into t1 values (NULL),(NULL); +insert into t1 values (10),(NULL); +insert into t1 values (NULL),(NULL) insert into t1 values (NULL),(NULL); save_master_pos; connection slave; sync_with_master; select * from t1; connection master; -drop table t1; +drop table t1,t2; save_master_pos; connection slave; sync_with_master; |