Skip to content

Commit de0e7cd

Browse files
committed
Merge 10.2 into 10.3
2 parents 90c8d77 + a79c257 commit de0e7cd

38 files changed

+417
-318
lines changed

client/mysqltest.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9091,10 +9091,6 @@ static void init_signal_handling(void)
90919091
struct sigaction sa;
90929092
DBUG_ENTER("init_signal_handling");
90939093

9094-
#ifdef HAVE_STACKTRACE
9095-
my_init_stacktrace();
9096-
#endif
9097-
90989094
sa.sa_flags = SA_RESETHAND | SA_NODEFER;
90999095
sigemptyset(&sa.sa_mask);
91009096
sigprocmask(SIG_SETMASK, &sa.sa_mask, NULL);

extra/mariabackup/xtrabackup.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ my_bool innobase_locks_unsafe_for_binlog;
249249
my_bool innobase_rollback_on_timeout;
250250
my_bool innobase_create_status_file;
251251

252+
/* The following counter is used to convey information to InnoDB
253+
about server activity: in selects it is not sensible to call
254+
srv_active_wake_master_thread after each fetch or search, we only do
255+
it every INNOBASE_WAKE_INTERVAL'th step. */
256+
257+
#define INNOBASE_WAKE_INTERVAL 32
252258
ulong innobase_active_counter = 0;
253259

254260
#ifndef _WIN32
@@ -2006,10 +2012,6 @@ static bool innodb_init_param()
20062012
srv_undo_dir = (char*) ".";
20072013
}
20082014

2009-
log_checksum_algorithm_ptr = innodb_log_checksums || srv_encrypt_log
2010-
? log_block_calc_checksum_crc32
2011-
: log_block_calc_checksum_none;
2012-
20132015
#ifdef _WIN32
20142016
srv_use_native_aio = TRUE;
20152017
#endif

include/my_stacktrace.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
C_MODE_START
4242

4343
#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
44-
void my_init_stacktrace();
4544
void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack,
4645
my_bool silent);
4746
int my_safe_print_str(const char* val, size_t max_len);
@@ -52,8 +51,6 @@ char *my_demangle(const char *mangled_name, int *status);
5251
#ifdef __WIN__
5352
void my_set_exception_pointers(EXCEPTION_POINTERS *ep);
5453
#endif /* __WIN__ */
55-
#else
56-
#define my_init_stacktrace() do { } while(0)
5754
#endif /* ! (defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)) */
5855

5956
#ifndef _WIN32

mysql-test/main/mysql_tzinfo_to_sql_symlink.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ TRUNCATE TABLE time_zone;
1515
TRUNCATE TABLE time_zone_name;
1616
TRUNCATE TABLE time_zone_transition;
1717
TRUNCATE TABLE time_zone_transition_type;
18+
START TRANSACTION;
1819
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
1920
SET @time_zone_id= LAST_INSERT_ID();
2021
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
@@ -32,6 +33,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
3233
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
3334
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/ignored.tab' as time zone. Skipping it.
3435
Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid infinite symlink recursion.
36+
COMMIT;
3537
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
3638
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
3739
\d |
@@ -57,6 +59,7 @@ TRUNCATE TABLE time_zone;
5759
TRUNCATE TABLE time_zone_name;
5860
TRUNCATE TABLE time_zone_transition;
5961
TRUNCATE TABLE time_zone_transition_type;
62+
START TRANSACTION;
6063
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
6164
SET @time_zone_id= LAST_INSERT_ID();
6265
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
@@ -71,6 +74,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
7174
(@time_zone_id, 0, 0, 0, 'GMT')
7275
;
7376
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
77+
COMMIT;
7478
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
7579
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
7680
\d |
@@ -160,6 +164,8 @@ TRUNCATE TABLE time_zone;
160164
TRUNCATE TABLE time_zone_name;
161165
TRUNCATE TABLE time_zone_transition;
162166
TRUNCATE TABLE time_zone_transition_type;
167+
START TRANSACTION;
168+
COMMIT;
163169
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
164170
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
165171
\d |

mysql-test/suite/encryption/r/innodb_encrypt_log.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
SET GLOBAL innodb_log_checksums=0;
99
Warnings:
10-
Warning 138 innodb_encrypt_log implies innodb_log_checksums
10+
Warning 138 innodb_log_checksums is deprecated and has no effect outside recovery
1111
SELECT @@global.innodb_log_checksums;
1212
@@global.innodb_log_checksums
1313
1

