summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-11-20 18:36:41 +0100
committerunknown <serg@serg.mylan>2004-11-20 18:36:41 +0100
commit7b0069ee20c5f0a43149aa962ac1b26f19257b23 (patch)
tree62ae289d237eebb2f3c921cb532cc66e70229341 /innobase
parent15092975f506dfadeb379805f78e50e2939a2911 (diff)
parenta3740c887e940144828543bc7c4e1ddfa8de2b7e (diff)
downloadmariadb-git-7b0069ee20c5f0a43149aa962ac1b26f19257b23.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')
-rw-r--r--innobase/fil/fil0fil.c19
-rw-r--r--innobase/include/fil0fil.h2
-rw-r--r--innobase/row/row0ins.c2
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);