mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
fce29f66fb
mysql-test/r/delete.result: test of delete error mysql-test/t/delete.test: test of delete error
47 lines
No EOL
1.3 KiB
Text
47 lines
No EOL
1.3 KiB
Text
#
|
|
# Check for problems with delete
|
|
#
|
|
|
|
drop table if exists t1;
|
|
CREATE TABLE t1 (a tinyint(3), b tinyint(5));
|
|
INSERT INTO t1 VALUES (1,1);
|
|
INSERT LOW_PRIORITY INTO t1 VALUES (1,2);
|
|
INSERT INTO t1 VALUES (1,3);
|
|
DELETE from t1 where a=1 limit 1;
|
|
DELETE LOW_PRIORITY from t1 where a=1;
|
|
|
|
INSERT INTO t1 VALUES (1,1);
|
|
DELETE from t1;
|
|
LOCK TABLE t1 write;
|
|
INSERT INTO t1 VALUES (1,2);
|
|
DELETE from t1;
|
|
UNLOCK TABLES;
|
|
INSERT INTO t1 VALUES (1,2);
|
|
SET AUTOCOMMIT=0;
|
|
DELETE from t1;
|
|
SET AUTOCOMMIT=1;
|
|
drop table t1;
|
|
|
|
#
|
|
# Test of delete when the delete will cause a node to disappear and reappear
|
|
# (This assumes a block size of 1024)
|
|
#
|
|
|
|
create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
|
|
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23);
|
|
delete from t1 where a=26;
|
|
drop table t1;
|
|
create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
|
|
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
|
|
delete from t1 where a=27;
|
|
drop table t1;
|
|
|
|
drop table if exists t;
|
|
CREATE TABLE `t` (
|
|
`i` int(10) NOT NULL default '0',
|
|
`i2` int(10) NOT NULL default '0',
|
|
PRIMARY KEY (`i`)
|
|
) TYPE=MyISAM CHARSET=latin1;
|
|
-- error 1054
|
|
DELETE FROM t USING t WHERE post='1';
|
|
drop table if exists t; |