mysql-test/suite/innodb/r/foreign_key.result

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
658658
# MDEV-17187 table doesn't exist in engine after ALTER other tables
659659
# with CONSTRAINTs
660660
#
661+
call mtr.add_suppression("\\[Warning\\] InnoDB: In ALTER TABLE `test`\\.`t2` has or is referenced in foreign key constraints which are not compatible with the new table definition.");
661662
set foreign_key_checks=on;
662663
create table t1 (id int not null primary key) engine=innodb;
663664
create table t2 (id int not null primary key, fid int not null,
@@ -713,4 +714,30 @@ drop table t1,t2;
713714
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
714715
drop table t1,t2;
715716
ERROR 42S02: Unknown table 'test.t2'
717+
#
718+
# MDEV-22934 Table disappear after two alter table command
719+
#
720+
CREATE TABLE t1(f1 INT NOT NULL AUTO_INCREMENT,
721+
f2 INT NOT NULL,
722+
PRIMARY KEY (f1), INDEX (f2))ENGINE=InnoDB;
723+
CREATE TABLE t2(f1 INT NOT NULL,
724+
f2 INT NOT NULL, f3 INT NOT NULL,
725+
PRIMARY KEY(f1, f2), UNIQUE KEY(f2),
726+
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (f2) REFERENCES t1(f2) ON DELETE CASCADE,
727+
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (f1) REFERENCES t1(f1) ON DELETE CASCADE
728+
) ENGINE=InnoDB;
729+
SET FOREIGN_KEY_CHECKS=0;
730+
ALTER TABLE t2 DROP PRIMARY KEY, ADD PRIMARY KEY(f3), ALGORITHM=INPLACE;
731+
ALTER TABLE t2 DROP INDEX `f2`, ALGORITHM=COPY;
732+
SHOW CREATE TABLE t2;
733+
Table Create Table
734+
t2 CREATE TABLE `t2` (
735+
`f1` int(11) NOT NULL,
736+
`f2` int(11) NOT NULL,
737+
`f3` int(11) NOT NULL,
738+
PRIMARY KEY (`f3`)
739+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
740+
CREATE TABLE t2 (f1 INT NOT NULL)ENGINE=InnoDB;
741+
ERROR 42S01: Table 't2' already exists
742+
DROP TABLE t2, t1;
716743
# End of 10.2 tests

mysql-test/suite/innodb/r/innodb.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2543,7 +2543,6 @@ set foreign_key_checks=0;
25432543
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb;
25442544
create table t1(a varchar(10) primary key) engine = innodb;
25452545
alter table t1 modify column a int;
2546-
Got one of the listed errors
25472546
set foreign_key_checks=1;
25482547
drop table t2,t1;
25492548
set foreign_key_checks=0;
@@ -2552,6 +2551,7 @@ create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin
25522551
alter table t1 convert to character set utf8;
25532552
set foreign_key_checks=1;
25542553
drop table t2,t1;
2554+
call mtr.add_suppression("\\[Warning\\] InnoDB: In ALTER TABLE `test`.`t1` has or is referenced in foreign key constraints which are not compatible with the new table definition.");
25552555
set foreign_key_checks=0;
25562556
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
25572557
create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;

mysql-test/suite/innodb/t/foreign_key.test

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@ SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
657657
--echo # with CONSTRAINTs
658658
--echo #
659659

660+
call mtr.add_suppression("\\[Warning\\] InnoDB: In ALTER TABLE `test`\\.`t2` has or is referenced in foreign key constraints which are not compatible with the new table definition.");
661+
660662
set foreign_key_checks=on;
661663
create table t1 (id int not null primary key) engine=innodb;
662664
create table t2 (id int not null primary key, fid int not null,
@@ -698,6 +700,27 @@ drop table t1,t2;
698700
--error ER_BAD_TABLE_ERROR
699701
drop table t1,t2;
700702

703+
--echo #
704+
--echo # MDEV-22934 Table disappear after two alter table command
705+
--echo #
706+
CREATE TABLE t1(f1 INT NOT NULL AUTO_INCREMENT,
707+
f2 INT NOT NULL,
708+
PRIMARY KEY (f1), INDEX (f2))ENGINE=InnoDB;
709+
CREATE TABLE t2(f1 INT NOT NULL,
710+
f2 INT NOT NULL, f3 INT NOT NULL,
711+
PRIMARY KEY(f1, f2), UNIQUE KEY(f2),
712+
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (f2) REFERENCES t1(f2) ON DELETE CASCADE,
713+
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (f1) REFERENCES t1(f1) ON DELETE CASCADE
714+
) ENGINE=InnoDB;
715+
716+
SET FOREIGN_KEY_CHECKS=0;
717+
ALTER TABLE t2 DROP PRIMARY KEY, ADD PRIMARY KEY(f3), ALGORITHM=INPLACE;
718+
ALTER TABLE t2 DROP INDEX `f2`, ALGORITHM=COPY;
719+
SHOW CREATE TABLE t2;
720+
--error ER_TABLE_EXISTS_ERROR
721+
CREATE TABLE t2 (f1 INT NOT NULL)ENGINE=InnoDB;
722+
DROP TABLE t2, t1;
723+
701724
--echo # End of 10.2 tests
702725

703726
--source include/wait_until_count_sessions.inc

mysql-test/suite/innodb/t/innodb.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,6 @@ drop table t1;
16271627
set foreign_key_checks=0;
16281628
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb;
16291629
create table t1(a varchar(10) primary key) engine = innodb;
1630-
-- error 1025,1025
16311630
alter table t1 modify column a int;
16321631
set foreign_key_checks=1;
16331632
drop table t2,t1;
@@ -1643,6 +1642,7 @@ drop table t2,t1;
16431642

16441643
# test that RENAME does not allow invalid charsets when f_k_c is 0
16451644

1645+
call mtr.add_suppression("\\[Warning\\] InnoDB: In ALTER TABLE `test`.`t1` has or is referenced in foreign key constraints which are not compatible with the new table definition.");
16461646
set foreign_key_checks=0;
16471647
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
16481648
create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;

mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ SELECT @@global.innodb_log_checksums;
2828
@@global.innodb_log_checksums
2929
1
3030
SET GLOBAL innodb_log_checksums = OFF;
31+
Warnings:
32+
Warning 138 innodb_log_checksums is deprecated and has no effect outside recovery
3133
SELECT @@global.innodb_log_checksums;
3234
@@global.innodb_log_checksums
33-
0
35+
1
3436
SET GLOBAL innodb_log_checksums = default;
3537
SET GLOBAL innodb_log_checksums = ON;
3638
SELECT @@global.innodb_log_checksums;

0 commit comments

Comments
 (0)