mariadb/mysql-test/main/alter_table_errors.test
Sergei Golubchik e925ddd234 MDEV-27578 DESC attribute upon spatial index creation prevents ER_DUP_INDEX warning
strip DESC from SPATIAL indexes earlier. Before check_duplicate_key()
not when creating the frm
2025-07-17 09:18:18 +02:00

44 lines
1.3 KiB
Text

--source include/have_innodb.inc
--echo #
--echo # MDEV-16110 ALTER with ALGORITHM=INPLACE breaks temporary table with virtual columns
--echo #
create table t (a int, v int as (a)) engine=innodb;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t change column a b tinyint, algorithm=inplace;
show create table t;
drop table t;
create temporary table t1 (a int, v int as (a));
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table t1 change column a b int, algorithm=inplace;
show create table t1;
create temporary table t2 (a int, v int as (a));
lock table t2 write;
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table t2 change column a b int, algorithm=inplace;
show create table t2;
drop temporary table t1, t2;
unlock tables;
--echo #
--echo # MDEV-18083 ASAN heap-use-after-free in Field::set_warning_truncated_wrong_value upon inserting into temporary table
--echo #
create temporary table t1 (a int);
alter table t1 add column f text;
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
insert into t1 values ('x','foo');
drop temporary table t1;
--echo # End of 10.2 tests
--echo #
--echo # MDEV-27578 DESC attribute upon spatial index creation prevents ER_DUP_INDEX warning
--echo #
create table t1 (c point not null);
alter table t1 add spatial index b1(c desc);
alter table t1 add spatial index b2(c desc);
drop table t1;
--echo # End of 10.11 tests