Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.4, 11.5(EOL)
-
None
Description
--source include/have_innodb.inc
|
|
set @userstat.save= @@userstat; |
set global userstat= 1; |
|
create table t1 (a int key) engine=InnoDB; |
insert into t1 values (1),(2); |
|
create table t2 (b int, foreign key(b) references t1(a) on update cascade) engine=InnoDB; |
insert into t2 values (1),(2); |
|
select table_name, rows_changed from information_schema.table_statistics where table_name in ('t1','t2'); |
update t1 set a = 20 where a = 2; |
select table_name, rows_changed from information_schema.table_statistics where table_name in ('t1','t2'); |
select * from t2; |
|
# Cleanup
|
drop table t2, t1; |
set global userstat= @userstat.save; |
10.4 ee59ca7ff1620dd74b9bc1449878c5d1acee0f53 |
select table_name, rows_changed from information_schema.table_statistics where table_name in ('t1','t2'); |
table_name rows_changed
|
t2 2
|
t1 2
|
update t1 set a = 20 where a = 2; |
select table_name, rows_changed from information_schema.table_statistics where table_name in ('t1','t2'); |
table_name rows_changed
|
t2 2
|
t1 3
|
select * from t2; |
b
|
1
|
20
|
Update on t2 is not taken into account.
Attachments
Issue Links
- relates to
-
MDEV-31942 Online alter: support cascade foreign keys
- Open