Skip to content

Commit 3c47ed4

Browse files
committed
Merge 10.0 into 10.1
2 parents ba4d0a1 + 1349307 commit 3c47ed4

Some content is hidden

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

49 files changed

+293
-236
lines changed

mysql-test/mysql-test-run.pl

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ sub print_global_resfile {
10321032
resfile_global("gprof", $opt_gprof ? 1 : 0);
10331033
resfile_global("valgrind", $opt_valgrind ? 1 : 0);
10341034
resfile_global("callgrind", $opt_callgrind ? 1 : 0);
1035-
resfile_global("mem", $opt_mem ? 1 : 0);
1035+
resfile_global("mem", $opt_mem);
10361036
resfile_global("tmpdir", $opt_tmpdir);
10371037
resfile_global("vardir", $opt_vardir);
10381038
resfile_global("fast", $opt_fast ? 1 : 0);
@@ -1170,7 +1170,7 @@ sub command_line_setup {
11701170
# Directories
11711171
'tmpdir=s' => \$opt_tmpdir,
11721172
'vardir=s' => \$opt_vardir,
1173-
'mem' => \$opt_mem,
1173+
'mem:s' => \$opt_mem,
11741174
'clean-vardir' => \$opt_clean_vardir,
11751175
'client-bindir=s' => \$path_client_bindir,
11761176
'client-libdir=s' => \$path_client_libdir,
@@ -1428,12 +1428,17 @@ sub command_line_setup {
14281428

14291429
# Search through list of locations that are known
14301430
# to be "fast disks" to find a suitable location
1431-
# Use --mem=<dir> as first location to look.
1432-
my @tmpfs_locations= ($opt_mem,"/run/shm", "/dev/shm", "/tmp");
1431+
my @tmpfs_locations= ("/run/shm", "/dev/shm", "/tmp");
1432+
1433+
# Use $ENV{'MTR_MEM'} as first location to look (if defined)
1434+
unshift(@tmpfs_locations, $ENV{'MTR_MEM'}) if defined $ENV{'MTR_MEM'};
1435+
1436+
# however if the opt_mem was given a value, use this first
1437+
unshift(@tmpfs_locations, $opt_mem) if $opt_mem ne '';
14331438

14341439
foreach my $fs (@tmpfs_locations)
14351440
{
1436-
if ( -d $fs )
1441+
if ( -d $fs && ! -l $fs )
14371442
{
14381443
my $template= "var_${opt_build_thread}_XXXX";
14391444
$opt_mem= tempdir( $template, DIR => $fs, CLEANUP => 0);
@@ -4372,11 +4377,9 @@ ($$)
43724377
qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/,
43734378
qr/InnoDB: Warning: Setting innodb_use_sys_malloc/,
43744379
qr/InnoDB: Warning: a long semaphore wait:/,
4375-
qr/InnoDB: Disabling redo log encryption/,
4376-
qr/InnoDB: Redo log crypto: Can't initialize to key version -1u/,
43774380
qr/InnoDB: Dumping buffer pool.*/,
43784381
qr/InnoDB: Buffer pool.*/,
4379-
qr/InnoDB: Warning: Writer thread is waiting this semaphore/,
4382+
qr/InnoDB: Warning: Writer thread is waiting this semaphore:/,
43804383
qr/Slave: Unknown table 't1' .* 1051/,
43814384
qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
43824385
qr/slave SQL thread aborted/,
@@ -6000,9 +6003,9 @@ ($)
60006003
vardir=DIR The directory where files generated from the test run
60016004
is stored (default: ./var). Specifying a ramdisk or
60026005
tmpfs will speed up tests.
6003-
mem Run testsuite in "memory" using tmpfs or ramdisk
6004-
Attempts to find a suitable location
6005-
using a builtin list of standard locations
6006+
mem[=DIR] Run testsuite in "memory" using tmpfs or ramdisk
6007+
Attempts to use DIR first if specified else
6008+
uses a builtin list of standard locations
60066009
for tmpfs (/run/shm, /dev/shm, /tmp)
60076010
The option can also be set using environment
60086011
variable MTR_MEM=[DIR]

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
drop table if exists t1;
2-
call mtr.add_suppression("option 'innodb-purge-threads': unsigned value 0 adjusted to*");
3-
set global innodb_stats_persistent = false;
4-
CREATE TABLE t1 (a int not null primary key) engine=InnoDB;
1+
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
52
set global innodb_limit_optimistic_insert_debug = 2;
63
insert into t1 values (1);
74
insert into t1 values (5);

mysql-test/suite/innodb/t/innodb_bug14676111-master.opt

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,12 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n
1010

1111
--disable_query_log
1212
set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
13-
set @old_innodb_stats_persistent = @@innodb_stats_persistent;
1413
set @old_innodb_undo_logs = @@innodb_undo_logs;
1514
# Limit undo segments for stable progress of purge.
1615
set global innodb_undo_logs = 1;
1716
--enable_query_log
18-
--disable_warnings
19-
drop table if exists t1;
20-
--enable_warnings
2117

22-
call mtr.add_suppression("option 'innodb-purge-threads': unsigned value 0 adjusted to*");
23-
24-
set global innodb_stats_persistent = false;
25-
26-
CREATE TABLE t1 (a int not null primary key) engine=InnoDB;
18+
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
2719

2820
#
2921
# make 4 leveled straight tree
@@ -139,6 +131,5 @@ drop table t1;
139131

140132
--disable_query_log
141133
set global innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug;
142-
set global innodb_stats_persistent = @old_innodb_stats_persistent;
143134
set global innodb_undo_logs = @old_innodb_undo_logs;
144135
--enable_query_log

mysql-test/suite/rpl/r/rpl_mdev6386.result

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include/master-slave.inc
22
[connection master]
33
ALTER TABLE mysql.gtid_slave_pos ENGINE = InnoDB;
4-
FLUSH LOGS;
54
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) Engine=InnoDB;
65
include/stop_slave.inc
76
SET sql_log_bin= 0;
@@ -22,6 +21,7 @@ INSERT INTO t2 VALUE (4, 1);
2221
INSERT INTO t2 VALUE (5, 1);
2322
INSERT INTO t1 SELECT * FROM t2;
2423
DROP TEMPORARY TABLE t2;
24+
INSERT INTO t1 VALUE (6, 3);
2525
include/save_master_gtid.inc
2626
Contents on master:
2727
SELECT * FROM t1 ORDER BY a;
@@ -31,6 +31,7 @@ a b
3131
3 1
3232
4 1
3333
5 1
34+
6 3
3435
START SLAVE;
3536
include/wait_for_slave_sql_error.inc [errno=1062]
3637
STOP SLAVE IO_THREAD;
@@ -51,6 +52,7 @@ a b
5152
3 1
5253
4 1
5354
5 1
55+
6 3
5456
DROP TABLE t1;
5557
include/stop_slave.inc
5658
SET GLOBAL slave_parallel_threads= @old_parallel;

mysql-test/suite/rpl/t/rpl_mdev6386.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
--source include/master-slave.inc
33

44
--connection master
5-
# ToDo: Remove this FLUSH LOGS when MDEV-6403 is fixed.
65
ALTER TABLE mysql.gtid_slave_pos ENGINE = InnoDB;
7-
FLUSH LOGS;
86
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) Engine=InnoDB;
97
--sync_slave_with_master
108

@@ -31,6 +29,7 @@ INSERT INTO t2 VALUE (4, 1);
3129
INSERT INTO t2 VALUE (5, 1);
3230
INSERT INTO t1 SELECT * FROM t2;
3331
DROP TEMPORARY TABLE t2;
32+
INSERT INTO t1 VALUE (6, 3);
3433
--source include/save_master_gtid.inc
3534
--echo Contents on master:
3635
SELECT * FROM t1 ORDER BY a;

storage/innobase/buf/buf0dump.cc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ enum status_severity {
5353

5454
/* Flags that tell the buffer pool dump/load thread which action should it
5555
take after being waked up. */
56-
static ibool buf_dump_should_start = FALSE;
57-
static ibool buf_load_should_start = FALSE;
56+
static volatile bool buf_dump_should_start;
57+
static volatile bool buf_load_should_start;
5858

5959
static ibool buf_load_abort_flag = FALSE;
6060

@@ -79,7 +79,7 @@ void
7979
buf_dump_start()
8080
/*============*/
8181
{
82-
buf_dump_should_start = TRUE;
82+
buf_dump_should_start = true;
8383
os_event_set(srv_buf_dump_event);
8484
}
8585

@@ -93,7 +93,7 @@ void
9393
buf_load_start()
9494
/*============*/
9595
{
96-
buf_load_should_start = TRUE;
96+
buf_load_should_start = true;
9797
os_event_set(srv_buf_dump_event);
9898
}
9999

@@ -699,15 +699,18 @@ DECLARE_THREAD(buf_dump_thread)(void*)
699699
os_event_wait(srv_buf_dump_event);
700700

701701
if (buf_dump_should_start) {
702-
buf_dump_should_start = FALSE;
702+
buf_dump_should_start = false;
703703
buf_dump(TRUE /* quit on shutdown */);
704704
}
705705

706706
if (buf_load_should_start) {
707-
buf_load_should_start = FALSE;
707+
buf_load_should_start = false;
708708
buf_load();
709709
}
710710

711+
if (buf_dump_should_start || buf_load_should_start) {
712+
continue;
713+
}
711714
os_event_reset(srv_buf_dump_event);
712715
}
713716

storage/innobase/buf/buf0flu.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1995, 2016, Oracle and/or its affiliates
4-
Copyright (c) 2013, 2016, MariaDB Corporation
3+
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
4+
Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved.
55
Copyright (c) 2013, 2014, Fusion-io
66
77
This program is free software; you can redistribute it and/or modify it under
@@ -679,10 +679,7 @@ buf_flush_write_complete(
679679
flush_type = buf_page_get_flush_type(bpage);
680680
buf_pool->n_flush[flush_type]--;
681681

682-
#ifdef UNIV_DEBUG
683-
/* fprintf(stderr, "n pending flush %lu\n",
684-
buf_pool->n_flush[flush_type]); */
685-
#endif
682+
ut_ad(buf_pool_mutex_own(buf_pool));
686683

687684
if (buf_pool->n_flush[flush_type] == 0
688685
&& buf_pool->init_flush[flush_type] == FALSE) {

storage/innobase/dict/dict0stats_bg.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ Created Apr 25, 2012 Vasil Dimov
4141

4242
#define SHUTTING_DOWN() (srv_shutdown_state != SRV_SHUTDOWN_NONE)
4343

44-
/** Event to wake up the stats thread */
45-
UNIV_INTERN os_event_t dict_stats_event = NULL;
44+
/** Event to wake up dict_stats_thread on dict_stats_recalc_pool_add()
45+
or shutdown. Not protected by any mutex. */
46+
UNIV_INTERN os_event_t dict_stats_event;
4647

4748
/** This mutex protects the "recalc_pool" variable. */
4849
static ib_mutex_t recalc_pool_mutex;

storage/innobase/fsp/fsp0fsp.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,6 +2808,7 @@ fsp_reserve_free_extents(
28082808
}
28092809
} else {
28102810
ut_a(alloc_type == FSP_CLEANING);
2811+
reserve = 0;
28112812
}
28122813

28132814
success = fil_space_reserve_free_extents(space, n_free, n_ext);

0 commit comments

Comments
 (0)