Skip to content

Commit

Permalink
Merge 10.2 into 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed May 29, 2020
2 parents 19da9a5 + 38ea795 commit e9aaa10
Show file tree
Hide file tree
Showing 27 changed files with 304 additions and 318 deletions.
3 changes: 2 additions & 1 deletion cmake/build_configurations/mysql_release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ ELSEIF(DEB)
SET(HAVE_EMBEDDED_PRIVILEGE_CONTROL ON)
ELSE()
SET(WITH_SSL bundled CACHE STRING "")
SET(WITH_PCRE bundled CACHE STRING "")
SET(WITH_ZLIB bundled CACHE STRING "")
SET(WITH_JEMALLOC static CACHE STRING "")
ENDIF()
Expand Down Expand Up @@ -138,7 +139,7 @@ IF(UNIX)
RedHat/Fedora/Oracle Linux: yum install libaio-devel
SuSE: zypper install libaio-devel
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
If you really do not want it, pass -DIGNORE_AIO_CHECK=ON to cmake.
")
ENDIF()

Expand Down
1 change: 1 addition & 0 deletions cmake/cpack_source_ignore_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

SET(CPACK_SOURCE_IGNORE_FILES
\\\\.git/
\\\\.git$
\\\\.gitignore$
\\\\.gitattributes$
CMakeCache\\\\.txt$
Expand Down
4 changes: 2 additions & 2 deletions cmake/submodules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
SET(update_result 0)
ELSEIF (cmake_update_submodules MATCHES force)
MESSAGE(STATUS "Updating submodules (forced)")
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force --depth=1
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE update_result)
ELSEIF (cmake_update_submodules MATCHES yes)
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --depth=1
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE update_result)
ELSE()
Expand Down
2 changes: 1 addition & 1 deletion libmariadb
60 changes: 45 additions & 15 deletions mysql-test/lib/mtr_report.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ use My::Platform;
use POSIX qw[ _exit ];
use IO::Handle qw[ flush ];
use mtr_results;

use Term::ANSIColor;
use English;

my $tot_real_time= 0;
my $tests_done= 0;
my $tests_failed= 0;

our $timestamp= 0;
our $timediff= 0;
our $name;
our $verbose;
our $verbose_restart= 0;
our $timer= 1;
our $tests_total;

