1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#
# Check that you can specify ALGORITHM=[DEFAULT|COPY|INPLACE] for
# ALTER TABLE ... REORGANIZE PARTITION
#
ALTER TABLE t1
algorithm=inplace,
reorganize partition;
ALTER TABLE t1
algorithm=copy,
reorganize partition;
ALTER TABLE t1
algorithm=default,
reorganize partition;
#
# Check that REORGANIZE PARTITION by default is an inplace
# operation by not allowing copying alter table and then running
# a reorg.
#
set @@ndb_allow_copying_alter_table = 0;
ALTER TABLE t1
reorganize partition;
set @@ndb_allow_copying_alter_table = default;
#
# Check that REORGANIZE PARTITION works also when copying alter is
# allowed (although it should ofcourse still use inplace per above test).
#
ALTER TABLE t1
reorganize partition;
#
# Check that inplace REORGANIZE PARTITION is not allowed on a
# table with MAX_ROWS
#
ALTER TABLE t3
algorithm=inplace,
reorganize partition;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: REORGANIZE of table with MAX_ROWS. Try ALGORITHM=COPY.
#
# Check that implicit copying REORGANIZE PARTITION is allowed on a
# table with MAX_ROWS
#
ALTER TABLE t3
reorganize partition;
#
# Check that explicit copying REORGANIZE PARTITION is allowed on a
# table with MAX_ROWS even when copying alter table is not allowed
#
set @@ndb_allow_copying_alter_table = 0;
ALTER TABLE t3
algorithm=copy,
reorganize partition;
set @@ndb_allow_copying_alter_table = default;
#
# Check that implicit copying REORGANIZE PARTITION is prevented on a
# table with MAX_ROWS when copying alter table is not allowed
#
set @@ndb_allow_copying_alter_table = 0;
ALTER TABLE t3
reorganize partition;
ERROR 0A000: Implicit copying alter is not supported. Reason: ndb_allow_copying_alter_table=0. Try ALGORITHM=COPY to force the alter.
set @@ndb_allow_copying_alter_table = default;
== verify_mysql_dd.inc ==
|