create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 order by t1.id desc limit 3;
select * from t1;
id v 32 23 14
select * from t2;
id v 66
drop table if exists t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 order by t1.id desc;
select * from t1;
id v
select * from t2;
id v
drop table if exists t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 limit 2;
select * from t1;
id v 32 23 14
select * from t2;
id v 23 66
create table t3 (a int primary key, b text);
insert into t3 (a, b) values (1, 'hello');
delete from t3 where b = '';
drop table t3;
drop table if exists t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 where t1.id=t2.id;
select * from t1;
id v 41 14
select * from t2;
id v 55 66
drop table if exists t1;
create table t1(a INT);
insert into t1 values (1),(2),(3); set session sql_buffer_result=1;
delete t1 from (select sum(a) a from t1) x,t1; set session sql_buffer_result=default;
select * from t1;
a
drop table t1;
drop table if exists t1, t2;
Warnings:
Note 1051 Unknown table 'test.t1'
create table t1(id1 smallint(5), field char(5));
create table t2(id2 smallint(5), field char(5));
insert into t1 values (1, 'a'), (2, 'aa');
insert into t2 values (1, 'b'), (2, 'bb');
update t2 inner join t1 on t1.id1=t2.id2 set t2.field=t1.field where 0=1;
update t2, t1 set t2.field=t1.field where t1.id1=t2.id2 and0=1;
delete t1, t2 from t2 inner join t1 on t1.id1=t2.id2 where 0=1;
drop table t1, t2; set session sql_buffer_result=1;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 order by t1.id desc limit 3;
select * from t1;
id v 32 23 14
select * from t2;
id v 66
drop table if exists t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 order by t1.id desc;
select * from t1;
id v
select * from t2;
id v
drop table if exists t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 limit 2;
select * from t1;
id v 32 23 14
select * from t2;
id v 23 66
create table t3 (a int primary key, b text);
insert into t3 (a, b) values (1, 'hello');
delete from t3 where b = '';
drop table t3;
drop table if exists t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (4,1),(3,2),(2,3),(1,4);
insert into t2 (id, v) values (5,5),(3,2),(2,3),(6,6);
select * from t1;
id v 41 32 23 14
select * from t2;
id v 55 32 23 66
delete t1.*, t2.* from t1, t2 where t1.id=t2.id;
select * from t1;
id v 41 14
select * from t2;
id v 55 66
drop table if exists t1, t2;
create table t1(id1 smallint(5), field char(5));
create table t2(id2 smallint(5), field char(5));
insert into t1 values (1, 'a'), (2, 'aa');
insert into t2 values (1, 'b'), (2, 'bb');
update t2 inner join t1 on t1.id1=t2.id2 set t2.field=t1.field where 0=1;
update t2, t1 set t2.field=t1.field where t1.id1=t2.id2 and0=1;
delete t1, t2 from t2 inner join t1 on t1.id1=t2.id2 where 0=1;
drop table t1, t2; set session sql_buffer_result=default;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (2,3),(1,4);
insert into t2 (id, v) values (5,5),(6,6);
select * from t1;
id v 23 14
select * from t2;
id v 55 66
select t1.*, t2.* from t1, t2 order by t1.id, t2.id limit 1;
id v id v 1455
delete t1.*, t2.* from t1, t2 order by t1.id, t2.id limit 1;
select * from t1;
id v 23
select * from t2;
id v 66
drop table t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (2,3),(1,4);
insert into t2 (id, v) values (5,5),(6,6);
select * from t1;
id v 23 14
select * from t2;
id v 55 66
select t1.*, t2.* from t1, t2 order by t1.id, t2.id limit 2;
id v id v 1455 1466
delete t1.*, t2.* from t1, t2 order by t1.id, t2.id limit 2;
select * from t1;
id v 23
select * from t2;
id v
drop table t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
insert into t1 (id, v) values (2,3),(1,4);
insert into t2 (id, v) values (5,5),(6,6);
select * from t1;
id v 23 14
select * from t2;
id v 55 66
select t1.*, t2.* from t1, t2 order by t1.id, t2.id limit 3;
id v id v 1455 1466 2355
delete t1.*, t2.* from t1, t2 order by t1.id, t2.id limit 3;
select * from t1;
id v
select * from t2;
id v
drop table t1, t2;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
create table t3 (id int primary key, v int);
insert into t1 (id, v) values (1, 1000), (2, 2000), (3, 3000), (4, 4000), (5, 5000);
insert into t2 (id, v) values (10, 100), (20, 200), (30, 300), (40, 400), (50, 500);
insert into t3 (id, v) values (11, 111), (22, 222), (33, 333), (44, 444), (55, 555);
select * from t1;
id v 11000 22000 33000 44000 55000
select * from t2;
id v 10100 20200 30300 40400 50500
select * from t3;
id v 11111 22222 33333 44444 55555
select t1.*, t2.*, t3.* from t1, t2, t3 order by t1.id, t2.id, t3.id limit 3;
id v id v id v 110001010011111 110001010022222 110001010033333
delete t1.*, t2.*, t3.* from t1, t2, t3 order by t1.id, t2.id, t3.id limit 3;
select * from t1;
id v 22000 33000 44000 55000
select * from t2;
id v 20200 30300 40400 50500
select * from t3;
id v 44444 55555
drop table t1, t2, t3;
create table t1 (id int primary key, v int);
create table t2 (id int primary key, v int);
create table t3 (id int primary key, v int);
insert into t1 (id, v) values (1, 1000), (2, 2000), (3, 3000), (4, 4000), (5, 5000);
insert into t2 (id, v) values (10, 100), (20, 200), (30, 300), (40, 400), (50, 500);
insert into t3 (id, v) values (11, 111), (22, 222), (33, 333), (44, 444), (55, 555);
select * from t1;
id v 11000 22000 33000 44000 55000
select * from t2;
id v 10100 20200 30300 40400 50500
select * from t3;
id v 11111 22222 33333 44444 55555
delete t1.*, t2.*, t3.* from t1, t2, t3;
select * from t1;
id v
select * from t2;
id v
select * from t3;
id v
drop table t1, t2, t3;
#
# Begin 11.8 tests
#
#
# MDEV-36997 Assertion failed in ha_tina::delete_row on multi delete
# SET sql_mode='';
CREATE TABLE t1 (v INT (1) NOT NULL) ENGINE=CSV;
INSERT INTO t1 SELECT 1 away;
SELECT COUNT(*) from t1;
COUNT(*) 1
DELETE FROM a3,a1 USING t1 AS a1 JOIN t1 AS a2 JOIN t1 AS a3;
SELECT COUNT(*) from t1;
COUNT(*) 0
DROP TABLE t1; SET sql_mode='';
CREATE TABLE t1 (v VECTOR (1) NOT NULL) ENGINE=CSV;
INSERT INTO t1 SELECT 1 away;
Warnings:
Warning 4078 Cannot cast 'int' as 'vector' in assignment of `test`.`t1`.`v`
Warning 1292 Incorrect vector value: '1' for column `test`.`t1`.`v` at row 1
SELECT COUNT(*) from t1;
COUNT(*) 1
DELETE FROM a3,a1 USING t1 AS a1 JOIN t1 AS a2 JOIN t1 AS a3;
SELECT COUNT(*) from t1;
COUNT(*) 0
DROP TABLE t1;
#
# End 11.8 tests
#
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.