diff options
author | monty@mashka.mysql.fi <> | 2004-02-22 11:01:28 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2004-02-22 11:01:28 +0200 |
commit | 1ae05760acade0af82ff3e73ad1a3145bea26bf7 (patch) | |
tree | 5cbf5acd9871f4013aae8ed412d72912dbc4706f /mysql-test | |
parent | e17e1901f29507e6bb6b4c82d0ed37f4f1612946 (diff) | |
parent | 7084e3642cb29be2e879f30b31a4e01e05f8c3ea (diff) | |
download | mariadb-git-1ae05760acade0af82ff3e73ad1a3145bea26bf7.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_test.result | 3 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 13 | ||||
-rw-r--r-- | mysql-test/r/negation_elimination.result | 4 | ||||
-rw-r--r-- | mysql-test/t/func_test.test | 1 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 18 | ||||
-rw-r--r-- | mysql-test/t/lock_tables_lost_commit.test | 2 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 1 |
7 files changed, 37 insertions, 5 deletions
diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 7d0a76424fe..3a945c0826f 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -52,6 +52,9 @@ Note 1003 select high_priority (3 ^ 11) AS `3 ^ 11`,(1 ^ 1) AS `1 ^ 1`,(1 ^ 0) A select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; 1 XOR 1 1 XOR 0 0 XOR 1 0 XOR 0 NULL XOR 1 1 XOR NULL 0 XOR NULL 0 1 1 0 NULL NULL NULL +select 1 like 2 xor 2 like 1; +1 like 2 xor 2 like 1 +0 select 10 % 7, 10 mod 7, 10 div 3; 10 % 7 10 mod 7 10 div 3 3 3 3 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 57ad5ef79a2..4cec61faf0d 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1332,6 +1332,19 @@ drop table t1; CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB; CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB; drop table t2,t1; +create table `t1` (`id` int( 11 ) not null ,primary key ( `id` )) engine = innodb; +insert into `t1`values ( 1 ) ; +create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb; +insert into `t2`values ( 1 ) ; +create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb; +insert into `t3`values ( 1 ) ; +delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails +update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails +update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +ERROR 42S02: Unknown table 't1' in where clause +drop table t3,t2,t1; CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB; CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx (stamp))ENGINE=InnoDB; diff --git a/mysql-test/r/negation_elimination.result b/mysql-test/r/negation_elimination.result index 8ca8ae2f12e..a3a2bad7ec6 100644 --- a/mysql-test/r/negation_elimination.result +++ b/mysql-test/r/negation_elimination.result @@ -243,10 +243,6 @@ a 3 4 5 -6 -7 -8 -9 10 11 12 diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index 44047491862..e7bcd81a15e 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -21,6 +21,7 @@ select -1.49 or -1.49,0.6 or 0.6; select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; explain extended select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; +select 1 like 2 xor 2 like 1; select 10 % 7, 10 mod 7, 10 div 3; explain extended select 10 % 7, 10 mod 7, 10 div 3; select (1 << 64)-1, ((1 << 64)-1) DIV 1, ((1 << 64)-1) DIV 2; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index f931b4bb798..5602a57905b 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -942,6 +942,24 @@ CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN K drop table t2,t1; # +# Test of multi updated and foreign keys +# + +create table `t1` (`id` int( 11 ) not null ,primary key ( `id` )) engine = innodb; +insert into `t1`values ( 1 ) ; +create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb; +insert into `t2`values ( 1 ) ; +create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb; +insert into `t3`values ( 1 ) ; +--error 1217 +delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +--error 1217 +update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +--error 1109 +update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; +drop table t3,t2,t1; + +# # Test timestamps # diff --git a/mysql-test/t/lock_tables_lost_commit.test b/mysql-test/t/lock_tables_lost_commit.test index 22b666cbc86..8c1ad97c0cc 100644 --- a/mysql-test/t/lock_tables_lost_commit.test +++ b/mysql-test/t/lock_tables_lost_commit.test @@ -1,5 +1,7 @@ # This is a test for bug 578 +-- source include/have_innodb.inc + connect (con1,localhost,root,,); connect (con2,localhost,root,,); diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index e52b373a4a6..eb77734300f 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -310,7 +310,6 @@ delete t1, t2 from t2,t1 drop table t1,t2; - # # Test for bug #1820. # |