summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_range.result
diff options
context:
space:
mode:
authorunknown <mikael@dator6.(none)>2008-01-28 15:20:55 +0100
committerunknown <mikael@dator6.(none)>2008-01-28 15:20:55 +0100
commit516f95acea961ed8e7c550ba49acdd884678058c (patch)
treeeee66d997bf96e08c1fdff43a4307896443a02c8 /mysql-test/r/partition_range.result
parent4bacd53715ac860c6ba2d9c148f87d22cae9c62a (diff)
downloadmariadb-git-516f95acea961ed8e7c550ba49acdd884678058c.tar.gz
BUG#32943: Fixed buggy lock handling of ALTER TABLE for partitioning
mysql-test/r/partition_range.result: Added new test cases for lock tables and ALTER TABLE for partitions, also added a test case with a trigger. mysql-test/t/partition_range.test: Added new test cases for lock tables and ALTER TABLE for partitions, also added a test case with a trigger. sql/mysql_priv.h: Added WFRM_KEEP_SHARE for use of code not to be used otherwise sql/sql_partition.cc: Removed get_name_lock and release_name_lock, use close_data_files_and_morph_locks which leaves an exclusive name lock after completing. Reopen table after completing if under lock tables Updated comments sql/sql_table.cc: Ensure that code to set partition syntax isn't used other than when specifically asked to do it.
Diffstat (limited to 'mysql-test/r/partition_range.result')
-rw-r--r--mysql-test/r/partition_range.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result
index 4da79704ec3..4c6459a09e3 100644
--- a/mysql-test/r/partition_range.result
+++ b/mysql-test/r/partition_range.result
@@ -1,4 +1,26 @@
drop table if exists t1, t2;
+create table t1 (a integer)
+partition by range (a)
+( partition p0 values less than (4),
+partition p1 values less than (100));
+create trigger tr1 before insert on t1
+for each row begin
+set @a = 1;
+end|
+alter table t1 drop partition p0;
+drop table t1;
+create table t1 (a integer)
+partition by range (a)
+( partition p0 values less than (4),
+partition p1 values less than (100));
+LOCK TABLES t1 WRITE;
+alter table t1 drop partition p0;
+alter table t1 reorganize partition p1 into
+( partition p0 values less than (4),
+partition p1 values less than (100));
+alter table t1 add partition ( partition p2 values less than (200));
+UNLOCK TABLES;
+drop table t1;
create table t1 (a int unsigned)
partition by range (a)
(partition pnull values less than (0),