summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/func_test.test1
-rw-r--r--mysql-test/t/innodb.test18
-rw-r--r--mysql-test/t/lock_tables_lost_commit.test2
-rw-r--r--mysql-test/t/multi_update.test1
4 files changed, 21 insertions, 1 deletions
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.
#