Skip to content

Commit 14e5778

Browse files
author
Mattias Jonsson
committed
WL#4443: Remove scalability problem with many lock's
and external lock's on partitioned tables with many partitions. - Added coverage tests. - Added second prune_partitions call in mysql_update, to prune after subqueries and stored programs after locking. - Fixed the problem with avoiding the second SEL_TREE creation, in the second prune_partitions() call, for conditions that did not have any subqueries or stored functions. - Updated copyright year. - some minor cleanup.
1 parent b03bada commit 14e5778

25 files changed

+1368
-358
lines changed

mysql-test/r/partition_debug_sync.result

+24
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,27 @@ SET DEBUG_SYNC= 'RESET';
6666
# Con default
6767
SET DEBUG_SYNC= 'RESET';
6868
End of 5.1 tests
69+
#
70+
# Coverage test for non pruned ha_partition::store_lock()
71+
#
72+
CREATE TABLE t1 (a int) ENGINE = InnoDB;
73+
CREATE TABLE t2 (a int PRIMARY KEY)
74+
ENGINE = InnoDB PARTITION BY HASH (a) PARTITIONS 3;
75+
HANDLER t1 OPEN;
76+
# Con1
77+
LOCK TABLES t1 WRITE, t2 READ;
78+
# Default
79+
SET DEBUG_SYNC="wait_for_lock SIGNAL locking";
80+
INSERT INTO t2 VALUES (1), (2), (3);
81+
# Con1
82+
SET DEBUG_SYNC="now WAIT_FOR locking";
83+
ALTER TABLE t1 ADD COLUMN b int;
84+
# Default
85+
ERROR HY000: Wait on a lock was aborted due to a pending exclusive lock
86+
SELECT 1;
87+
1
88+
1
89+
# Con1
90+
UNLOCK TABLES;
91+
# Default
92+
DROP TABLE t1, t2;

0 commit comments

Comments
 (0)