Loading mysql-test/r/partition.result +12 −0 Original line number Diff line number Diff line Loading @@ -936,4 +936,16 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize note The storage engine for the table doesn't support optimize drop table t1; create database db99; use db99; create table t1 (a int not null) engine=archive partition by list (a) (partition p0 values in (1), partition p1 values in (2)); insert into t1 values (1), (2); create index inx on t1 (a); alter table t1 add partition (partition p2 values in (3)); alter table t1 drop partition p2; use test; drop database db99; End of 5.1 tests mysql-test/t/partition.test +17 −0 Original line number Diff line number Diff line Loading @@ -1077,4 +1077,21 @@ OPTIMIZE TABLE t1; drop table t1; # # Bug 17310 Partitions: Bugs with archived partitioned tables # create database db99; use db99; create table t1 (a int not null) engine=archive partition by list (a) (partition p0 values in (1), partition p1 values in (2)); insert into t1 values (1), (2); --error 0, 1005 create index inx on t1 (a); alter table t1 add partition (partition p2 values in (3)); alter table t1 drop partition p2; use test; drop database db99; --echo End of 5.1 tests storage/archive/ha_archive.cc +9 −8 Original line number Diff line number Diff line Loading @@ -701,14 +701,6 @@ int ha_archive::create(const char *name, TABLE *table_arg, create_info->auto_increment_value -1 : (ulonglong) 0); if ((create_file= my_create(fn_format(name_buff,name,"",ARM, MY_REPLACE_EXT|MY_UNPACK_FILENAME),0, O_RDWR | O_TRUNC,MYF(MY_WME))) < 0) { error= my_errno; goto error; } for (uint key= 0; key < table_arg->s->keys; key++) { KEY *pos= table_arg->key_info+key; Loading @@ -722,11 +714,20 @@ int ha_archive::create(const char *name, TABLE *table_arg, if (!(field->flags & AUTO_INCREMENT_FLAG)) { error= -1; DBUG_PRINT("info", ("Index error in creating archive table")); goto error; } } } if ((create_file= my_create(fn_format(name_buff,name,"",ARM, MY_REPLACE_EXT|MY_UNPACK_FILENAME),0, O_RDWR | O_TRUNC,MYF(MY_WME))) < 0) { error= my_errno; goto error; } write_meta_file(create_file, 0, auto_increment_value, 0, (char *)create_info->data_file_name, FALSE); Loading Loading
mysql-test/r/partition.result +12 −0 Original line number Diff line number Diff line Loading @@ -936,4 +936,16 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize note The storage engine for the table doesn't support optimize drop table t1; create database db99; use db99; create table t1 (a int not null) engine=archive partition by list (a) (partition p0 values in (1), partition p1 values in (2)); insert into t1 values (1), (2); create index inx on t1 (a); alter table t1 add partition (partition p2 values in (3)); alter table t1 drop partition p2; use test; drop database db99; End of 5.1 tests
mysql-test/t/partition.test +17 −0 Original line number Diff line number Diff line Loading @@ -1077,4 +1077,21 @@ OPTIMIZE TABLE t1; drop table t1; # # Bug 17310 Partitions: Bugs with archived partitioned tables # create database db99; use db99; create table t1 (a int not null) engine=archive partition by list (a) (partition p0 values in (1), partition p1 values in (2)); insert into t1 values (1), (2); --error 0, 1005 create index inx on t1 (a); alter table t1 add partition (partition p2 values in (3)); alter table t1 drop partition p2; use test; drop database db99; --echo End of 5.1 tests
storage/archive/ha_archive.cc +9 −8 Original line number Diff line number Diff line Loading @@ -701,14 +701,6 @@ int ha_archive::create(const char *name, TABLE *table_arg, create_info->auto_increment_value -1 : (ulonglong) 0); if ((create_file= my_create(fn_format(name_buff,name,"",ARM, MY_REPLACE_EXT|MY_UNPACK_FILENAME),0, O_RDWR | O_TRUNC,MYF(MY_WME))) < 0) { error= my_errno; goto error; } for (uint key= 0; key < table_arg->s->keys; key++) { KEY *pos= table_arg->key_info+key; Loading @@ -722,11 +714,20 @@ int ha_archive::create(const char *name, TABLE *table_arg, if (!(field->flags & AUTO_INCREMENT_FLAG)) { error= -1; DBUG_PRINT("info", ("Index error in creating archive table")); goto error; } } } if ((create_file= my_create(fn_format(name_buff,name,"",ARM, MY_REPLACE_EXT|MY_UNPACK_FILENAME),0, O_RDWR | O_TRUNC,MYF(MY_WME))) < 0) { error= my_errno; goto error; } write_meta_file(create_file, 0, auto_increment_value, 0, (char *)create_info->data_file_name, FALSE); Loading