Skip to content

Commit e9aaa10

Browse files
committed
Merge 10.2 into 10.3
2 parents 19da9a5 + 38ea795 commit e9aaa10

27 files changed

+304
-318
lines changed

cmake/build_configurations/mysql_release.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ ELSEIF(DEB)
104104
SET(HAVE_EMBEDDED_PRIVILEGE_CONTROL ON)
105105
ELSE()
106106
SET(WITH_SSL bundled CACHE STRING "")
107+
SET(WITH_PCRE bundled CACHE STRING "")
107108
SET(WITH_ZLIB bundled CACHE STRING "")
108109
SET(WITH_JEMALLOC static CACHE STRING "")
109110
ENDIF()
@@ -138,7 +139,7 @@ IF(UNIX)
138139
RedHat/Fedora/Oracle Linux: yum install libaio-devel
139140
SuSE: zypper install libaio-devel
140141
141-
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
142+
If you really do not want it, pass -DIGNORE_AIO_CHECK=ON to cmake.
142143
")
143144
ENDIF()
144145

cmake/cpack_source_ignore_files.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
SET(CPACK_SOURCE_IGNORE_FILES
1717
\\\\.git/
18+
\\\\.git$
1819
\\\\.gitignore$
1920
\\\\.gitattributes$
2021
CMakeCache\\\\.txt$

cmake/submodules.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
1919
SET(update_result 0)
2020
ELSEIF (cmake_update_submodules MATCHES force)
2121
MESSAGE(STATUS "Updating submodules (forced)")
22-
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force
22+
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force --depth=1
2323
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
2424
RESULT_VARIABLE update_result)
2525
ELSEIF (cmake_update_submodules MATCHES yes)
26-
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init
26+
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --depth=1
2727
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
2828
RESULT_VARIABLE update_result)
2929
ELSE()

libmariadb

mysql-test/lib/mtr_report.pm

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,20 @@ use My::Platform;
3737
use POSIX qw[ _exit ];
3838
use IO::Handle qw[ flush ];
3939
use mtr_results;
40-
4140
use Term::ANSIColor;
41+
use English;
42+
43+
my $tot_real_time= 0;
44+
my $tests_done= 0;
45+
my $tests_failed= 0;
46+
47+
our $timestamp= 0;
48+
our $timediff= 0;
49+
our $name;
50+
our $verbose;
51+
our $verbose_restart= 0;
52+
our $timer= 1;
53+
our $tests_total;
4254

