mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.6 into 10.7
This commit is contained in:
@ -2099,6 +2099,47 @@ set max_statement_time= 0;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
--echo #
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
--disable_query_log
|
||||
if ($MTR_COMBINATION_INNODB)
|
||||
{
|
||||
set default_storage_engine= innodb;
|
||||
}
|
||||
if ($MTR_COMBINATION_ARIA)
|
||||
{
|
||||
set default_storage_engine= aria;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
if (!$MTR_COMBINATION_INNODB)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
# There is no inplace ADD INDEX for MyISAM/Aria:
|
||||
create or replace table t1 (x int);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add unique (x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add primary key(x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add index(x), algorithm=inplace;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
# cleanup
|
||||
drop table t1;
|
||||
set @@default_storage_engine= @save_default_engine;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
@ -2567,6 +2608,59 @@ alter table t1 rename column abc to ABC;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
--echo #
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
--disable_query_log
|
||||
if ($MTR_COMBINATION_INNODB)
|
||||
{
|
||||
set default_storage_engine= innodb;
|
||||
}
|
||||
if ($MTR_COMBINATION_ARIA)
|
||||
{
|
||||
set default_storage_engine= aria;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
if (!$MTR_COMBINATION_INNODB)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
# There is no inplace ADD INDEX for MyISAM/Aria:
|
||||
create or replace table t1 (x int);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add unique (x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add primary key(x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add index(x), algorithm=inplace;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
# cleanup
|
||||
drop table t1;
|
||||
set @@default_storage_engine= @save_default_engine;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25555 Server crashes in tree_record_pos after INPLACE-recreating index on HEAP table
|
||||
--echo #
|
||||
create table t1 (a int, key idx1(a), key idx2 using btree(a)) engine=memory;
|
||||
alter table t1 rename index idx1 to idx3, algorithm=inplace;
|
||||
delete from t1 where a = 10;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 drop key idx3, add key idx1(a), algorithm=inplace;
|
||||
delete from t1 where a = 11;
|
||||
# cleanup
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user