[MDEV-25100] Read-only table with ROW_FORMAT=COMPRESSED is still updateable through foreign key cascade Created: 2021-03-09  Updated: 2021-07-23  Resolved: 2021-07-23

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.6
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-23497 make ROW_FORMAT=COMPRESSED read-only ... Closed

 Description   

--source include/have_innodb.inc
 
create table t1 (pk int primary key) engine=InnoDB;
insert into t1 values (1),(2),(3);
 
set global innodb_read_only_compressed= off;
create table t2 (a int, foreign key (a) references t1(pk) on update cascade on delete cascade) engine=InnoDB row_format=compressed;
insert into t2 values (1),(2),(3);
set global innodb_read_only_compressed= on;
 
update t1 set pk = 10 where pk = 1;
delete from t1 where pk = 2;
 
select * from t2;
 
# Cleanup
drop table t2, t1;

10.6 d317350a

update t1 set pk = 10 where pk = 1;
delete from t1 where pk = 2;
select * from t2;
a
3
10



 Comments   
Comment by Marko Mäkelä [ 2021-07-23 ]

Thank you for the report. However, I would think that having the errors reported for direct access to the table (MDEV-23497) should give a sufficient deprecation warning to users.

Generated at Thu Feb 08 09:35:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.