mirror of
https://github.com/MariaDB/server.git
synced 2026-04-23 00:35:32 +02:00
Bug#32948: FKs allowed to reference partitioned table
Problem: when alter to partitioned table, it does not see it as change of engine. Solution: If alter includes partitioning, check if it is possible to change engines (eg. is the table referenced by a FK) mysql-test/r/partition_innodb.result: Bug#32948: FKs allowed to reference partitioned table test result mysql-test/t/partition_innodb.test: Bug#32948: FKs allowed to reference partitioned table test case sql/sql_table.cc: Bug#32948: FKs allowed to reference partitioned table if alter to partitioning, it is the same as changing engine.
This commit is contained in:
parent
b9ecec8622
commit
c3fceb409b
3 changed files with 29 additions and 1 deletions
|
|
@ -5974,7 +5974,8 @@ view_err:
|
|||
goto err;
|
||||
new_db_type= create_info->db_type;
|
||||
|
||||
if (new_db_type != old_db_type &&
|
||||
if ((new_db_type != old_db_type ||
|
||||
alter_info->flags & ALTER_PARTITION) &&
|
||||
!table->file->can_switch_engines())
|
||||
{
|
||||
my_error(ER_ROW_IS_REFERENCED, MYF(0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue