Skip to content

Commit ccaec18

Browse files
committed
Merge 10.1 into 10.2
2 parents e40ed0e + 26f0cd8 commit ccaec18

20 files changed

+366
-30
lines changed

cmake/maintainer.cmake

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2020, MariaDB
23
#
34
# This program is free software; you can redistribute it and/or modify
45
# it under the terms of the GNU General Public License as published by
@@ -28,11 +29,16 @@ SET(MY_WARNING_FLAGS
2829
-Woverloaded-virtual
2930
-Wvla
3031
-Wwrite-strings
31-
-Werror
3232
)
3333

34+
FOREACH(F ${MY_WARNING_FLAGS})
35+
MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO)
36+
ENDFOREACH()
37+
38+
SET(MY_ERROR_FLAGS -Werror)
39+
3440
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
35-
SET(MY_WARNING_FLAGS ${MY_WARNING_FLAGS} -Wno-error=maybe-uninitialized)
41+
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized)
3642
ENDIF()
3743

3844
IF(MYSQL_MAINTAINER_MODE MATCHES "OFF")
@@ -41,7 +47,7 @@ ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
4147
SET(WHERE DEBUG)
4248
ENDIF()
4349

44-
FOREACH(F ${MY_WARNING_FLAGS})
50+
FOREACH(F ${MY_ERROR_FLAGS})
4551
MY_CHECK_AND_SET_COMPILER_FLAG(${F} ${WHERE})
4652
ENDFOREACH()
4753

mysql-test/lib/My/Tee.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sub PUSHED
1010
open($copyfh, '>', "$::opt_vardir/log/stdout.log")
1111
or die "open(>$::opt_vardir/log/stdout.log): $!"
1212
unless $copyfh;
13-
bless { }, shift;
13+
bless { }, shift;
1414
}
1515

1616
sub WRITE

mysql-test/lib/mtr_report.pm

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
# same name.
2121

2222
package mtr_report;
23+
2324
use strict;
25+
use Sys::Hostname;
2426

