Skip to content

Commit 99a433e

Browse files
committed
Merge branch '10.6' into 10.7
2 parents 0a1d9d0 + b218766 commit 99a433e

File tree

96 files changed

+2793
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2793
-623
lines changed

cmake/maintainer.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ENDIF()
2323
SET(MY_WARNING_FLAGS
2424
-Wall
2525
-Wdeclaration-after-statement
26+
-Wenum-compare
27+
-Wenum-conversion
2628
-Wextra
2729
-Wformat-security
2830
-Wno-format-truncation

extra/mariabackup/xtrabackup.cc

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
5151
#include <my_getopt.h>
5252
#include <mysql_com.h>
5353
#include <my_default.h>
54+
#include <scope.h>
5455
#include <sql_class.h>
5556

5657
#include <fcntl.h>
@@ -4603,13 +4604,6 @@ static bool xtrabackup_backup_func()
46034604
}
46044605

46054606

4606-
if (auto b = aligned_malloc(UNIV_PAGE_SIZE_MAX, 4096)) {
4607-
field_ref_zero = static_cast<byte*>(
4608-
memset_aligned<4096>(b, 0, UNIV_PAGE_SIZE_MAX));
4609-
} else {
4610-
goto fail;
4611-
}
4612-
46134607
{
46144608
/* definition from recv_recovery_from_checkpoint_start() */
46154609
ulint max_cp_field;
@@ -4626,10 +4620,6 @@ static bool xtrabackup_backup_func()
46264620
msg("Error: cannot read redo log header");
46274621
unlock_and_fail:
46284622
mysql_mutex_unlock(&log_sys.mutex);
4629-
free_and_fail:
4630-
aligned_free(const_cast<byte*>(field_ref_zero));
4631-
field_ref_zero = nullptr;
4632-
goto fail;
46334623
}
46344624

46354625
if (log_sys.log.format == 0) {
@@ -4655,7 +4645,7 @@ static bool xtrabackup_backup_func()
46554645
xtrabackup_init_datasinks();
46564646

46574647
if (!select_history()) {
4658-
goto free_and_fail;
4648+
goto fail;
46594649
}
46604650

46614651
/* open the log file */
@@ -4664,7 +4654,7 @@ static bool xtrabackup_backup_func()
46644654
if (dst_log_file == NULL) {
46654655
msg("Error: failed to open the target stream for '%s'.",
46664656
LOG_FILE_NAME);
4667-
goto free_and_fail;
4657+
goto fail;
46684658
}
46694659

46704660
/* label it */
@@ -4702,7 +4692,7 @@ static bool xtrabackup_backup_func()
47024692
if (ds_write(dst_log_file, log_hdr_buf, LOG_FILE_HDR_SIZE)) {
47034693
msg("error: write to logfile failed");
47044694
aligned_free(log_hdr_buf);
4705-
goto free_and_fail;
4695+
goto fail;
47064696
}
47074697

47084698
aligned_free(log_hdr_buf);
@@ -4723,7 +4713,7 @@ static bool xtrabackup_backup_func()
47234713
" error %s.", ut_strerr(err));
47244714
fail_before_log_copying_thread_start:
47254715
log_copying_running = false;
4726-
goto free_and_fail;
4716+
goto fail;
47274717
}
47284718

47294719
/* copy log file by current position */
@@ -4746,7 +4736,7 @@ static bool xtrabackup_backup_func()
47464736

47474737
/* FLUSH CHANGED_PAGE_BITMAPS call */
47484738
if (!flush_changed_page_bitmaps()) {
4749-
goto free_and_fail;
4739+
goto fail;
47504740
}
47514741

47524742
ut_a(xtrabackup_parallel > 0);
@@ -4814,9 +4804,6 @@ static bool xtrabackup_backup_func()
48144804
if (opt_log_innodb_page_corruption)
48154805
ok = corrupted_pages.print_to_file(MB_CORRUPTED_PAGES_FILE);
48164806

4817-
aligned_free(const_cast<byte*>(field_ref_zero));
4818-
field_ref_zero = nullptr;
4819-
48204807
if (!ok) {
48214808
goto fail;
48224809
}
@@ -7004,6 +6991,20 @@ static int main_low(char** argv)
70046991
}
70056992
}
70066993

