Commit 79a66a97 authored by Alexey Botchkov's avatar Alexey Botchkov

Bug#38083 Error-causing row inserted into partitioned table despite error

parent 0b097b77
...@@ -3145,10 +3145,12 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree) ...@@ -3145,10 +3145,12 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
ppar->subpart_fields);); ppar->subpart_fields););
/* Find the subpartition (it's HASH/KEY so we always have one) */ /* Find the subpartition (it's HASH/KEY so we always have one) */
partition_info *part_info= ppar->part_info; partition_info *part_info= ppar->part_info;
uint32 subpart_id= part_info->get_subpartition_id(part_info); uint32 part_id, subpart_id;
if (part_info->get_subpartition_id(part_info, &subpart_id))
return 0;
/* Mark this partition as used in each subpartition. */ /* Mark this partition as used in each subpartition. */
uint32 part_id;
while ((part_id= ppar->part_iter.get_next(&ppar->part_iter)) != while ((part_id= ppar->part_iter.get_next(&ppar->part_iter)) !=
NOT_A_PARTITION_ID) NOT_A_PARTITION_ID)
{ {
......
...@@ -25,7 +25,8 @@ class partition_info; ...@@ -25,7 +25,8 @@ class partition_info;
typedef int (*get_part_id_func)(partition_info *part_info, typedef int (*get_part_id_func)(partition_info *part_info,
uint32 *part_id, uint32 *part_id,
longlong *func_value); longlong *func_value);
typedef uint32 (*get_subpart_id_func)(partition_info *part_info); typedef int (*get_subpart_id_func)(partition_info *part_info,
uint32 *part_id);
struct st_ddl_log_memory_entry; struct st_ddl_log_memory_entry;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment