diff options
author | unknown <serg@serg.mylan> | 2004-11-20 18:36:41 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-11-20 18:36:41 +0100 |
commit | dd4cac8cfab2618fcb7e9f5c898ef2e3aa21b8d4 (patch) | |
tree | 62ae289d237eebb2f3c921cb532cc66e70229341 /innobase/fil | |
parent | 6f190c25ba1a7c9fddc43f5e4098fb0e65854d4a (diff) | |
parent | 1d50a78c2b7849051ac242d7a148c2c6f60a48c7 (diff) | |
download | mariadb-git-dd4cac8cfab2618fcb7e9f5c898ef2e3aa21b8d4.tar.gz |
merged
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
client/Makefile.am:
Auto merged
client/mysqlbinlog.cc:
Auto merged
configure.in:
Auto merged
include/my_time.h:
Auto merged
innobase/fil/fil0fil.c:
Auto merged
innobase/include/fil0fil.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
tests/client_test.c:
Auto merged
Diffstat (limited to 'innobase/fil')
-rw-r--r-- | innobase/fil/fil0fil.c | 19 |
1 files changed, 16 insertions, 3 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); */ |