mirror of
https://github.com/MariaDB/server.git
synced 2026-05-05 22:55:32 +02:00
Bug #17097: Partitions: failing ADD PRIMARY KEY leads to temporary rotten metadata,crash
When doing an ALTER TABLE on a table using partitioning, force the table definition to get reloaded, since it may become invalid whenever the ALTER TABLE fails (even for an ALTER TABLE without specific partitioning changes). mysql-test/r/partition.result: New results mysql-test/t/partition.test: New regression test sql/sql_partition.cc: Always force table to get reloaded when we ALTER a partitioned table
This commit is contained in:
parent
217fdd8896
commit
7e1627d085
3 changed files with 32 additions and 8 deletions
|
|
@ -540,4 +540,15 @@ select partition_name, partition_description, table_rows
|
|||
from information_schema.partitions where table_schema ='test';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #17097: Partitions: failing ADD PRIMARY KEY leads to temporary rotten
|
||||
# metadata,crash
|
||||
#
|
||||
create table t1 (a int, b int) partition by list (a)
|
||||
(partition p1 values in (1), partition p2 values in (2));
|
||||
--error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
|
||||
alter table t1 add primary key (b);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue