1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Bug#50104: Partitioned table with just 1 partion works with fk

There was no check for foreign keys when altering partitioned
tables.

Added check for FK when altering partitioned tables.
This commit is contained in:
Mattias Jonsson
2010-03-04 12:29:22 +01:00
parent 2e9045c8fd
commit 6e7539de29
3 changed files with 55 additions and 2 deletions

View File

@@ -4273,6 +4273,12 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
{
DBUG_ENTER("prep_alter_part_table");
/* Foreign keys on partitioned tables are not supported, waits for WL#148 */
if (table->part_info && (alter_info->flags & ALTER_FOREIGN_KEY))
{
my_error(ER_FOREIGN_KEY_ON_PARTITIONED, MYF(0));
DBUG_RETURN(TRUE);
}
/*
We are going to manipulate the partition info on the table object
so we need to ensure that the data structure of the table object