From 06eaf7232e9a920468c0f8d74dcf2fe8b555501c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:24:36 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- mysql-test/main/truncate-stale-6500.result | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 mysql-test/main/truncate-stale-6500.result (limited to 'mysql-test/main/truncate-stale-6500.result') diff --git a/mysql-test/main/truncate-stale-6500.result b/mysql-test/main/truncate-stale-6500.result new file mode 100644 index 00000000..be8d0aa7 --- /dev/null +++ b/mysql-test/main/truncate-stale-6500.result @@ -0,0 +1,34 @@ +set @save_query_cache_size=@@query_cache_size; +SET GLOBAL query_cache_size=1024*1024*8; +CREATE TABLE `test` ( +`uniqueId` INT NOT NULL, +`partitionId` INT NOT NULL, +PRIMARY KEY (`uniqueId`,`partitionId`) +) ENGINE=InnoDB PARTITION BY LIST (partitionId) ( +PARTITION p01 VALUES IN (1), +PARTITION p02 VALUES IN (2) +); +INSERT INTO `test`(`uniqueId`,`partitionId`) VALUES(407237055, 2); +SELECT * FROM `test`; +uniqueId partitionId +407237055 2 +#Confirms 1 row in partition 'p02' +SELECT TABLE_NAME, PARTITION_NAME, TABLE_ROWS FROM information_schema.PARTITIONS where TABLE_NAME = 'test'; +TABLE_NAME PARTITION_NAME TABLE_ROWS +test p01 0 +test p02 1 +ALTER TABLE `test` TRUNCATE PARTITION `p02`; +#Confirms no more rows in partition 'p02' +SELECT TABLE_NAME, PARTITION_NAME, TABLE_ROWS FROM information_schema.PARTITIONS where TABLE_NAME = 'test'; +TABLE_NAME PARTITION_NAME TABLE_ROWS +test p01 0 +test p02 0 +#Before the patch, this returned the previously existing values. +SELECT * FROM `test`; +uniqueId partitionId +SELECT SQL_CACHE * FROM `test`; +uniqueId partitionId +SELECT SQL_NO_CACHE * FROM `test`; +uniqueId partitionId +DROP TABLE test; +SET GLOBAL query_cache_size=@save_query_cache_size; -- cgit v1.2.3