diff --git a/mysql-test/include/binlog_parallel_replication_marks.test b/mysql-test/include/binlog_parallel_replication_marks.test index a6db745c25b..b915d26ce99 100644 --- a/mysql-test/include/binlog_parallel_replication_marks.test +++ b/mysql-test/include/binlog_parallel_replication_marks.test @@ -7,10 +7,6 @@ RESET MASTER; --source include/wait_for_binlog_checkpoint.inc -set time_zone="+02:00"; ---let $stable_stamp= `SELECT UNIX_TIMESTAMP("2020-01-21 15:32:22")` -eval set timestamp=$stable_stamp; - CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; --let $binlog_pos1=query_get_value(SHOW MASTER STATUS, Position, 1) /* GTID */ INSERT INTO t1 VALUES (1,0); @@ -42,7 +38,6 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; /* GTID */ INSERT INTO t1 VALUES (9, 5, 1); /* GTID */ COMMIT; connect (tmp_con,localhost,root,,); -eval set timestamp=$stable_stamp; /* GTID */ INSERT INTO t1 VALUES (10, 6, 0); /* GTID */ BEGIN; /* GTID */ CREATE TEMPORARY TABLE t5 (a INT PRIMARY KEY) ENGINE=InnoDB; @@ -72,7 +67,7 @@ my $file= $ENV{'OUTPUT_FILE'}; open F, "<", $file or die "Unable to open file '$file': $!\n"; while () { - s/^#\d+ \d+:\d+:\d+ /# /; + s/^#\d+ +\d+:\d+:\d+ /# /; s/GTID \d+-\d+-\d+/GTID #-#-#/; s/end_log_pos \d+/end_log_pos #/; s/table id \d+/table id #/; diff --git a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result index 68455cb454b..d63538e5318 100644 --- a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result +++ b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result @@ -1,6 +1,4 @@ RESET MASTER; -set time_zone="+02:00"; -set timestamp=1579613542; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; /* GTID */ INSERT INTO t1 VALUES (1,0); /* GTID */ BEGIN; @@ -31,7 +29,6 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; /* GTID */ INSERT INTO t1 VALUES (9, 5, 1); /* GTID */ COMMIT; connect tmp_con,localhost,root,,; -set timestamp=1579613542; /* GTID */ INSERT INTO t1 VALUES (10, 6, 0); /* GTID */ BEGIN; /* GTID */ CREATE TEMPORARY TABLE t5 (a INT PRIMARY KEY) ENGINE=InnoDB; diff --git a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result index d0ccb2adc14..c56dff9c8a0 100644 --- a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result +++ b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result @@ -1,6 +1,4 @@ RESET MASTER; -set time_zone="+02:00"; -set timestamp=1579613542; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; /* GTID */ INSERT INTO t1 VALUES (1,0); /* GTID */ BEGIN; @@ -31,7 +29,6 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; /* GTID */ INSERT INTO t1 VALUES (9, 5, 1); /* GTID */ COMMIT; connect tmp_con,localhost,root,,; -set timestamp=1579613542; /* GTID */ INSERT INTO t1 VALUES (10, 6, 0); /* GTID */ BEGIN; /* GTID */ CREATE TEMPORARY TABLE t5 (a INT PRIMARY KEY) ENGINE=InnoDB; diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled index f5ce4d77c6b..b7025bcd606 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled @@ -705,7 +705,7 @@ +COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES SESSION_VALUE NULL - GLOBAL_VALUE OFF + GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME @@ -1397,7 +1677,7 @@ GLOBAL_VALUE_ORIGIN CONFIG diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled index 9199653b460..af8777c4f4b 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled @@ -379,7 +379,7 @@ +COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES SESSION_VALUE NULL - GLOBAL_VALUE OFF + GLOBAL_VALUE ON @@ -1447,6 +1727,34 @@ ENUM_VALUE_LIST NULL READ_ONLY NO diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 6b5db7e923b..9b474fd5dee 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -350,10 +350,13 @@ int print_explain_row(select_result_sink *result, item_list.push_back(new (mem_root) Item_string_sys(thd, jtype_str), mem_root); - /* 'possible_keys' */ + /* 'possible_keys' + The buffer must not be deallocated before we call send_data, otherwise + we may end up reading freed memory. + */ + StringBuffer<64> possible_keys_buf; if (possible_keys && !possible_keys->is_empty()) { - StringBuffer<64> possible_keys_buf; push_string_list(thd, &item_list, *possible_keys, &possible_keys_buf); } else diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index f556c887520..ffb8808d6b4 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -66,12 +66,12 @@ page_zip_stat_t page_zip_stat[PAGE_ZIP_SSIZE_MAX]; /** Statistics on compression, indexed by index->id */ page_zip_stat_per_index_t page_zip_stat_per_index; -/* Compression level to be used by zlib. Settable by user. */ -uint page_zip_level = DEFAULT_COMPRESSION_LEVEL; +/** Compression level to be used by zlib. Settable by user. */ +uint page_zip_level; -/* Whether or not to log compressed page images to avoid possible +/** Whether or not to log compressed page images to avoid possible compression algorithm changes in zlib. */ -my_bool page_zip_log_pages = true; +my_bool page_zip_log_pages; /* Please refer to ../include/page0zip.ic for a description of the compressed page format. */ diff --git a/storage/xtradb/page/page0zip.cc b/storage/xtradb/page/page0zip.cc index 32e76fb44e6..bf7b4928e61 100644 --- a/storage/xtradb/page/page0zip.cc +++ b/storage/xtradb/page/page0zip.cc @@ -2,7 +2,7 @@ Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2014, SkySQL Ab. All Rights Reserved. +Copyright (c) 2014, 2017, 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 @@ -83,12 +83,12 @@ UNIV_INTERN mysql_pfs_key_t page_zip_stat_per_index_mutex_key; #endif /* !UNIV_INNOCHECKSUM */ #endif /* !UNIV_HOTBACKUP */ -/* Compression level to be used by zlib. Settable by user. */ -UNIV_INTERN uint page_zip_level = DEFAULT_COMPRESSION_LEVEL; +/** Compression level to be used by zlib. Settable by user. */ +UNIV_INTERN uint page_zip_level; -/* Whether or not to log compressed page images to avoid possible +/** Whether or not to log compressed page images to avoid possible compression algorithm changes in zlib. */ -UNIV_INTERN my_bool page_zip_log_pages = false; +UNIV_INTERN my_bool page_zip_log_pages; /* Please refer to ../include/page0zip.ic for a description of the compressed page format. */