|
1 | 1 | /*****************************************************************************
|
2 | 2 |
|
3 | 3 | Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
4 |
| -Copyright (c) 2015, 2018, MariaDB Corporation. |
| 4 | +Copyright (c) 2015, 2020, MariaDB Corporation. |
5 | 5 |
|
6 | 6 | This program is free software; you can redistribute it and/or modify it under
|
7 | 7 | the terms of the GNU General Public License as published by the Free Software
|
@@ -1353,8 +1353,8 @@ row_import::match_schema(
|
1353 | 1353 | return(DB_ERROR);
|
1354 | 1354 | } else if (m_table->n_cols != m_n_cols) {
|
1355 | 1355 | ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
|
1356 |
| - "Number of columns don't match, table has %u" |
1357 |
| - " columns but the tablespace meta-data file has " |
| 1356 | + "Number of columns don't match, table has %u " |
| 1357 | + "columns but the tablespace meta-data file has " |
1358 | 1358 | ULINTPF " columns",
|
1359 | 1359 | m_table->n_cols, m_n_cols);
|
1360 | 1360 |
|
@@ -1924,6 +1924,23 @@ PageConverter::update_index_page(
|
1924 | 1924 | return(DB_SUCCESS);
|
1925 | 1925 | }
|
1926 | 1926 |
|
| 1927 | + if (m_index && block->page.offset == m_index->m_page_no) { |
| 1928 | + byte *b = FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF + FSEG_HDR_SPACE |
| 1929 | + + page; |
| 1930 | + mach_write_to_4(b, block->page.space); |
| 1931 | + |
| 1932 | + memcpy(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP + FSEG_HDR_SPACE |
| 1933 | + + page, b, 4); |
| 1934 | + if (UNIV_LIKELY_NULL(block->page.zip.data)) { |
| 1935 | + memcpy(&block->page.zip.data[FIL_PAGE_DATA |
| 1936 | + + PAGE_BTR_SEG_TOP |
| 1937 | + + FSEG_HDR_SPACE], b, 4); |
| 1938 | + memcpy(&block->page.zip.data[FIL_PAGE_DATA |
| 1939 | + + PAGE_BTR_SEG_LEAF |
| 1940 | + + FSEG_HDR_SPACE], b, 4); |
| 1941 | + } |
| 1942 | + } |
| 1943 | + |
1927 | 1944 | #ifdef UNIV_ZIP_DEBUG
|
1928 | 1945 | ut_a(!is_compressed_table()
|
1929 | 1946 | || page_zip_validate(m_page_zip_ptr, page, m_index->m_srv_index));
|
|
0 commit comments