summaryrefslogtreecommitdiff
path: root/storage/spider
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-06 23:47:33 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-06 23:47:33 +0200
commit89dc445a55156881318ca94ce042dbaf98e53e26 (patch)
tree04da8a074a8ceac347cb21e0c6e2ee1d05a990c6 /storage/spider
parent4d2131354914f54f85abf0bb8cb4bdd42d817f73 (diff)
parentf305a7ce4bccbd56520d874e1d81a4f29bc17a96 (diff)
downloadmariadb-git-89dc445a55156881318ca94ce042dbaf98e53e26.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'storage/spider')
-rw-r--r--storage/spider/spd_table.cc29
1 files changed, 17 insertions, 12 deletions
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 66f558ecd91..265c64fc0b9 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -6941,7 +6941,7 @@ void spider_get_partition_info(
partition_element **part_elem,
partition_element **sub_elem
) {
- char tmp_name[FN_LEN];
+ char tmp_name[FN_REFLEN + 1];
partition_element *tmp_part_elem = NULL, *tmp_sub_elem = NULL;
bool tmp_flg = FALSE, tmp_find_flg = FALSE;
DBUG_ENTER("spider_get_partition_info");
@@ -6962,9 +6962,10 @@ void spider_get_partition_info(
List_iterator<partition_element> sub_it((*part_elem)->subpartitions);
while ((*sub_elem = sub_it++))
{
- create_subpartition_name(tmp_name, table_share->path.str,
- (*part_elem)->partition_name, (*sub_elem)->partition_name,
- NORMAL_PART_NAME);
+ if (create_subpartition_name(tmp_name, sizeof(tmp_name),
+ table_share->path.str, (*part_elem)->partition_name,
+ (*sub_elem)->partition_name, NORMAL_PART_NAME))
+ DBUG_VOID_RETURN;
DBUG_PRINT("info",("spider tmp_name=%s", tmp_name));
if (!memcmp(table_name, tmp_name, table_name_length + 1))
DBUG_VOID_RETURN;
@@ -6980,8 +6981,10 @@ void spider_get_partition_info(
}
}
} else {
- create_partition_name(tmp_name, table_share->path.str,
- (*part_elem)->partition_name, NORMAL_PART_NAME, TRUE);
+ if (create_partition_name(tmp_name, sizeof(tmp_name),
+ table_share->path.str, (*part_elem)->partition_name,
+ NORMAL_PART_NAME, TRUE))
+ DBUG_VOID_RETURN;
DBUG_PRINT("info",("spider tmp_name=%s", tmp_name));
if (!memcmp(table_name, tmp_name, table_name_length + 1))
DBUG_VOID_RETURN;
@@ -8447,7 +8450,7 @@ int spider_discover_table_structure(
spider_free_share_resource_only(spider_share);
#ifdef WITH_PARTITION_STORAGE_ENGINE
} else {
- char tmp_name[FN_LEN];
+ char tmp_name[FN_REFLEN + 1];
List_iterator<partition_element> part_it(part_info->partitions);
partition_element *part_elem, *sub_elem;
while ((part_elem = part_it++))
@@ -8458,9 +8461,10 @@ int spider_discover_table_structure(
while ((sub_elem = sub_it++))
{
str.length(str_len);
- create_subpartition_name(tmp_name, table_name,
- (part_elem)->partition_name, (sub_elem)->partition_name,
- NORMAL_PART_NAME);
+ if (create_subpartition_name(tmp_name, sizeof(tmp_name), table_name,
+ (part_elem)->partition_name, (sub_elem)->partition_name,
+ NORMAL_PART_NAME))
+ DBUG_RETURN(1);
DBUG_PRINT("info",("spider tmp_name=%s", tmp_name));
if (!(spider_share = spider_create_share(table_name, share,
part_info,
@@ -8483,8 +8487,9 @@ int spider_discover_table_structure(
break;
} else {
str.length(str_len);
- create_partition_name(tmp_name, table_name,
- (part_elem)->partition_name, NORMAL_PART_NAME, TRUE);
+ if (create_partition_name(tmp_name, sizeof(tmp_name), table_name,
+ (part_elem)->partition_name, NORMAL_PART_NAME, TRUE))
+ DBUG_RETURN(1);
DBUG_PRINT("info",("spider tmp_name=%s", tmp_name));
if (!(spider_share = spider_create_share(table_name, share,
part_info,