summaryrefslogtreecommitdiff
path: root/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/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/table.cc')
-rw-r--r--sql/table.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index b1a7b6bfe2b..6349db84f61 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -4244,6 +4244,8 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
thd->restore_active_arena(&part_func_arena, &backup_arena);
goto partititon_err;
}
+ if (parse_engine_part_options(thd, outparam))
+ goto err;
outparam->part_info->is_auto_partitioned= share->auto_partitioned;
DBUG_PRINT("info", ("autopartitioned: %u", share->auto_partitioned));
/*