Skip to content

Commit

Permalink
Merge 10.1 into 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jul 1, 2020
2 parents fbfb5b5 + 1ea266f commit ea2bc97
Show file tree
Hide file tree
Showing 129 changed files with 1,426 additions and 138 deletions.
2 changes: 1 addition & 1 deletion cmake/configure.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
Expand Down
3 changes: 2 additions & 1 deletion cmake/dtrace.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ MACRO(CHECK_DTRACE)
IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
AND NOT BUGGY_GCC_NO_DTRACE_MODULES
AND NOT BUGGY_LINUX_DTRACE
AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS"
AND NOT WIN32)
SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
ENDIF()
# On GNU/Hurd, dtrace is not supported
Expand Down
4 changes: 2 additions & 2 deletions dbug/dbug.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,17 +486,17 @@ static int DbugParse(CODE_STATE *cs, const char *control)
rel= control[0] == '+' || control[0] == '-';
if ((!rel || (!stack->out_file && !stack->next)))
{
LockIfInitSettings(cs);
FreeState(cs, 0);
stack->flags= 0;
stack->delay= 0;
stack->maxdepth= 0;
stack->sub_level= 0;
stack->out_file= sstderr;
stack->functions= NULL;
LockIfInitSettings(cs);
stack->keywords= NULL;
UnlockIfInitSettings(cs);
stack->processes= NULL;
UnlockIfInitSettings(cs);
}
else if (!stack->out_file)
{
Expand Down
2 changes: 1 addition & 1 deletion dbug/dbug_add_tags.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright (c) 2002 MySQL AB, 2009 Sun Microsystems, Inc.
# Use is subject to license terms.
Expand Down
2 changes: 1 addition & 1 deletion dbug/remove_function_from_trace.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

die <<EEE unless @ARGV;
Usage: $0 func1 [func2 [ ...] ]
Expand Down
2 changes: 1 addition & 1 deletion debian/additions/mysqlreport
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl -w

# mysqlreport v4.0 Oct 23 2015
# http://hackmysql.com/mysqlreport
Expand Down
2 changes: 1 addition & 1 deletion extra/yassl/include/openssl/generate_prefix_files.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright (C) 2006 MySQL AB
# Use is subject to license terms
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/process-purecov-annotations.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# This script processes a .gcov coverage report to honor purecov
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/t/SafeProcessStress.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2007, 2008 MySQL AB
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/t/copytree.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2007 MySQL AB
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/t/dummyd.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2007 MySQL AB
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/t/rmtree.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2007 MySQL AB
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/t/testMyConfig.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2007 MySQL AB
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/t/testMyConfigFactory.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2007 MySQL AB, 2009 Sun Microsystems, Inc.
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/t/test_child.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2007 MySQL AB
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/lib/v1/mysql-test-run.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/mtr.out-of-source
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Call mtr in out-of-source build
$ENV{MTR_BINDIR} = '@CMAKE_BINARY_DIR@';
chdir('@CMAKE_SOURCE_DIR@/mysql-test');
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/mysql-stress-test.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# -*- cperl -*-

# Copyright (c) 2004, 2014, Oracle and/or its affiliates.
Expand Down
10 changes: 10 additions & 0 deletions mysql-test/r/information_schema.result
Original file line number Diff line number Diff line change
Expand Up @@ -2174,3 +2174,13 @@ column_name
c1
c2
DROP TABLE tt1, tt2;
#
# MDEV-13242 Wrong results for queries with row constructors and information_schema
#
SELECT SCHEMA_NAME from information_schema.schemata where schema_name='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
SCHEMA_NAME
SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a',193);
SCHEMA_NAME
#
# End of 10.1 tests
#
20 changes: 20 additions & 0 deletions mysql-test/r/nested_profiling.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SET @saved_profiling=@@GLOBAL.profiling;
SET @saved_init_connect=@@GLOBAL.init_connect;
SET GLOBAL init_connect="set @a=2;set @b=3";
SET GLOBAL profiling=on;
create user mysqltest1@localhost;
connect con1,localhost,mysqltest1,,;
connection con1;
SELECT @a, @b;
@a @b
2 3
SHOW PROFILES;
Query_ID Duration Query
1 # set @a=2;set @b=3
2 # set @b=3
3 # SELECT @a, @b
connection default;
disconnect con1;
DROP USER mysqltest1@localhost;
SET GLOBAL profiling=@saved_profiling;
SET GLOBAL init_connect=@saved_init_connect;
19 changes: 19 additions & 0 deletions mysql-test/r/subselect4.result
Original file line number Diff line number Diff line change
Expand Up @@ -2567,6 +2567,24 @@ sum(a) a b
6 1 1
DROP TABLE t1,t2;
#
# MDEV-17606: Query returns wrong results (while using CHARACTER SET utf8)
#
CREATE TABLE t1(l1 varchar(10), i2 int);
INSERT INTO t1 VALUES ('e',2),('o',6),('x',4);
CREATE TABLE t2 (v1 varchar(10) CHARACTER SET utf8, KEY v1 (v1(3)));
INSERT INTO t2 VALUES ('k'),('rid'),('f'),('x');
EXPLAIN EXTENDED SELECT * FROM t1 where ( t1.l1 < ANY (SELECT MAX(t2.v1) FROM t2));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00
Warnings:
Note 1003 select `test`.`t1`.`l1` AS `l1`,`test`.`t1`.`i2` AS `i2` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`l1`,<max>(select max(`test`.`t2`.`v1`) from `test`.`t2`) > convert(<cache>(`test`.`t1`.`l1`) using utf8)))
SELECT * FROM t1 where ( t1.l1 < ANY (SELECT MAX(t2.v1) FROM t2));
l1 i2
e 2
o 6
DROP TABLE t1, t2;
#
# MDEV-22852: SIGSEGV in sortlength (optimized builds)
#
SET @save_optimizer_switch=@@optimizer_switch;
Expand All @@ -2578,3 +2596,4 @@ SELECT (SELECT DISTINCT t1i.b FROM t1 t1i GROUP BY t1i.a ORDER BY MAX(t1o.b)) FR
0
SET @@optimizer_switch= @save_optimizer_switch;
DROP TABLE t1;
# End of 10.2 tests
2 changes: 1 addition & 1 deletion mysql-test/std_data/checkDBI_DBD-mysql.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

