diff options
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/fil/fil0fil.c | 19 | ||||
-rw-r--r-- | innobase/include/fil0fil.h | 2 | ||||
-rw-r--r-- | innobase/row/row0ins.c | 2 |
3 files changed, 17 insertions, 6 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index ccf6efdd274..6d3ffcd63f3 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -109,7 +109,7 @@ struct fil_node_struct { device or a raw disk partition */ ulint size; /* size of the file in database pages, 0 if not known yet; the possible last incomplete - megabyte is ignored if space == 0 */ + megabyte may be ignored if space == 0 */ ulint n_pending; /* count of pending i/o's on this file; closing of the file is not allowed if @@ -163,7 +163,9 @@ struct fil_space_struct { UT_LIST_BASE_NODE_T(fil_node_t) chain; /* base node for the file chain */ ulint size; /* space size in pages; 0 if a single-table - tablespace whose size we do not know yet */ + tablespace whose size we do not know yet; + last incomplete megabytes in data files may be + ignored if space == 0 */ ulint n_reserved_extents; /* number of reserved free extents for ongoing operations like B-tree page split */ @@ -3258,7 +3260,7 @@ fil_extend_space_to_desired_size( ulint* actual_size, /* out: size of the space after extension; if we ran out of disk space this may be lower than the desired size */ - ulint space_id, /* in: space id, must be != 0 */ + ulint space_id, /* in: space id */ ulint size_after_extend)/* in: desired size in pages after the extension; if the current space size is bigger than this already, the function does nothing */ @@ -3355,6 +3357,17 @@ fil_extend_space_to_desired_size( fil_node_complete_io(node, system, OS_FILE_WRITE); *actual_size = space->size; + + if (space_id == 0) { + ulint pages_per_mb = (1024 * 1024) / UNIV_PAGE_SIZE; + + /* Keep the last data file size info up to date, rounded to + full megabytes */ + + srv_data_file_sizes[srv_n_data_files - 1] = + (node->size / pages_per_mb) * pages_per_mb; + } + /* printf("Extended %s to %lu, actual size %lu pages\n", space->name, size_after_extend, *actual_size); */ diff --git a/innobase/include/fil0fil.h b/innobase/include/fil0fil.h index 9f854688ac7..75b32937e0b 100644 --- a/innobase/include/fil0fil.h +++ b/innobase/include/fil0fil.h @@ -480,7 +480,7 @@ fil_extend_space_to_desired_size( ulint* actual_size, /* out: size of the space after extension; if we ran out of disk space this may be lower than the desired size */ - ulint space_id, /* in: space id, must be != 0 */ + ulint space_id, /* in: space id */ ulint size_after_extend);/* in: desired size in pages after the extension; if the current space size is bigger than this already, the function does nothing */ diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index c45818ddd26..6d1482b6720 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -1509,7 +1509,6 @@ row_ins_scan_sec_index_for_duplicate( ibool moved; mtr_t mtr; trx_t* trx; - const char* ptr; n_unique = dict_index_get_n_unique(index); @@ -1630,7 +1629,6 @@ row_ins_duplicate_error_in_clust( page_t* page; ulint n_unique; trx_t* trx = thr_get_trx(thr); - const char* ptr; UT_NOT_USED(mtr); |