Commit 4b00336e authored by marko's avatar marko

branches/zip: fil_space_truncate_start(): Fix an incorrect assertion,

disable unless #ifdef UNIV_LOG_ARCHIVE.
parent 83a96d34
...@@ -980,6 +980,7 @@ fil_node_free( ...@@ -980,6 +980,7 @@ fil_node_free(
mem_free(node); mem_free(node);
} }
#ifdef UNIV_LOG_ARCHIVE
/******************************************************************** /********************************************************************
Drops files from the start of a file space, so that its size is cut by Drops files from the start of a file space, so that its size is cut by
the amount given. */ the amount given. */
...@@ -1005,7 +1006,7 @@ fil_space_truncate_start( ...@@ -1005,7 +1006,7 @@ fil_space_truncate_start(
while (trunc_len > 0) { while (trunc_len > 0) {
node = UT_LIST_GET_FIRST(space->chain); node = UT_LIST_GET_FIRST(space->chain);
ut_a(node->size * UNIV_PAGE_SIZE >= trunc_len); ut_a(node->size * UNIV_PAGE_SIZE <= trunc_len);
trunc_len -= node->size * UNIV_PAGE_SIZE; trunc_len -= node->size * UNIV_PAGE_SIZE;
...@@ -1014,6 +1015,7 @@ fil_space_truncate_start( ...@@ -1014,6 +1015,7 @@ fil_space_truncate_start(
mutex_exit(&(system->mutex)); mutex_exit(&(system->mutex));
} }
#endif /* UNIV_LOG_ARCHIVE */
/*********************************************************************** /***********************************************************************
Creates a space memory object and puts it to the tablespace memory cache. If Creates a space memory object and puts it to the tablespace memory cache. If
......
...@@ -178,6 +178,7 @@ fil_node_create( ...@@ -178,6 +178,7 @@ fil_node_create(
ulint id, /* in: space id where to append */ ulint id, /* in: space id where to append */
ibool is_raw);/* in: TRUE if a raw device or ibool is_raw);/* in: TRUE if a raw device or
a raw disk partition */ a raw disk partition */
#ifdef UNIV_LOG_ARCHIVE
/******************************************************************** /********************************************************************
Drops files from the start of a file space, so that its size is cut by Drops files from the start of a file space, so that its size is cut by
the amount given. */ the amount given. */
...@@ -189,6 +190,7 @@ fil_space_truncate_start( ...@@ -189,6 +190,7 @@ fil_space_truncate_start(
ulint trunc_len); /* in: truncate by this much; it is an error ulint trunc_len); /* in: truncate by this much; it is an error
if this does not equal to the combined size of if this does not equal to the combined size of
some initial files in the space */ some initial files in the space */
#endif /* UNIV_LOG_ARCHIVE */
/*********************************************************************** /***********************************************************************
Creates a space memory object and puts it to the 'fil system' hash table. If Creates a space memory object and puts it to the 'fil system' hash table. If
there is an error, prints an error message to the .err log. */ there is an error, prints an error message to the .err log. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment