From ae688808fab96f7d3995839d07a61b7990fe51cd Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 31 Mar 2020 11:39:36 +1100 Subject: mtr: Only old windows patch-2.5.9 needs --binary Windows GNU patch 2.7.6 is ok without it. So account for the old buildbot version for now. Linux works without it. --binary fails on FreeBSD-12.0: $ patch --version patch 2.0-12u11 FreeBSD $ patch --binary patch: unrecognized option `--binary' --- mysql-test/mysql-test-run.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 677dd58f99b..fc152b232ca 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3385,8 +3385,11 @@ sub do_before_run_mysqltest($) # to be able to distinguish them from manually created # version-controlled results, and to ignore them in git. my $dest = "$base_file$suites.result~"; - my @cmd = ($exe_patch, qw/--binary -r - -f -s -o/, - $dest, $base_result, $resfile); + my @cmd = ($exe_patch); + if ($^O eq "MSWin32") { + push @cmd, '--binary'; + } + push @cmd, (qw/-r - -f -s -o/, $dest, $base_result, $resfile); if (-w $resdir) { # don't rebuild a file if it's up to date unless (-e $dest and -M $dest < -M $resfile -- cgit v1.2.1 From a215e2132db41c2b1b3f9a6898fcb37e9ae4734f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 15 Apr 2020 14:47:56 +0300 Subject: mbstream: Remove duplicate definition of datasink_buffer For some reason, when mbstream is compiled with GCC 10, ld will fail to link it due to a multiple definition of datasink_buffer. The code appears to have been like that since the very beginning. Let us remove the duplicate dummy definition. --- extra/mariabackup/xbstream.c | 1 - 1 file changed, 1 deletion(-) diff --git a/extra/mariabackup/xbstream.c b/extra/mariabackup/xbstream.c index 59e0095f63c..6a4b203a684 100644 --- a/extra/mariabackup/xbstream.c +++ b/extra/mariabackup/xbstream.c @@ -45,7 +45,6 @@ datasink_t datasink_archive; datasink_t datasink_xbstream; datasink_t datasink_compress; datasink_t datasink_tmpfile; -datasink_t datasink_buffer; static run_mode_t opt_mode; static char * opt_directory = NULL; -- cgit v1.2.1 From f8166a05af085aeb22be8bc1f41bac9affe4a96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 15 Apr 2020 14:51:49 +0300 Subject: MDEV-21549 IMPORT TABLESPACE fails to adjust all tablespace ID in root pages After MDEV-12353, the consistency check that I originally added for commit 1b9fe0bbac72d49a32863241b2b5081438b5f691 (InnoDB Plugin for MySQL 5.1) started randomly failing. It turns out that the IMPORT TABLESPACE code was always incorrect: it did not update the (redundantly stored) tablespace ID in index tree root pages. It only does that for page headers and BLOB pointers. PageConverter::update_index_page(): Update the tablespace ID in the BTR_SEG_TOP and BTR_SEG_LEAF of index root pages. This is a backport of commit b8b3edff1376dc68c13d819470edfb33c339a64b. --- storage/innobase/row/row0import.cc | 19 ++++++++++++++++++- storage/xtradb/row/row0import.cc | 23 ++++++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index e1554949127..f5e882f96fe 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2018, MariaDB Corporation. +Copyright (c) 2015, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1924,6 +1924,23 @@ PageConverter::update_index_page( return(DB_SUCCESS); } + if (m_index && block->page.offset == m_index->m_page_no) { + byte *b = FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF + FSEG_HDR_SPACE + + page; + mach_write_to_4(b, block->page.space); + + memcpy(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP + FSEG_HDR_SPACE + + page, b, 4); + if (UNIV_LIKELY_NULL(block->page.zip.data)) { + memcpy(&block->page.zip.data[FIL_PAGE_DATA + + PAGE_BTR_SEG_TOP + + FSEG_HDR_SPACE], b, 4); + memcpy(&block->page.zip.data[FIL_PAGE_DATA + + PAGE_BTR_SEG_LEAF + + FSEG_HDR_SPACE], b, 4); + } + } + #ifdef UNIV_ZIP_DEBUG ut_a(!is_compressed_table() || page_zip_validate(m_page_zip_ptr, page, m_index->m_srv_index)); diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc index 5b371cfbf74..f5e882f96fe 100644 --- a/storage/xtradb/row/row0import.cc +++ b/storage/xtradb/row/row0import.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2018, MariaDB Corporation. +Copyright (c) 2015, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1353,8 +1353,8 @@ uncompressed: return(DB_ERROR); } else if (m_table->n_cols != m_n_cols) { ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH, - "Number of columns don't match, table has %u" - " columns but the tablespace meta-data file has " + "Number of columns don't match, table has %u " + "columns but the tablespace meta-data file has " ULINTPF " columns", m_table->n_cols, m_n_cols); @@ -1924,6 +1924,23 @@ PageConverter::update_index_page( return(DB_SUCCESS); } + if (m_index && block->page.offset == m_index->m_page_no) { + byte *b = FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF + FSEG_HDR_SPACE + + page; + mach_write_to_4(b, block->page.space); + + memcpy(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP + FSEG_HDR_SPACE + + page, b, 4); + if (UNIV_LIKELY_NULL(block->page.zip.data)) { + memcpy(&block->page.zip.data[FIL_PAGE_DATA + + PAGE_BTR_SEG_TOP + + FSEG_HDR_SPACE], b, 4); + memcpy(&block->page.zip.data[FIL_PAGE_DATA + + PAGE_BTR_SEG_LEAF + + FSEG_HDR_SPACE], b, 4); + } + } + #ifdef UNIV_ZIP_DEBUG ut_a(!is_compressed_table() || page_zip_validate(m_page_zip_ptr, page, m_index->m_srv_index)); -- cgit v1.2.1