my %color_map = qw/pass green
retry-pass green
Expand All @@ -47,20 +59,39 @@ my %color_map = qw/pass green
disabled bright_black
skipped yellow
reset reset/;
sub xterm_color {
if (-t STDOUT and defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) {
syswrite STDOUT, color($color_map{$_[0]});

my $set_titlebar;
my $set_color= sub { };

if (-t STDOUT) {
if (IS_WINDOWS) {
eval {
require Win32::Console;
$set_titlebar = sub { &Win32::Console::Title($_[0]);};
}
} elsif ($ENV{TERM} =~ /xterm/) {
$set_titlebar = sub { syswrite STDOUT, "\e]0;$_[0]\a"; };
$set_color = sub { syswrite STDOUT, color($color_map{$_[0]}); }
}
}

my $tot_real_time= 0;
sub titlebar_stat($) {

our $timestamp= 0;
our $timediff= 0;
our $name;
our $verbose;
our $verbose_restart= 0;
our $timer= 1;
sub time_format($) {
sprintf '%d:%02d:%02d', $_[0]/3600, ($_[0]/60)%60, $_[0]%60;
}

$tests_done++;
$tests_failed++ if $_[0] =~ /fail/;
$tests_total++ if $_[0] =~ /retry/;

my $spent = time - $BASETIME;
my $left = $tests_total - $tests_done;

&$set_titlebar(sprintf "mtr: spent %s on %d tests. %s (%d tests) left, %d failed",
time_format($spent), $tests_done,
time_format($spent/$tests_done * $left), $left, $tests_failed);
}

sub report_option {
my ($opt, $value)= @_;
Expand Down Expand Up @@ -321,8 +352,6 @@ sub mtr_report_stats ($$$$) {

if ( $timer )
{
use English;

mtr_report("Spent", sprintf("%.3f", $tot_real_time),"of",
time - $BASETIME, "seconds executing testcases");
}
Expand Down Expand Up @@ -620,10 +649,11 @@ sub mtr_report (@) {
my @s = split /\[ (\S+) \]/, _name() . "@_\n";
if (@s > 1) {
print $s[0];
xterm_color($s[1]);
&$set_color($s[1]);
print "[ $s[1] ]";
xterm_color('reset');
&$set_color('reset');
print $s[2];
titlebar_stat($s[1]) if $set_titlebar;
} else {
print $s[0];
}
Expand Down
5 changes: 4 additions & 1 deletion mysql-test/main/comment_table.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DROP TABLE IF EXISTS t1;
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)
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
Expand Down Expand Up @@ -125,3 +124,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
table_comment char_length(table_comment)
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
column_comment char_length(column_comment)
set names utf8;
create table t1 (x int comment 'a�');
ERROR HY000: Invalid utf8 character string: 'a'
set names latin1;
11 changes: 8 additions & 3 deletions mysql-test/main/comment_table.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#1024 bytes
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)
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
Expand Down Expand Up @@ -53,3 +50,11 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';

#
# MDEV-22558 wrong error for invalid utf8 table comment
#
set names utf8;
--error ER_INVALID_CHARACTER_STRING
create table t1 (x int comment 'a�');
set names latin1;
21 changes: 21 additions & 0 deletions mysql-test/main/repair.result
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,24 @@ i
UNLOCK TABLES;
DROP TABLE t1;
# End of 10.0 tests
create table t1 (a int, b varchar(200));
insert t1 select seq, repeat(200, seq) from seq_1_to_30;
delete from t1 where a % 13 = 0;
repair table t1 use_frm;
Table Op Msg_type Msg_text
test.t1 repair warning Number of rows changed from 0 to 28
test.t1 repair status OK
delete from t1 where a % 11 = 0;
repair table t1 extended use_frm;
Table Op Msg_type Msg_text
test.t1 repair warning Number of rows changed from 0 to 26
test.t1 repair status OK
delete from t1 where a % 7 = 0;
set myisam_repair_threads = 2;
repair table t1 use_frm;
Table Op Msg_type Msg_text
test.t1 repair warning Number of rows changed from 0 to 22
test.t1 repair status OK
set myisam_repair_threads = default;
drop table t1;
# End of 10.2 tests
21 changes: 21 additions & 0 deletions mysql-test/main/repair.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Test of repair table
#
--source include/have_sequence.inc
--source include/default_charset.inc

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

--echo # End of 10.0 tests

#
# MDEV-17153 server crash on repair table ... use_frm
#
# Note, this test case doesn't crash, but shows spurios warnings
# unless the bug is fixed
#
create table t1 (a int, b varchar(200));
insert t1 select seq, repeat(200, seq) from seq_1_to_30;
delete from t1 where a % 13 = 0;
repair table t1 use_frm;
delete from t1 where a % 11 = 0;
repair table t1 extended use_frm;
delete from t1 where a % 7 = 0;
set myisam_repair_threads = 2;
repair table t1 use_frm;
set myisam_repair_threads = default;
drop table t1;

--echo # End of 10.2 tests
50 changes: 1 addition & 49 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -374,32 +374,6 @@ ($)
select(STDOUT);
$| = 1; # Automatically flush STDOUT

my $set_titlebar;


BEGIN {
if (IS_WINDOWS) {
my $have_win32_console= 0;
eval {
require Win32::Console;
Win32::Console->import();
$have_win32_console = 1;
};
eval 'sub HAVE_WIN32_CONSOLE { $have_win32_console }';
} else {
eval 'sub HAVE_WIN32_CONSOLE { 0 }';
}
}

if (-t STDOUT) {
if (IS_WINDOWS and HAVE_WIN32_CONSOLE) {
$set_titlebar = sub {Win32::Console::Title $_[0];};
} elsif (defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) {
$set_titlebar = sub { syswrite STDOUT, "\e];$_[0]\a"; };
}
}


main();

sub have_wsrep() {
Expand Down Expand Up @@ -637,7 +611,7 @@ sub main {
}

#######################################################################
my $num_tests= @$tests;
my $num_tests= $mtr_report::tests_total= @$tests;
if ( $opt_parallel eq "auto" ) {
# Try to find a suitable value for number of workers
if (IS_WINDOWS)
Expand Down Expand Up @@ -1078,8 +1052,6 @@ ($$$)
delete $next->{reserved};
}

titlebar_stat(scalar(@$tests)) if $set_titlebar;

if ($next) {
# We don't need this any more
delete $next->{criteria};
Expand Down Expand Up @@ -6684,23 +6656,3 @@ ($)

exit(1);
}

sub time_format($) {
sprintf '%d:%02d:%02d', $_[0]/3600, ($_[0]/60)%60, $_[0]%60;
}

our $num_tests;

sub titlebar_stat {
my ($left) = @_;

# 2.5 -> best by test
$num_tests = $left + 2.5 unless $num_tests;

my $done = $num_tests - $left;
my $spent = time - $^T;

&$set_titlebar(sprintf "mtr: spent %s on %d tests. %s (%d tests) left",
time_format($spent), $done,
time_format($spent/$done * $left), $left);
}
Loading

0 comments on commit e9aaa10

Please sign in to comment.