# Copyright (c) 2011, Oracle and/or its affiliates
#
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/engines/rr_trx/run_stress_tx_rr.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
################################################################################
#
# This script runs the transactional stress test "stress_tx_rr" against the
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/funcs_1/lib/DataGen_local.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl


if ( (scalar(@ARGV) != 1 ) || ($ARGV[0] =~ /[^0-9]/i ) )
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/funcs_1/lib/DataGen_modify.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl


if ( (scalar(@ARGV) != 2 ) || ($ARGV[0] =~ /[^0-9]/i ) )
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/funcs_2/lib/gen_charset_utf8.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

#################################################################################
# Author: Serge Kozlov #
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/galera/t/MW-86-wait1.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc

--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/galera/t/MW-86-wait8.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc

--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--source include/galera_cluster.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_query_cache.inc
--source include/galera_have_debug_sync.inc

CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/galera/t/galera_var_retry_autocommit.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc

--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ VARIABLE_VALUE LIKE '%[::1]%'
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
Expand Down
40 changes: 40 additions & 0 deletions mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
CREATE TABLE t1 (pk INT PRIMARY KEY, node INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1, 1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (2, 3);
SET wsrep_sync_wait = 0;
SET wsrep_on = OFF;
SET GLOBAL wsrep_provider_options = 'dbug=d,after_shift_to_joining';
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
INSERT INTO t1 VALUES (3, 2);
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (4, 3);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
INSERT INTO t1 VALUES (5, 2);
SET GLOBAL wsrep_provider_options = 'dbug=d,before_send_state_request';
SET GLOBAL wsrep_provider_options = 'signal=after_shift_to_joining';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (6, 3);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
INSERT INTO t1 VALUES (7, 2);
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (8, 3);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SET GLOBAL wsrep_provider_options = 'dbug=d,process_primary_configuration';
SET GLOBAL wsrep_provider_options = 'signal=before_send_state_request';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
INSERT INTO t1 VALUES (9, 2);
SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration';
SET GLOBAL wsrep_provider_options = 'dbug=';
DROP TABLE t1;
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
50 changes: 50 additions & 0 deletions mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
CREATE TABLE t1 (pk INT PRIMARY KEY, node INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1, 1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (2, 3);
SET wsrep_sync_wait = 0;
SET wsrep_on = OFF;
SET GLOBAL wsrep_provider_options = 'dbug=d,after_shift_to_joining';
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
INSERT INTO t1 VALUES (3, 2);
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (4, 3);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
INSERT INTO t1 VALUES (5, 2);
SET GLOBAL wsrep_provider_options = 'dbug=d,before_send_state_request';
SET GLOBAL wsrep_provider_options = 'signal=after_shift_to_joining';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=before_send_state_request';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters';
VARIABLE_NAME VARIABLE_VALUE
WSREP_DEBUG_SYNC_WAITERS after_shift_to_joining
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (6, 3);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
INSERT INTO t1 VALUES (7, 2);
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
INSERT INTO t1 VALUES (8, 3);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SET GLOBAL wsrep_provider_options = 'dbug=d,process_primary_configuration';
SET GLOBAL wsrep_provider_options = 'signal=after_shift_to_joining';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
INSERT INTO t1 VALUES (9, 2);
SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 0;
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters';
VARIABLE_NAME VARIABLE_VALUE
WSREP_DEBUG_SYNC_WAITERS process_primary_configuration
SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration';
SET GLOBAL wsrep_provider_options = 'dbug=';
DROP TABLE t1;
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
Loading

0 comments on commit ea2bc97

Please sign in to comment.