summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2021-11-05 16:39:28 +0900
committerNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2021-12-01 23:01:29 +0900
commitafb81948ac34f37469d43154892cd3b8753bace6 (patch)
treeaf3748dabaf70bed31f0eb35ccb555300a6fe709 /sql/sql_table.cc
parent897d8c57b68858a58eea6cda4d971c3a94f6cc4a (diff)
downloadmariadb-git-bb-10.8-mdev-5271.tar.gz
MDEV-5271 Support engine-defined attributes per partitionbb-10.8-mdev-5271
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.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index b07efb29bba..8c2c6aab3d6 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -7859,8 +7859,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