mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
This commit is contained in:
@ -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
|
||||
|
@ -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;
|
||||
|
@ -243,10 +243,6 @@ a
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
|
Reference in New Issue
Block a user