Spracherkennung für: .test vermutete Sprache: SQL {SQL[168] ABAP[80] Lisp[56]} [Methode: maximale Elemente, drei Dimensionen]
--source include/have_innodb.inc
--source include/have_query_cache.inc
--source include/not_embedded.inc
set @save_query_cache_size=@@query_cache_size;
--echo #
--echo # MDEV-12485: foreign key on delete cascade stale entries with
--echo # query cache enabled
--echo #
SET NAMES utf8;
set global query_cache_type=1;
set global query_cache_size=1024*1024;
set query_cache_type=1;
create table t1 ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
create table t2 ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references t1(`id`) on delete cascade ) engine=innodb;
--disable_view_protocol
insert into t1 values (1);
insert into t2 values (1,1);
--disable_cursor_protocol
select * from t2;
--enable_cursor_protocol
show status like "Qcache_queries_in_cache";
delete from t1;
show status like "Qcache_queries_in_cache";
select * from t2;
--enable_view_protocol
optimize table t2;
select * from t2;
drop table t2;
drop table t1;
create database `testdatabase$ї`;
use `testdatabase$ї`;
create table `t1$ї` ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
create table `t2$ї` ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references `t1$ї`(`id`) on delete cascade ) engine=innodb;
insert into `t1$ї` values (1);
insert into `t2$ї`values (1,1);
--disable_cursor_protocol
select * from `t2$ї`;
--enable_cursor_protocol
show status like "Qcache_queries_in_cache";
delete from `t1$ї`;
show status like "Qcache_queries_in_cache";
select * from `t2$ї`;
optimize table `t2$ї`;
select * from `t2$ї`;
use test;
drop database `testdatabase$ї`;
SET NAMES default;
set global query_cache_type=DEFAULT;
set global query_cache_size=@save_query_cache_size;
--echo # End of 10.2 tests
[Dauer der Verarbeitung: 0.15 Sekunden, vorverarbeitet 2026-10-08]