mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-17613 MIN/MAX Optimization (Select tables optimized away) does not work
Current easy fix is not possible, because SELECT clones ha_partition
and then closes the clone which leads to unclosed transaction in
partitions we forcely prune out. We cound solve this by closing these
partitions (and release from transaction) in
change_partitions_to_open() at versioning conditions stage, but this
is problematic because table lock is acquired for each partition at
open stage and therefore must be released when we close partition
handler in change_partitions_to_open(). More details in MDEV-20376.
This should change after MDEV-20250 where mechanism of opening
partitions will be improved.
This reverts commit cdbac54df0
.
This commit is contained in:
@@ -497,27 +497,6 @@ create or replace table t1 (f int) with system versioning partition by hash(f);
|
||||
--error 0,ER_DELAYED_NOT_SUPPORTED
|
||||
insert delayed into t1 values (1);
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17613 MIN/MAX Optimization (Select tables optimized away) does not work
|
||||
--echo #
|
||||
--disable_query_log
|
||||
set @saved_storage_engine= @@default_storage_engine;
|
||||
if ($MTR_COMBINATION_HEAP)
|
||||
{
|
||||
# This case does not work with HEAP
|
||||
set default_storage_engine= myisam;
|
||||
}
|
||||
--enable_query_log
|
||||
create or replace table t1 (pk int primary key) with system versioning
|
||||
partition by system_time (
|
||||
partition p1 history,
|
||||
partition pn current);
|
||||
insert into t1 values (1), (2);
|
||||
explain select max(pk) from t1;
|
||||
--disable_query_log
|
||||
set default_storage_engine= @saved_storage_engine;
|
||||
--enable_query_log
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20068 History partition rotation is not done under LOCK TABLES
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user