diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-07-06 23:47:33 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-07-06 23:47:33 +0200 |
commit | 89dc445a55156881318ca94ce042dbaf98e53e26 (patch) | |
tree | 04da8a074a8ceac347cb21e0c6e2ee1d05a990c6 /storage | |
parent | 4d2131354914f54f85abf0bb8cb4bdd42d817f73 (diff) | |
parent | f305a7ce4bccbd56520d874e1d81a4f29bc17a96 (diff) | |
download | mariadb-git-89dc445a55156881318ca94ce042dbaf98e53e26.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'storage')
-rw-r--r-- | storage/archive/ha_archive.cc | 1 | ||||
-rw-r--r-- | storage/maria/ma_loghandler.c | 4 | ||||
-rw-r--r-- | storage/maria/ma_pagecache.c | 1 | ||||
-rw-r--r-- | storage/mroonga/mrn_table.cpp | 14 | ||||
-rw-r--r-- | storage/spider/spd_table.cc | 29 |
5 files changed, 29 insertions, 20 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 00f3adb07ee..820a73e87fd 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -1690,7 +1690,6 @@ int ha_archive::info(uint flag) stats.update_time= (ulong) file_stat.st_mtime; if (flag & HA_STATUS_CONST) { - stats.max_data_file_length= share->rows_recorded * stats.mean_rec_length; stats.max_data_file_length= MAX_FILE_SIZE; stats.create_time= (ulong) file_stat.st_ctime; } diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index 0b0dc261c24..039cae0ff38 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -1270,6 +1270,7 @@ static my_bool translog_set_lsn_for_files(uint32 from_file, uint32 to_file, mysql_file_close(fd, MYF(MY_WME)))) { translog_stop_writing(); + mysql_mutex_unlock(&log_descriptor.file_header_lock); DBUG_RETURN(1); } } @@ -2294,10 +2295,11 @@ static void translog_set_only_in_buffers(TRANSLOG_ADDRESS in_buffers) if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0) { if (translog_status != TRANSLOG_OK) - DBUG_VOID_RETURN; + goto end; log_descriptor.in_buffers_only= in_buffers; DBUG_PRINT("info", ("set new in_buffers_only")); } +end: mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock); DBUG_VOID_RETURN; } diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c index 34daf1dcf83..8dba5ea986f 100644 --- a/storage/maria/ma_pagecache.c +++ b/storage/maria/ma_pagecache.c @@ -3482,6 +3482,7 @@ restart: lock_to_read[lock].unlock_lock, unlock_pin, FALSE)) { + pagecache_pthread_mutex_unlock(&pagecache->cache_lock); DBUG_ASSERT(0); return (uchar*) 0; } diff --git a/storage/mroonga/mrn_table.cpp b/storage/mroonga/mrn_table.cpp index ca5646b3e0b..bccb2464d2e 100644 --- a/storage/mroonga/mrn_table.cpp +++ b/storage/mroonga/mrn_table.cpp @@ -196,7 +196,7 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, const TABLE *table, partition_element **part_elem, partition_element **sub_elem) { - char tmp_name[FN_LEN]; + char tmp_name[FN_REFLEN + 1]; partition_info *part_info = table->part_info; partition_element *tmp_part_elem = NULL, *tmp_sub_elem = NULL; bool tmp_flg = FALSE, tmp_find_flg = FALSE; @@ -218,9 +218,10 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, List_iterator<partition_element> sub_it((*part_elem)->subpartitions); while ((*sub_elem = sub_it++)) { - create_subpartition_name(tmp_name, table->s->path.str, - (*part_elem)->partition_name, (*sub_elem)->partition_name, - NORMAL_PART_NAME); + if (create_subpartition_name(tmp_name, sizeof(tmp_name), table->s->path.str, + (*part_elem)->partition_name, (*sub_elem)->partition_name, + NORMAL_PART_NAME)) + DBUG_VOID_RETURN; DBUG_PRINT("info", ("mroonga tmp_name=%s", tmp_name)); if (table_name && !memcmp(table_name, tmp_name, table_name_length + 1)) DBUG_VOID_RETURN; @@ -237,8 +238,9 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, } } } else { - create_partition_name(tmp_name, table->s->path.str, - (*part_elem)->partition_name, NORMAL_PART_NAME, TRUE); + if (create_partition_name(tmp_name, sizeof(tmp_name), table->s->path.str, + (*part_elem)->partition_name, NORMAL_PART_NAME, TRUE)) + DBUG_VOID_RETURN; DBUG_PRINT("info", ("mroonga tmp_name=%s", tmp_name)); if (table_name && !memcmp(table_name, tmp_name, table_name_length + 1)) DBUG_VOID_RETURN; 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, |