mirror of
https://github.com/MariaDB/server.git
synced 2026-05-08 08:04:29 +02:00
Applying InnoDB snapshot
Detailed revision comments: r6779 | marko | 2010-03-08 14:35:42 +0200 (Mon, 08 Mar 2010) | 6 lines branches/zip: Fix IMPORT TABLESPACE of compressed tables. Previously, a wrong parameter was passed to buf_flush_init_for_writing(). fil_reset_too_high_lsns(): Set up page_zip and use it if needed. rb://264, Issue #352
This commit is contained in:
parent
191c9d269f
commit
f37a632954
2 changed files with 25 additions and 9 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-03-08 The InnoDB Team
|
||||||
|
|
||||||
|
* fil/fil0fil.c:
|
||||||
|
Fix ALTER TABLE ... IMPORT TABLESPACE of compressed tables.
|
||||||
|
|
||||||
2010-03-03 The InnoDB Team
|
2010-03-03 The InnoDB Team
|
||||||
|
|
||||||
* handler/handler0alter.cc, innodb-index.result, innodb-index.test,
|
* handler/handler0alter.cc, innodb-index.result, innodb-index.test,
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ Created 10/25/1995 Heikki Tuuri
|
||||||
#include "mtr0mtr.h"
|
#include "mtr0mtr.h"
|
||||||
#include "mtr0log.h"
|
#include "mtr0log.h"
|
||||||
#include "dict0dict.h"
|
#include "dict0dict.h"
|
||||||
|
#include "page0page.h"
|
||||||
#include "page0zip.h"
|
#include "page0zip.h"
|
||||||
#ifndef UNIV_HOTBACKUP
|
#ifndef UNIV_HOTBACKUP
|
||||||
# include "buf0lru.h"
|
# include "buf0lru.h"
|
||||||
|
|
@ -2788,6 +2789,7 @@ fil_reset_too_high_lsns(
|
||||||
ib_int64_t offset;
|
ib_int64_t offset;
|
||||||
ulint zip_size;
|
ulint zip_size;
|
||||||
ibool success;
|
ibool success;
|
||||||
|
page_zip_des_t page_zip;
|
||||||
|
|
||||||
filepath = fil_make_ibd_name(name, FALSE);
|
filepath = fil_make_ibd_name(name, FALSE);
|
||||||
|
|
||||||
|
|
@ -2835,6 +2837,12 @@ fil_reset_too_high_lsns(
|
||||||
space_id = fsp_header_get_space_id(page);
|
space_id = fsp_header_get_space_id(page);
|
||||||
zip_size = fsp_header_get_zip_size(page);
|
zip_size = fsp_header_get_zip_size(page);
|
||||||
|
|
||||||
|
page_zip_des_init(&page_zip);
|
||||||
|
page_zip_set_size(&page_zip, zip_size);
|
||||||
|
if (zip_size) {
|
||||||
|
page_zip.data = page + UNIV_PAGE_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
ut_print_timestamp(stderr);
|
ut_print_timestamp(stderr);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
" InnoDB: Flush lsn in the tablespace file %lu"
|
" InnoDB: Flush lsn in the tablespace file %lu"
|
||||||
|
|
@ -2869,20 +2877,23 @@ fil_reset_too_high_lsns(
|
||||||
/* We have to reset the lsn */
|
/* We have to reset the lsn */
|
||||||
|
|
||||||
if (zip_size) {
|
if (zip_size) {
|
||||||
memcpy(page + UNIV_PAGE_SIZE, page, zip_size);
|
memcpy(page_zip.data, page, zip_size);
|
||||||
buf_flush_init_for_writing(
|
buf_flush_init_for_writing(
|
||||||
page, page + UNIV_PAGE_SIZE,
|
page, &page_zip, current_lsn);
|
||||||
current_lsn);
|
success = os_file_write(
|
||||||
|
filepath, file, page_zip.data,
|
||||||
|
(ulint) offset & 0xFFFFFFFFUL,
|
||||||
|
(ulint) (offset >> 32), zip_size);
|
||||||
} else {
|
} else {
|
||||||
buf_flush_init_for_writing(
|
buf_flush_init_for_writing(
|
||||||
page, NULL, current_lsn);
|
page, NULL, current_lsn);
|
||||||
|
success = os_file_write(
|
||||||
|
filepath, file, page,
|
||||||
|
(ulint)(offset & 0xFFFFFFFFUL),
|
||||||
|
(ulint)(offset >> 32),
|
||||||
|
UNIV_PAGE_SIZE);
|
||||||
}
|
}
|
||||||
success = os_file_write(filepath, file, page,
|
|
||||||
(ulint)(offset & 0xFFFFFFFFUL),
|
|
||||||
(ulint)(offset >> 32),
|
|
||||||
zip_size
|
|
||||||
? zip_size
|
|
||||||
: UNIV_PAGE_SIZE);
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|
||||||
goto func_exit;
|
goto func_exit;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue