mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
BUG#17754
Added new syntax ALTER TABLE t1 REMOVE PARTITIONING, changed semantics of ALTER TABLE t1 ENGINE=X; to not remove partitioning Fix a number of mix engine bugs in partitioning mysql-test/r/ndb_partition_key.result: Added a number of new test cases mysql-test/r/partition.result: Added a number of new test cases mysql-test/t/ndb_partition_key.test: Added a number of new test cases mysql-test/t/partition.test: Added a number of new test cases sql/lex.h: REMOVE and PARTITIONING added as keywords in parser sql/sql_lex.h: Added flag to alter_info flag sql/sql_partition.cc: Fixes for the new syntax, changes of the current semantics of the syntax. Fixes for errors in handling mixes of table handlers in partitioning syntax for ALTER TABLE sql/sql_table.cc: Bug fix sql/sql_yacc.yy: New syntax for REMOVE PARTITIONING
This commit is contained in:
@@ -79,3 +79,49 @@ PARTITION BY KEY(a)
|
||||
(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE
|
||||
# Also added a number of general test cases in the same area
|
||||
#
|
||||
create table t1 (a int)
|
||||
engine=ndb
|
||||
partition by key(a)
|
||||
(partition p0, partition p1);
|
||||
show create table t1;
|
||||
|
||||
alter table t1 engine=heap;
|
||||
show create table t1;
|
||||
|
||||
alter table t1 engine=ndb;
|
||||
show create table t1;
|
||||
|
||||
alter table t1 engine=heap remove partitioning;
|
||||
show create table t1;
|
||||
|
||||
alter table t1 engine=ndb
|
||||
partition by key(a)
|
||||
(partition p0, partition p1 engine = ndb);
|
||||
show create table t1;
|
||||
|
||||
alter table t1
|
||||
partition by key (a)
|
||||
(partition p0 engine=ndb, partition p1 engine=ndb);
|
||||
show create table t1;
|
||||
|
||||
alter table t1 remove partitioning;
|
||||
show create table t1;
|
||||
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0 engine=ndb, partition p1);
|
||||
|
||||
alter table t1
|
||||
engine=ndb
|
||||
partition by key(a)
|
||||
(partition p0 engine=ndb, partition p1 engine = ndb);
|
||||
show create table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user