Skip to content

Commit 2e67e66

Browse files
committed
Merge 10.0 into 10.1
2 parents 6da2adf + f162704 commit 2e67e66

29 files changed

+624
-549
lines changed

client/mysqltest.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,6 +3339,8 @@ void do_exec(struct st_command *command)
33393339
DBUG_ENTER("do_exec");
33403340
DBUG_PRINT("enter", ("cmd: '%s'", cmd));
33413341

3342+
var_set_int("$sys_errno",0);
3343+
33423344
/* Skip leading space */
33433345
while (*cmd && my_isspace(charset_info, *cmd))
33443346
cmd++;
@@ -3455,6 +3457,7 @@ void do_exec(struct st_command *command)
34553457
report_or_die("command \"%s\" failed with wrong error: %d",
34563458
command->first_argument, status);
34573459
}
3460+
var_set_int("$sys_errno",status);
34583461
}
34593462
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
34603463
command->expected_errors.err[0].code.errnum != 0)

mysql-test/include/mtr_warnings.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ CREATE DEFINER=root@localhost
292292
PROCEDURE add_suppression(pattern VARCHAR(255))
293293
BEGIN
294294
INSERT INTO test_suppressions (pattern) VALUES (pattern);
295+
FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions;
295296
END
296297
*/||
297298

mysql-test/lib/My/CoreDump.pm

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,19 @@ sub _verify_binpath {
5353
sub _gdb {
5454
my ($core_name)= @_;
5555

56-
print "\nTrying 'gdb' to get a backtrace\n";
56+
# Check that gdb exists
57+
`gdb --version`;
58+
if ($?) {
59+
print "gdb not found, cannot get the stack trace\n";
60+
return;
61+
}
5762

58-
return unless -f $core_name;
63+
if (-f $core_name) {
64+
print "\nTrying 'gdb' to get a backtrace from coredump $core_name\n";
65+
} else {
66+
print "\nCoredump $core_name does not exist, cannot run 'gdb'\n";
67+
return;
68+
}
5969

6070
# Find out name of binary that generated core
6171
`gdb -c '$core_name' --batch 2>&1` =~

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
2626
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
2727
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
2828
) ENGINE=InnoDB COMMENT="This is a comment about tables";
29-
# Restart mysqld --innodb_read_only=1
29+
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
30+
ERROR HY000: Table 'crew_role_assigned' is read only
3031
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
3132
Table Create Table
3233
crew_role_assigned CREATE TABLE `crew_role_assigned` (
@@ -52,7 +53,6 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
5253
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
5354
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
5455
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
55-
# Restart mysqld --innodb_read_only=1
5656
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
5757
Table Create Table
5858
crew_role_assigned CREATE TABLE `crew_role_assigned` (

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

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,57 @@ INSERT INTO t1 VALUES (123);
1515
BEGIN;
1616
DELETE FROM t1;
1717
# Kill the server
18-
--innodb-force-recovery-crash=1
19-
--innodb-force-recovery-crash=3
20-
--innodb-force-recovery-crash=4
21-
--innodb-force-recovery-crash=5
22-
--innodb-force-recovery-crash=6
23-
--innodb-force-recovery-crash=7
24-
--innodb-force-recovery-crash=8
25-
--innodb-force-recovery-crash=9
26-
--innodb-force-recovery-crash=10
18+
SELECT * FROM t1;
19+
ERROR 42000: Unknown storage engine 'InnoDB'
20+
FOUND /syntax error in innodb_log_group_home_dir/ in mysqld.1.err
21+
SELECT * FROM t1;
22+
ERROR 42000: Unknown storage engine 'InnoDB'
23+
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
24+
SELECT * FROM t1;
25+
ERROR 42000: Unknown storage engine 'InnoDB'
26+
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
27+
SELECT * FROM t1;
28+
ERROR 42000: Unknown storage engine 'InnoDB'
29+
FOUND /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
30+
SELECT * FROM t1;
31+
ERROR 42000: Unknown storage engine 'InnoDB'
32+
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
33+
FOUND /InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
34+
SELECT * FROM t1;
35+
ERROR 42000: Unknown storage engine 'InnoDB'
36+
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
37+
FOUND /InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
38+
SELECT * FROM t1;
39+
ERROR 42000: Unknown storage engine 'InnoDB'
40+
FOUND /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
41+
SELECT * FROM t1;
42+
ERROR 42000: Unknown storage engine 'InnoDB'
43+
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
44+
FOUND /InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
45+
SELECT * FROM t1;
46+
ERROR 42000: Unknown storage engine 'InnoDB'
47+
SELECT * FROM t1;
48+
ERROR 42000: Unknown storage engine 'InnoDB'
49+
FOUND /InnoDB: Cannot create log files in read-only mode/ in mysqld.1.err
50+
SELECT * FROM t1;
51+
ERROR 42000: Unknown storage engine 'InnoDB'
52+
FOUND /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
53+
SELECT * FROM t1;
54+
ERROR 42000: Unknown storage engine 'InnoDB'
55+
FOUND /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
56+
SELECT * FROM t1;
57+
ERROR 42000: Unknown storage engine 'InnoDB'
58+
FOUND /InnoDB: Only one log file found/ in mysqld.1.err
59+
SELECT * FROM t1;
60+
ERROR 42000: Unknown storage engine 'InnoDB'
61+
FOUND /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size/ in mysqld.1.err
62+
SELECT * FROM t1;
63+
ERROR 42000: Unknown storage engine 'InnoDB'
64+
FOUND /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err
65+
SELECT * FROM t1;
66+
ERROR 42000: Unknown storage engine 'InnoDB'
67+
FOUND /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
68+
FOUND /InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0/ in mysqld.1.err
2769
SELECT * FROM t1;
2870
a
2971
42
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
2+
BEGIN;
3+
INSERT INTO t VALUES(1),(2);
4+
DELETE FROM t WHERE a=2;
5+
# Normal MariaDB shutdown would roll back the above transaction.
6+
# We want the transaction to remain open, so we will kill the server
7+
# after ensuring that any non-transactional files are clean.
8+
FLUSH TABLES;
9+
# Ensure that the above incomplete transaction becomes durable.
10+
SET GLOBAL innodb_flush_log_at_trx_commit=1;
11+
BEGIN;
12+
INSERT INTO t VALUES(0);
13+
ROLLBACK;
14+
# Kill and restart: --innodb-force-recovery=3
15+
SELECT * FROM t;
16+
a
17+
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
18+
SELECT * FROM t;
19+
a
20+
1
21+
SELECT * FROM t;
22+
a
23+
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
24+
SELECT * FROM t;
25+
a
26+
1
27+
SELECT * FROM t;
28+
a
29+
DROP TABLE t;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repr
3333
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
3434
) ENGINE=InnoDB COMMENT="This is a comment about tables";
3535

36-
--echo # Restart mysqld --innodb_read_only=1
37-
-- let $restart_parameters=--innodb-read-only=1
36+
-- let $restart_parameters=--innodb-read-only
3837
-- source include/restart_mysqld.inc
3938

39+
--error ER_OPEN_AS_READONLY
40+
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
4041
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
4142

4243
-- let $restart_parameters=
@@ -45,8 +46,7 @@ SHOW CREATE TABLE `repro`.`crew_role_assigned`;
4546
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
4647
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
4748

48-
--echo # Restart mysqld --innodb_read_only=1
49-
-- let $restart_parameters=--innodb-read-only=1
49+
-- let $restart_parameters=--innodb-read-only
5050
-- source include/restart_mysqld.inc
5151

5252
#

0 commit comments

Comments
 (0)