4355
my %color_map = qw/pass green
4456
retry-pass green
@@ -47,20 +59,39 @@ my %color_map = qw/pass green
4759
disabled bright_black
4860
skipped yellow
4961
reset reset/;
50-
sub xterm_color {
51-
if (-t STDOUT and defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) {
52-
syswrite STDOUT, color($color_map{$_[0]});
62+
63+
my $set_titlebar;
64+
my $set_color= sub { };
65+
66+
if (-t STDOUT) {
67+
if (IS_WINDOWS) {
68+
eval {
69+
require Win32::Console;
70+
$set_titlebar = sub { &Win32::Console::Title($_[0]);};
71+
}
72+
} elsif ($ENV{TERM} =~ /xterm/) {
73+
$set_titlebar = sub { syswrite STDOUT, "\e]0;$_[0]\a"; };
74+
$set_color = sub { syswrite STDOUT, color($color_map{$_[0]}); }
5375
}
5476
}
5577

56-
my $tot_real_time= 0;
78+
sub titlebar_stat($) {
5779

58-
our $timestamp= 0;
59-
our $timediff= 0;
60-
our $name;
61-
our $verbose;
62-
our $verbose_restart= 0;
63-
our $timer= 1;
80+
sub time_format($) {
81+
sprintf '%d:%02d:%02d', $_[0]/3600, ($_[0]/60)%60, $_[0]%60;
82+
}
83+
84+
$tests_done++;
85+
$tests_failed++ if $_[0] =~ /fail/;
86+
$tests_total++ if $_[0] =~ /retry/;
87+
88+
my $spent = time - $BASETIME;
89+
my $left = $tests_total - $tests_done;
90+
91+
&$set_titlebar(sprintf "mtr: spent %s on %d tests. %s (%d tests) left, %d failed",
92+
time_format($spent), $tests_done,
93+
time_format($spent/$tests_done * $left), $left, $tests_failed);
94+
}
6495

6596
sub report_option {
6697
my ($opt, $value)= @_;
@@ -321,8 +352,6 @@ sub mtr_report_stats ($$$$) {
321352

322353
if ( $timer )
323354
{
324-
use English;
325-
326355
mtr_report("Spent", sprintf("%.3f", $tot_real_time),"of",
327356
time - $BASETIME, "seconds executing testcases");
328357
}
@@ -620,10 +649,11 @@ sub mtr_report (@) {
620649
my @s = split /\[ (\S+) \]/, _name() . "@_\n";
621650
if (@s > 1) {
622651
print $s[0];
623-
xterm_color($s[1]);
652+
&$set_color($s[1]);
624653
print "[ $s[1] ]";
625-
xterm_color('reset');
654+
&$set_color('reset');
626655
print $s[2];
656+
titlebar_stat($s[1]) if $set_titlebar;
627657
} else {
628658
print $s[0];
629659
}

mysql-test/main/comment_table.result

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
DROP TABLE IF EXISTS t1;
21
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INTEGER COMMENT '012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1) COMMENT 'i1 comment',INDEX i2(c2)
32
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
43
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
@@ -125,3 +124,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
125124
table_comment char_length(table_comment)
126125
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
127126
column_comment char_length(column_comment)
127+
set names utf8;
128+
create table t1 (x int comment 'a�');
129+
ERROR HY000: Invalid utf8 character string: 'a'
130+
set names latin1;

mysql-test/main/comment_table.test

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
--disable_warnings
2-
DROP TABLE IF EXISTS t1;
3-
--enable_warnings
41
#1024 bytes
52
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INTEGER COMMENT '012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1) COMMENT 'i1 comment',INDEX i2(c2)
63
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
@@ -53,3 +50,11 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
5350
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
5451
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
5552
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
53+
54+
#
55+
# MDEV-22558 wrong error for invalid utf8 table comment
56+
#
57+
set names utf8;
58+
--error ER_INVALID_CHARACTER_STRING
59+
create table t1 (x int comment 'a�');
60+
set names latin1;

mysql-test/main/repair.result

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,24 @@ i
233233
UNLOCK TABLES;
234234
DROP TABLE t1;
235235
# End of 10.0 tests
236+
create table t1 (a int, b varchar(200));
237+
insert t1 select seq, repeat(200, seq) from seq_1_to_30;
238+
delete from t1 where a % 13 = 0;
239+
repair table t1 use_frm;
240+
Table Op Msg_type Msg_text
241+
test.t1 repair warning Number of rows changed from 0 to 28
242+
test.t1 repair status OK
243+
delete from t1 where a % 11 = 0;
244+
repair table t1 extended use_frm;
245+
Table Op Msg_type Msg_text
246+
test.t1 repair warning Number of rows changed from 0 to 26
247+
test.t1 repair status OK
248+
delete from t1 where a % 7 = 0;
249+
set myisam_repair_threads = 2;
250+
repair table t1 use_frm;
251+
Table Op Msg_type Msg_text
252+
test.t1 repair warning Number of rows changed from 0 to 22
253+
test.t1 repair status OK
254+
set myisam_repair_threads = default;
255+
drop table t1;
256+
# End of 10.2 tests

mysql-test/main/repair.test

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
22
# Test of repair table
33
#
4+
--source include/have_sequence.inc
45
--source include/default_charset.inc
56

67
call mtr.add_suppression("character set is multi-byte");
@@ -246,3 +247,23 @@ UNLOCK TABLES;
246247
DROP TABLE t1;
247248

248249
--echo # End of 10.0 tests
250+
251+
#
252+
# MDEV-17153 server crash on repair table ... use_frm
253+
#
254+
# Note, this test case doesn't crash, but shows spurios warnings
255+
# unless the bug is fixed
256+
#
257+
create table t1 (a int, b varchar(200));
258+
insert t1 select seq, repeat(200, seq) from seq_1_to_30;
259+
delete from t1 where a % 13 = 0;
260+
repair table t1 use_frm;
261+
delete from t1 where a % 11 = 0;
262+
repair table t1 extended use_frm;
263+
delete from t1 where a % 7 = 0;
264+
set myisam_repair_threads = 2;
265+
repair table t1 use_frm;
266+
set myisam_repair_threads = default;
267+
drop table t1;
268+
269+
--echo # End of 10.2 tests

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -374,32 +374,6 @@ ($)
374374
select(STDOUT);
375375
$| = 1; # Automatically flush STDOUT
376376

377-
my $set_titlebar;
378-
379-
380-
BEGIN {
381-
if (IS_WINDOWS) {
382-
my $have_win32_console= 0;
383-
eval {
384-
require Win32::Console;
385-
Win32::Console->import();
386-
$have_win32_console = 1;
387-
};
388-
eval 'sub HAVE_WIN32_CONSOLE { $have_win32_console }';
389-
} else {
390-
eval 'sub HAVE_WIN32_CONSOLE { 0 }';
391-
}
392-
}
393-
394-
if (-t STDOUT) {
395-
if (IS_WINDOWS and HAVE_WIN32_CONSOLE) {
396-
$set_titlebar = sub {Win32::Console::Title $_[0];};
397-
} elsif (defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) {
398-
$set_titlebar = sub { syswrite STDOUT, "\e];$_[0]\a"; };
399-
}
400-
}
401-
402-
403377
main();
404378

405379
sub have_wsrep() {
@@ -637,7 +611,7 @@ sub main {
637611
}
638612

639613
#######################################################################
640-
my $num_tests= @$tests;
614+
my $num_tests= $mtr_report::tests_total= @$tests;
641615
if ( $opt_parallel eq "auto" ) {
642616
# Try to find a suitable value for number of workers
643617
if (IS_WINDOWS)
@@ -1078,8 +1052,6 @@ ($$$)
10781052
delete $next->{reserved};
10791053
}
10801054

1081-
titlebar_stat(scalar(@$tests)) if $set_titlebar;
1082-
10831055
if ($next) {
10841056
# We don't need this any more
10851057
delete $next->{criteria};
@@ -6684,23 +6656,3 @@ ($)
66846656

66856657
exit(1);
66866658
}
6687-
6688-
sub time_format($) {
6689-
sprintf '%d:%02d:%02d', $_[0]/3600, ($_[0]/60)%60, $_[0]%60;
6690-
}
6691-
6692-
our $num_tests;
6693-
6694-
sub titlebar_stat {
6695-
my ($left) = @_;
6696-
6697-
# 2.5 -> best by test
6698-
$num_tests = $left + 2.5 unless $num_tests;
6699-
6700-
my $done = $num_tests - $left;
6701-
my $spent = time - $^T;
6702-
6703-
&$set_titlebar(sprintf "mtr: spent %s on %d tests. %s (%d tests) left",
6704-
time_format($spent), $done,
6705-
time_format($spent/$done * $left), $left);
6706-
}

0 commit comments

Comments
 (0)