mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-5271 Support engine-defined attributes per partition
Make it possible to specify engine-defined attributes on partitions as well as tables. If an engine-defined attribute is only specified at the table level, it applies to all the partitions in the table. This is a backward-compatible behavior. If the same attribute is specified both at the table level and the partition level, the per-partition one takes precedence. So, we can consider per-table attributes as default values. One cannot specify engine-defined attributes on subpartitions. Implementation details: * We store per-partition attributes in the partition_element class because we already have the part_comment field, which is for per-partition comments. * In the case of ALTER TABLE statements, the partition_elements in table->part_info is set up by mysql_unpack_partition(). So, we parse per-partition attributes after the call of the function.
This commit is contained in:
@ -7863,8 +7863,9 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
||||
thd->calloc(sizeof(void*) * table->s->keys)) == NULL)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
create_info->option_list= merge_engine_table_options(table->s->option_list,
|
||||
create_info->option_list, thd->mem_root);
|
||||
if (merge_engine_options(table->s->option_list, create_info->option_list,
|
||||
&create_info->option_list, thd->mem_root))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
/*
|
||||
First collect all fields from table which isn't in drop_list
|
||||
|
Reference in New Issue
Block a user