2527
use base qw(Exporter);
2628
our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
@@ -253,6 +255,7 @@ sub mtr_report_stats ($$$$) {
253255
# Find out how we where doing
254256
# ----------------------------------------------------------------------
255257

258+
my $tot_disabled = 0;
256259
my $tot_skipped= 0;
257260
my $tot_skipdetect= 0;
258261
my $tot_passed= 0;
@@ -273,6 +276,7 @@ sub mtr_report_stats ($$$$) {
273276
{
274277
# Test was skipped (disabled not counted)
275278
$tot_skipped++ unless $tinfo->{'disable'};
279+
$tot_disabled++ if $tinfo->{'disable'};
276280
$tot_skipdetect++ if $tinfo->{'skip_detected_by_test'};
277281
}
278282
elsif ( $tinfo->{'result'} eq 'MTR_RES_PASSED' )
@@ -402,6 +406,92 @@ sub mtr_report_stats ($$$$) {
402406
print "All $tot_tests tests were successful.\n\n";
403407
}
404408

409+
if ($::opt_xml_report) {
410+
my $xml_report = "";
411+
my @sorted_tests = sort {$a->{'name'} cmp $b->{'name'}} @$tests;
412+
my $last_suite = "";
413+
my $current_suite = "";
414+
my $timest = isotime(time);
415+
my %suite_totals;
416+
my %suite_time;
417+
my %suite_tests;
418+
my %suite_failed;
419+
my %suite_disabled;
420+
my %suite_skipped;
421+
my $host = hostname;
422+
my $suiteNo = 0;
423+
424+
# loop through test results to count totals
425+
foreach my $test ( @sorted_tests ) {
426+
$current_suite = $test->{'suite'}->{'name'};
427+
428+
if ($test->{'timer'} eq "") {
429+
$test->{'timer'} = 0;
430+
}
431+
432+
$suite_time{$current_suite} = $suite_time{$current_suite} + $test->{'timer'};
433+
$suite_tests{$current_suite} = $suite_tests{$current_suite} + 1;
434+
435+
if ($test->{'result'} eq "MTR_RES_FAILED") {
436+
$suite_failed{$current_suite} = $suite_failed{$current_suite} + 1;
437+
} elsif ($test->{'result'} eq "MTR_RES_SKIPPED" && $test->{'disable'}) {
438+
$suite_disabled{$current_suite} = $suite_disabled{$current_suite} + 1;
439+
} elsif ($test->{'result'} eq "MTR_RES_SKIPPED") {
440+
$suite_skipped{$current_suite} = $suite_skipped{$current_suite} + 1;
441+
}
442+
443+
$suite_totals{"all_time"} = $suite_totals{"all_time"} + $test->{'timer'};
444+
}
445+
446+
my $all_time = sprintf("%.3f", $suite_totals{"all_time"} / 1000);
447+
my $suite_time = 0;
448+
my $test_time = 0;
449+
450+
# generate xml
451+
$xml_report = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
452+
$xml_report .= qq(<testsuites disabled="$tot_disabled" errors="" failures="$tot_failed" name="" tests="$tot_tests" time="$all_time">\n);
453+
454+
foreach my $test ( @sorted_tests ) {
455+
$current_suite = $test->{'suite'}->{'name'};
456+
457+
if ($current_suite ne $last_suite) {
458+
if ($last_suite ne "") {
459+
$xml_report .= "\t</testsuite>\n";
460+
$suiteNo++;
461+
}
462+
463+
$suite_time = sprintf("%.3f", $suite_time{$current_suite} / 1000);
464+
$xml_report .= qq(\t<testsuite disabled="$suite_disabled{$current_suite}" errors="" failures="$suite_failed{$current_suite}" hostname="$host" id="$suiteNo" name="$current_suite" package="" skipped="$suite_skipped{$current_suite}" tests="$suite_tests{$current_suite}" time="$suite_time" timestamp="$timest">\n);
465+
$last_suite = $current_suite;
466+
}
467+
468+
$test_time = sprintf("%.3f", $test->{timer} / 1000);
469+
$xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" status="$test->{'result'}" time="$test_time");
470+
471+
my $comment = $test->{'comment'};
472+
$comment =~ s/[\"]//g;
473+
474+
if ($test->{'result'} eq "MTR_RES_FAILED") {
475+
$xml_report .= qq(>\n\t\t\t<failure message="" type="$test->{'result'}">\n<![CDATA[$test->{'logfile'}]]>\n\t\t\t</failure>\n\t\t</testcase>\n);
476+
} elsif ($test->{'result'} eq "MTR_RES_SKIPPED" && $test->{'disable'}) {
477+
$xml_report .= qq(>\n\t\t\t<disabled message="$comment" type="$test->{'result'}"/>\n\t\t</testcase>\n);
478+
} elsif ($test->{'result'} eq "MTR_RES_SKIPPED") {
479+
$xml_report .= qq(>\n\t\t\t<skipped message="$comment" type="$test->{'result'}"/>\n\t\t</testcase>\n);
480+
} else {
481+
$xml_report .= " />\n";
482+
}
483+
}
484+
485+
$xml_report .= "\t</testsuite>\n</testsuites>\n";
486+
487+
# save to file
488+
my $xml_file = $::opt_xml_report;
489+
490+
open XML_FILE, ">", $xml_file or die "Cannot create file $xml_file: $!";
491+
print XML_FILE $xml_report;
492+
close XML_FILE;
493+
}
494+
405495
if (@$extra_warnings)
406496
{
407497
print <<MSG;

mysql-test/mysql-test-run.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ BEGIN
128128
our $default_vardir;
129129
our $opt_vardir; # Path to use for var/ dir
130130
our $plugindir;
131+
our $opt_xml_report; # XML output
132+
131133
my $path_vardir_trace; # unix formatted opt_vardir for trace files
132134
my $opt_tmpdir; # Path to use for tmp/ dir
133135
my $opt_tmpdir_pid;
@@ -730,7 +732,6 @@ sub main {
730732
mtr_print_line();
731733

732734
print_total_times($opt_parallel) if $opt_report_times;
733-
734735
mtr_report_stats($prefix, $fail, $completed, $extra_warnings);
735736

736737
if ($opt_gcov) {
@@ -1233,6 +1234,7 @@ sub print_global_resfile {
12331234
resfile_global("warnings", $opt_warnings ? 1 : 0);
12341235
resfile_global("max-connections", $opt_max_connections);
12351236
resfile_global("product", "MySQL");
1237+
resfile_global("xml-report", $opt_xml_report);
12361238
# Somewhat hacky code to convert numeric version back to dot notation
12371239
my $v1= int($mysql_version_id / 10000);
12381240
my $v2= int(($mysql_version_id % 10000)/100);
@@ -1398,7 +1400,8 @@ sub command_line_setup {
13981400
'help|h' => \$opt_usage,
13991401
# list-options is internal, not listed in help
14001402
'list-options' => \$opt_list_options,
1401-
'skip-test-list=s' => \@opt_skip_test_list
1403+
'skip-test-list=s' => \@opt_skip_test_list,
1404+
'xml-report=s' => \$opt_xml_report
14021405
);
14031406

14041407
# fix options (that take an optional argument and *only* after = sign
@@ -6603,6 +6606,7 @@ ($)
66036606
phases of test execution.
66046607
stress=ARGS Run stress test, providing options to
66056608
mysql-stress-test.pl. Options are separated by comma.
6609+
xml-report=<file> Output jUnit xml file of the results.
66066610
66076611
Some options that control enabling a feature for normal test runs,
66086612
can be turned off by prepending 'no' to the option, e.g. --notimer.

mysql-test/r/index_merge_myisam.result

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,58 @@ id select_type table type possible_keys key key_len ref rows Extra
16881688
DROP TABLE t1;
16891689
set optimizer_switch= @optimizer_switch_save;
16901690
#
1691+
# MDEV-21932: ROR union with index_merge_sort_union=off
1692+
#
1693+
create table t0 (a int);
1694+
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
1695+
insert into t0 select a+10 from t0;
1696+
insert into t0 select a+20 from t0;
1697+
insert into t0 select a+40 from t0;
1698+
insert into t0 select a+80 from t0;
1699+
insert into t0 select a+160 from t0;
1700+
delete from t0 where a > 300;
1701+
create table t1 (
1702+
f1 int, f2 int, f3 int, f4 int,
1703+
primary key (f1), key (f3), key(f4)
1704+
) engine=myisam;
1705+
insert into t1 select a+100, a+100, a+100, a+100 from t0;
1706+
insert into t1 VALUES (9,0,2,6), (9930,0,0,NULL);
1707+
analyze table t1;
1708+
Table Op Msg_type Msg_text
1709+
test.t1 analyze status OK
1710+
set optimizer_switch='index_merge_sort_union=off';
1711+
set optimizer_switch='index_merge_union=on';
1712+
explain select * from t1
1713+
where (( f3 = 1 or f1 = 7 ) and f1 < 10) or
1714+
(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 ));
1715+
id select_type table type possible_keys key key_len ref rows Extra
1716+
1 SIMPLE t1 index_merge PRIMARY,f3,f4 f3,PRIMARY,f3 5,4,5 NULL 3 Using union(f3,PRIMARY,f3); Using where
1717+
select * from t1
1718+
where (( f3 = 1 or f1 = 7 ) and f1 < 10) or
1719+
(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 ));
1720+
f1 f2 f3 f4
1721+
9 0 2 6
1722+
insert into t1 values (52,0,1,0),(53,0,1,0);
1723+
insert into t1 values (50,0,1,0),(51,0,1,0);
1724+
insert into t1 values (48,0,1,0),(49,0,1,0);
1725+
insert into t1 values (46,0,1,0),(47,0,1,0);
1726+
insert into t1 values (44,0,1,0),(45,0,1,0);
1727+
analyze table t1;
1728+
Table Op Msg_type Msg_text
1729+
test.t1 analyze status OK
1730+
explain select * from t1
1731+
where (( f3 = 1 or f1 = 7 ) and f1 < 10) or
1732+
(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 ));
1733+
id select_type table type possible_keys key key_len ref rows Extra
1734+
1 SIMPLE t1 index_merge PRIMARY,f3,f4 f3,PRIMARY,f3 5,4,5 NULL 13 Using union(f3,PRIMARY,f3); Using where
1735+
select * from t1
1736+
where (( f3 = 1 or f1 = 7 ) and f1 < 10) or
1737+
(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 ));
1738+
f1 f2 f3 f4
1739+
9 0 2 6
1740+
drop table t0,t1;
1741+
set optimizer_switch= @optimizer_switch_save;
1742+
#
16911743
# MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union
16921744
#
16931745
create table t0
@@ -1722,3 +1774,4 @@ key1 key2 key3 key8
17221774
3 3 3 1021
17231775
set @@optimizer_switch= @optimizer_switch_save;
17241776
drop table t0;
1777+
# End of 10.1 tests

mysql-test/r/mysqldump.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3756,7 +3756,7 @@ DROP TABLE t1;
37563756
#
37573757
CREATE TABLE t1(a int);
37583758
INSERT INTO t1 VALUES (1), (2);
3759-
mysqldump: Input filename too long: aaaaaaaaaaaaaaaaaaaaaaaaaaa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ions
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,26 @@ value1 1003560 12345
21362136
value1 1004807 12345
21372137
drop table t1;
21382138
#
2139+
# MDEV-22191: Range access is not picked when index_merge_sort_union is turned off
2140+
#
2141+
set @save_optimizer_switch=@@optimizer_switch;
2142+
set @save_optimizer_switch="index_merge_sort_union=OFF";
2143+
CREATE TABLE t1 (a INT, INDEX(a));
2144+
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
2145+
explain
2146+
SELECT * FROM t1 WHERE a > 5;
2147+
id select_type table type possible_keys key key_len ref rows Extra
2148+
1 SIMPLE t1 range a a 5 NULL 5 Using where; Using index
2149+
SELECT * FROM t1 WHERE a > 5;
2150+
a
2151+
6
2152+
7
2153+
8
2154+
9
2155+
set @@optimizer_switch=@save_optimizer_switch;
2156+
drop table t1;
2157+
# End of 5.5 tests
2158+
#
21392159
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
21402160
#
21412161
CREATE TABLE t1 (pk INT PRIMARY KEY);

mysql-test/r/range_innodb.result

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,33 @@ id select_type table type possible_keys key key_len ref rows Extra
3737
1 SIMPLE t0 ALL NULL NULL NULL NULL 10
3838
1 SIMPLE t2 range a,b b 5 NULL 201 Using where; Using join buffer (flat, BNL join)
3939
drop table t0,t1,t2;
40+
#
41+
# MDEV-10466: constructing an invalid SEL_ARG
42+
#
43+
create table t1 (
44+
pk int, a int, b int,
45+
primary key (pk), index idx1(b), index idx2(b)
46+
) engine=innodb;
47+
Warnings:
48+
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
49+
insert into t1 values (1,6,0),(2,1,0),(3,5,2),(4,8,0);
50+
create table t2 (c int) engine=innodb;
51+
insert into t2 values (1),(2);
52+
create table t3 (d int) engine=innodb;
53+
insert into t3 values (3),(-1),(4);
54+
set @save_optimizer_switch=@@optimizer_switch;
55+
set optimizer_switch='extended_keys=on';
56+
explain
57+
select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0';
58+
id select_type table type possible_keys key key_len ref rows Extra
59+
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
60+
1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
61+
1 SIMPLE t1 ALL PRIMARY,idx1,idx2 NULL NULL NULL 4 Using where; Using join buffer (incremental, BNL join)
62+
select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0';
63+
pk a b
64+
1 6 0
65+
set optimizer_switch=@save_optimizer_switch;
66+
drop table t1,t2,t3;
4067
CREATE TABLE t1 (
4168
pk INT PRIMARY KEY, f1 INT, f2 CHAR(1), f3 CHAR(1),
4269
KEY(f1), KEY(f2)
@@ -80,3 +107,4 @@ ERROR HY000: Table definition has changed, please retry transaction
80107
DROP TABLE t0,t1;
81108
SET @@GLOBAL.debug_dbug = @saved_dbug;
82109
set @@optimizer_switch= @optimizer_switch_save;
110+
# End of 10.1 tests

mysql-test/r/range_mrr_icp.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,6 +2138,26 @@ value1 1003560 12345
21382138
value1 1004807 12345
21392139
drop table t1;
21402140
#
2141+
# MDEV-22191: Range access is not picked when index_merge_sort_union is turned off
2142+
#
2143+
set @save_optimizer_switch=@@optimizer_switch;
2144+
set @save_optimizer_switch="index_merge_sort_union=OFF";
2145+
CREATE TABLE t1 (a INT, INDEX(a));
2146+
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
2147+
explain
2148+
SELECT * FROM t1 WHERE a > 5;
2149+
id select_type table type possible_keys key key_len ref rows Extra
2150+
1 SIMPLE t1 range a a 5 NULL 5 Using where; Using index
2151+
SELECT * FROM t1 WHERE a > 5;
2152+
a
2153+
6
2154+
7
2155+
8
2156+
9
2157+
set @@optimizer_switch=@save_optimizer_switch;
2158+
drop table t1;
2159+
# End of 5.5 tests
2160+
#
21412161
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
21422162
#
21432163
CREATE TABLE t1 (pk INT PRIMARY KEY);

mysql-test/r/range_vs_index_merge.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
16591659
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
16601660
OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
16611661
id select_type table type possible_keys key key_len ref rows Extra
1662-
1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 2 Using where
1662+
1 SIMPLE t1 index_merge PRIMARY,f3,f4 f3,PRIMARY,f3 5,4,5 NULL 3 Using union(f3,PRIMARY,f3); Using where
16631663
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
16641664
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
16651665
OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );

0 commit comments

Comments
 (0)