6994+
ut_ad(!field_ref_zero);
6995+
if (auto b = aligned_malloc(UNIV_PAGE_SIZE_MAX, 4096)) {
6996+
field_ref_zero = static_cast<byte*>(
6997+
memset_aligned<4096>(b, 0, UNIV_PAGE_SIZE_MAX));
6998+
} else {
6999+
msg("Can't allocate memory for field_ref_zero");
7000+
return EXIT_FAILURE;
7001+
}
7002+
7003+
auto _ = make_scope_exit([]() {
7004+
aligned_free(const_cast<byte*>(field_ref_zero));
7005+
field_ref_zero = nullptr;
7006+
});
7007+
70077008
/* --backup */
70087009
if (xtrabackup_backup && !xtrabackup_backup_func()) {
70097010
return(EXIT_FAILURE);

mysql-test/include/have_log_bin.inc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
source include/not_embedded.inc;
1010

11-
-- require include/have_log_bin.require
12-
disable_query_log;
13-
show variables like 'log_bin';
14-
enable_query_log;
11+
if (`select not @@log_bin`) {
12+
skip Test requires: 'have_log_bin';
13+
}

mysql-test/include/have_log_bin.require

Lines changed: 0 additions & 2 deletions
This file was deleted.

mysql-test/main/alter_table_lock.result

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ ERROR 42S02: Table 'test.x' doesn't exist
1111
SET SESSION max_session_mem_used= 8192;
1212
LOCK TABLE t1 WRITE;
1313
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
14-
Warnings:
15-
Note 1054 Unknown column 'b' in 't1'
1614
SET SESSION max_session_mem_used = @max_session_mem_used_save;
1715
UNLOCK TABLES;
1816
DROP TABLE t1;

mysql-test/main/alter_table_lock.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ SELECT * FROM t1;
1414
ALTER TABLE x MODIFY xx INT;
1515

1616
SET SESSION max_session_mem_used= 8192;
17+
--error 0,ER_OPTION_PREVENTS_STATEMENT
1718
LOCK TABLE t1 WRITE;
1819

20+
--disable_warnings
21+
--error 0,ER_OPTION_PREVENTS_STATEMENT
1922
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
23+
--enable_warnings
2024

2125
SET SESSION max_session_mem_used = @max_session_mem_used_save;
2226
UNLOCK TABLES;

mysql-test/main/insert.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,14 @@ select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
776776
ERROR 42S22: Unknown column 't1.a' in 'on clause'
777777
drop table t;
778778
#
779+
# MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
780+
#
781+
create table t1 (i int) ;
782+
create table t2 (j int) ;
783+
create table t4 select * from t1 join t2 on (select t3.i);
784+
ERROR 42S22: Unknown column 't3.i' in 'field list'
785+
drop table t1, t2;
786+
#
779787
# End of 10.4 tests
780788
#
781789
#

mysql-test/main/insert.test

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,15 @@ create table t (a int);
640640
select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
641641
drop table t;
642642

643+
--echo #
644+
--echo # MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
645+
--echo #
646+
create table t1 (i int) ;
647+
create table t2 (j int) ;
648+
--error ER_BAD_FIELD_ERROR
649+
create table t4 select * from t1 join t2 on (select t3.i);
650+
drop table t1, t2;
651+
643652
--echo #
644653
--echo # End of 10.4 tests
645654
--echo #
@@ -660,4 +669,3 @@ drop table t1;
660669
--echo #
661670
--echo # End of 10.5 tests
662671
--echo #
663-

mysql-test/main/mysql_install_db_win.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ remove_file $log;
4242

4343
rmdir $ddir;
4444

45+
# MDEV-28471 - mysql_install_db.exe fails with --innodb-page-size=64K
46+
--disable_result_log
47+
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R --innodb-page-size=64K --verbose
48+
--enable_result_log
49+
rmdir $ddir;
50+
51+
# Tests with config file
4552
let $restart_parameters=;
4653
connection default;
4754

0 commit comments

Comments
 (0)