Skip to content

Commit ac53b49

Browse files
author
Alexander Barkov
committed
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
2 parents 583b68e + db0917f commit ac53b49

File tree

398 files changed

+15182
-4342
lines changed

Some content is hidden

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

398 files changed

+15182
-4342
lines changed

client/mysqldump.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0, opt_no_data_m
114114
opt_slave_apply= 0,
115115
opt_include_master_host_port= 0,
116116
opt_events= 0, opt_comments_used= 0,
117-
opt_alltspcs=0, opt_notspcs= 0, opt_logging;
117+
opt_alltspcs=0, opt_notspcs= 0, opt_logging,
118+
opt_drop_trigger= 0 ;
118119
static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0;
119120
static ulong opt_max_allowed_packet, opt_net_buffer_length;
120121
static MYSQL mysql_connection,*mysql=0;
@@ -233,6 +234,9 @@ static struct my_option my_long_options[] =
233234
{"add-drop-table", OPT_DROP, "Add a DROP TABLE before each create.",
234235
&opt_drop, &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
235236
0},
237+
{"add-drop-trigger", 0, "Add a DROP TRIGGER before each create.",
238+
&opt_drop_trigger, &opt_drop_trigger, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
239+
0},
236240
{"add-locks", OPT_LOCKS, "Add locks around INSERT statements.",
237241
&opt_lock, &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
238242
0},
@@ -3281,6 +3285,10 @@ static void dump_trigger_old(FILE *sql_file, MYSQL_RES *show_triggers_rs,
32813285
if (opt_compact)
32823286
fprintf(sql_file, "/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;\n");
32833287

3288+
if (opt_drop_trigger)
3289+
fprintf(sql_file, "/*!50032 DROP TRIGGER IF EXISTS %s */;\n",
3290+
(*show_trigger_row)[0]);
3291+
32843292
fprintf(sql_file,
32853293
"DELIMITER ;;\n"
32863294
"/*!50003 SET SESSION SQL_MODE=\"%s\" */;;\n"
@@ -3361,6 +3369,10 @@ static int dump_trigger(FILE *sql_file, MYSQL_RES *show_create_trigger_rs,
33613369

33623370
switch_sql_mode(sql_file, ";", row[1]);
33633371

3372+
if (opt_drop_trigger)
3373+
fprintf(sql_file, "/*!50032 DROP TRIGGER IF EXISTS %s */;\n",
3374+
row[0]);
3375+
33643376
query_str= cover_definer_clause(row[2], strlen(row[2]),
33653377
C_STRING_WITH_LEN("50017"),
33663378
C_STRING_WITH_LEN("50003"),

cmake/cpu_info.cmake

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,25 @@
1515

1616
# Symbols with information about the CPU.
1717

18-
FIND_PROGRAM(GETCONF getconf)
19-
MARK_AS_ADVANCED(GETCONF)
18+
IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
19+
FIND_PROGRAM(SYSCTL sysctl)
20+
MARK_AS_ADVANCED(SYSCTL)
2021

21-
IF(GETCONF)
22-
EXECUTE_PROCESS(
23-
COMMAND ${GETCONF} LEVEL1_DCACHE_LINESIZE
24-
OUTPUT_VARIABLE CPU_LEVEL1_DCACHE_LINESIZE
25-
)
22+
IF(SYSCTL)
23+
EXECUTE_PROCESS(
24+
COMMAND ${SYSCTL} -n hw.cachelinesize
25+
OUTPUT_VARIABLE CPU_LEVEL1_DCACHE_LINESIZE
26+
)
27+
ENDIF()
28+
29+
ELSE()
30+
FIND_PROGRAM(GETCONF getconf)
31+
MARK_AS_ADVANCED(GETCONF)
32+
33+
IF(GETCONF)
34+
EXECUTE_PROCESS(
35+
COMMAND ${GETCONF} LEVEL1_DCACHE_LINESIZE
36+
OUTPUT_VARIABLE CPU_LEVEL1_DCACHE_LINESIZE
37+
)
38+
ENDIF()
2639
ENDIF()

cmake/libutils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
188188
# binaries properly)
189189
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
190190
COMMAND rm ${TARGET_LOCATION}
191-
COMMAND /usr/bin/libtool -static -o ${TARGET_LOCATION}
191+
COMMAND libtool -static -o ${TARGET_LOCATION}
192192
${STATIC_LIBS}
193193
)
194194
ELSE()

cmake/wsrep.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ENDIF()
2626
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
2727

2828
# Set the patch version
29-
SET(WSREP_PATCH_VERSION "16")
29+
SET(WSREP_PATCH_VERSION "19")
3030

3131
# Obtain wsrep API version
3232
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION

debian/mariadb-server-10.2.install

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ usr/lib/mysql/plugin/semisync_slave.so
5656
usr/lib/mysql/plugin/server_audit.so
5757
usr/lib/mysql/plugin/simple_password_check.so
5858
usr/lib/mysql/plugin/sql_errlog.so
59-
usr/lib/mysql/plugin/user_variables.so
6059
usr/lib/mysql/plugin/wsrep_info.so
6160
usr/share/apport/package-hooks/source_mariadb-10.2.py
6261
usr/share/doc/mariadb-server-10.2/mysqld.sym.gz

extra/innochecksum.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,6 @@ is_page_corrupted(
571571
if (mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0) {
572572
is_corrupted = fil_space_verify_crypt_checksum(
573573
const_cast<byte*>(buf), page_size,
574-
strict_verify, is_log_enabled ? log_file : NULL,
575574
mach_read_from_4(buf
576575
+ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID),
577576
cur_page_num);
@@ -581,9 +580,7 @@ is_page_corrupted(
581580

582581
if (is_corrupted) {
583582
is_corrupted = buf_page_is_corrupted(
584-
true, buf, page_size, NULL,
585-
cur_page_num, strict_verify,
586-
is_log_enabled, log_file);
583+
true, buf, page_size, NULL);
587584
}
588585

589586
return(is_corrupted);

man/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
2626
mysqld_safe_helper.1 tokuftdump.1 wsrep_sst_common.1
2727
wsrep_sst_mysqldump.1 wsrep_sst_rsync.1
2828
wsrep_sst_xtrabackup-v2.1 wsrep_sst_xtrabackup.1
29-
galera_recovery.1 galera_new_cluster.1)
29+
galera_recovery.1 galera_new_cluster.1 tokuft_logdump.1)
3030
SET(MAN8_SERVER mysqld.8)
3131
SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1
3232
mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1
3333
mysqldump.1 mysqlimport.1 mysqlshow.1 mysqlslap.1
3434
mysql_plugin.1)
3535
SET(MAN1_DEVEL mysql_config.1)
3636
SET(MAN1_TEST mysql-stress-test.pl.1 mysql-test-run.pl.1 mysql_client_test.1
37-
mysqltest_embedded.1 mysql_client_test_embedded.1)
37+
mysqltest_embedded.1 mysql_client_test_embedded.1 my_safe_process.1)
3838

3939
INSTALL(FILES ${MAN1_SERVER} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesServer)
4040
INSTALL(FILES ${MAN8_SERVER} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPagesServer)

man/my_safe_process.1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'\" t
2+
.\"
3+
.TH "\FBMY_SAFE_PROCESS\FR" "1" "29 March 2017" "MariaDB 10\&.1" "MariaDB Database System"
4+
.\" -----------------------------------------------------------------
5+
.\" * set default formatting
6+
.\" -----------------------------------------------------------------
7+
.\" disable hyphenation
8+
.nh
9+
.\" disable justification (adjust text to left margin only)
10+
.ad l
11+
.SH NAME
12+
my_safe_process \- Utility program that encapsulates process creation, monitoring and bulletproof process cleanup
13+
.SH DESCRIPTION
14+
Use: safe_process [options to safe_process] -- progname arg1 \.\.\. argn\.
15+
.PP
16+
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/

man/tokuft_logdump.1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'\" t
2+
.\"
3+
.TH "\FBTOKUFT_LOGPRINT\FR" "1" "27 March 2017" "MariaDB 10\&.1" "MariaDB Database System"
4+
.\" -----------------------------------------------------------------
5+
.\" * set default formatting
6+
.\" -----------------------------------------------------------------
7+
.\" disable hyphenation
8+
.nh
9+
.\" disable justification (adjust text to left margin only)
10+
.ad l
11+
.SH NAME
12+
tokuft_logprint \- Dump the log from stdin to stdout
13+
.SH DESCRIPTION
14+
Use: Dump the log from stdin to stdout\.
15+
.PP
16+
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/

mysql-test/include/assert_grep.inc

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# ==== Purpose ====
2+
#
3+
# Grep a file for a pattern, produce a single string out of the
4+
# matching lines, and assert that the string matches a given regular
5+
# expression.
6+
#
7+
# ==== Usage ====
8+
#
9+
# --let $assert_text= TEXT
10+
# --let $assert_file= FILE
11+
# --let $assert_select= REGEX
12+
# [--let $assert_match= REGEX | --let $assert_count= NUMBER]
13+
# [--let $assert_only_after= REGEX]
14+
# --source include/assert_grep.inc
15+
#
16+
# Parameters:
17+
#
18+
# $assert_text
19+
# Text that describes what is being checked. This text is written to
20+
# the query log so it should not contain non-deterministic elements.
21+
#
22+
# $assert_file
23+
# File to search.
24+
#
25+
# $assert_select
26+
# All lines matching this text will be checked.
27+
#
28+
# $assert_match
29+
# The script will find all lines that match $assert_select,
30+
# concatenate them to a long string, and assert that it matches
31+
# $assert_match.
32+
#
33+
# $assert_count
34+
# Instead of asserting that the selected lines match
35+
# $assert_match, assert that there were exactly $assert_count
36+
# matching lines.
37+
#
38+
# $assert_only_after
39+
# Reset all the lines matched and the counter when finding this pattern.
40+
# It is useful for searching things in the mysqld.err log file just
41+
# after the last server restart for example (discarding the log content
42+
# of previous server executions).
43+
44+
45+
if (!$assert_text)
46+
{
47+
--die !!!ERROR IN TEST: you must set $assert_text
48+
}
49+
if (!$assert_file)
50+
{
51+
--die !!!ERROR IN TEST: you must set $assert_file
52+
}
53+
if (!$assert_select)
54+
{
55+
--die !!!ERROR IN TEST: you must set $assert_select
56+
}
57+
if ($assert_match == '')
58+
{
59+
if ($assert_count == '')
60+
{
61+
--die !!!ERROR IN TEST: you must set either $assert_match or $assert_count
62+
}
63+
}
64+
if ($assert_match != '')
65+
{
66+
if ($assert_count != '')
67+
{
68+
--echo assert_text='$assert_text' assert_count='$assert_count'
69+
--die !!!ERROR IN TEST: you must set only one of $assert_match or $assert_count
70+
}
71+
}
72+
73+
74+
--let $include_filename= assert_grep.inc [$assert_text]
75+
--source include/begin_include_file.inc
76+
77+
78+
--let _AG_ASSERT_TEXT= $assert_text
79+
--let _AG_ASSERT_FILE= $assert_file
80+
--let _AG_ASSERT_SELECT= $assert_select
81+
--let _AG_ASSERT_MATCH= $assert_match
82+
--let _AG_ASSERT_COUNT= $assert_count
83+
--let _AG_OUT= `SELECT CONCAT('$MYSQLTEST_VARDIR/tmp/_ag_', UUID())`
84+
--let _AG_ASSERT_ONLY_AFTER= $assert_only_after
85+
86+
87+
--perl
88+
use strict;
89+
use warnings;
90+
my $file= $ENV{'_AG_ASSERT_FILE'};
91+
my $assert_select= $ENV{'_AG_ASSERT_SELECT'};
92+
my $assert_match= $ENV{'_AG_ASSERT_MATCH'};
93+
my $assert_count= $ENV{'_AG_ASSERT_COUNT'};
94+
my $assert_only_after= $ENV{'_AG_ASSERT_ONLY_AFTER'};
95+
my $out= $ENV{'_AG_OUT'};
96+
97+
my $result= '';
98+
my $count= 0;
99+
open(FILE, "$file") or die("Error $? opening $file: $!\n");
100+
while (<FILE>) {
101+
my $line = $_;
102+
if ($assert_only_after && $line =~ /$assert_only_after/) {
103+
$result = "";
104+
$count = 0;
105+
}
106+
if ($line =~ /$assert_select/) {
107+
if ($assert_count ne '') {
108+
$count++;
109+
}
110+
else {
111+
$result .= $line;
112+
}
113+
}
114+
}
115+
close(FILE) or die("Error $? closing $file: $!");
116+
open OUT, "> $out" or die("Error $? opening $out: $!");
117+
if ($assert_count ne '' && ($count != $assert_count)) {
118+
print OUT ($count) or die("Error $? writing $out: $!");
119+
}
120+
elsif ($assert_count eq '' && $result !~ /$assert_match/) {
121+
print OUT ($result) or die("Error $? writing $out: $!");
122+
}
123+
else {
124+
print OUT ("assert_grep.inc ok");
125+
}
126+
close OUT or die("Error $? closing $out: $!");
127+
EOF
128+
129+
130+
--let $_ag_outcome= `SELECT LOAD_FILE('$_AG_OUT')`
131+
if ($_ag_outcome != 'assert_grep.inc ok')
132+
{
133+
--source include/show_rpl_debug_info.inc
134+
--echo include/assert_grep.inc failed!
135+
--echo assert_text: '$assert_text'
136+
--echo assert_file: '$assert_file'
137+
--echo assert_select: '$assert_select'
138+
--echo assert_match: '$assert_match'
139+
--echo assert_count: '$assert_count'
140+
--echo assert_only_after: '$assert_only_after'
141+
if ($assert_match != '')
142+
{
143+
--echo matching lines: '$_ag_outcome'
144+
}
145+
if ($assert_count != '')
146+
{
147+
--echo number of matching lines: $_ag_outcome
148+
}
149+
--die assert_grep.inc failed.
150+
}
151+
152+
153+
--let $include_filename= include/assert_grep.inc [$assert_text]
154+
--source include/end_include_file.inc

0 commit comments

Comments
 (0)