[MDEV-33059] ANALYZE TABLE produces "Partition returned error" under tx_read_only Created: 2023-12-18  Updated: 2023-12-18

Status: Open
Project: MariaDB Server
Component/s: Admin statements, Partitioning, Storage Engine - InnoDB
Affects Version/s: 10.6, 10.11, 11.0, 11.1, 11.2, 11.3
Fix Version/s: 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

--source include/have_partition.inc
--source include/have_innodb.inc
 
SET @tx= @@global.tx_read_only;
 
CREATE TABLE t (a INT) ENGINE=InnoDB PARTITION BY RANGE (a) (PARTITION p VALUES LESS THAN MAXVALUE);
SET GLOBAL tx_read_only = ON;
--connect (con1,localhost,root,,)
ANALYZE TABLE t;
 
# Cleanup
--disconnect con1
connection default;
DROP TABLE t;
SET GLOBAL tx_read_only = @tx;

10.6 686865e112fa4840376745194349845f8d00a2a7

ANALYZE TABLE t;
Table	Op	Msg_type	Msg_text
test.t	analyze	error	Partition p returned error
test.t	analyze	status	Engine-independent statistics collected
test.t	analyze	status	Operation failed

(Engine-independed statistics is irrelevant here, it's just collected in MTR by default. The partition error happens without it as well).
Not reproducible on 10.5.


Generated at Thu Feb 08 10:36:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.