Skip to content

Commit 820ebce

Browse files
committed
Merge 10.8 into 10.9
2 parents 0225159 + 92c8d6f commit 820ebce

File tree

197 files changed

+3244
-2320
lines changed

Some content is hidden

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

197 files changed

+3244
-2320
lines changed

.gitlab-ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ variables:
7171
echo "$package"
7272
rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3
7373
echo "------------------------------------------------"
74-
done >> ../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
74+
done >> "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log"
7575
# CPackRPM lists contents in build log, so no need to show the output of this,
7676
# just store it as a build artifact that can be downloaded and diffed against
7777
# other builds to detect which files where added/removed/moved
@@ -182,7 +182,7 @@ fedora-sanitizer:
182182
GIT_SUBMODULE_STRATEGY: normal
183183
script:
184184
- yum install -y yum-utils rpm-build openssl-devel clang
185-
- yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0
185+
- yum install -y libasan libtsan libubsan
186186
# This repository does not have any .spec files, so install dependencies based on Fedora spec file
187187
- yum-builddep -y mariadb-server
188188
- mkdir builddir; cd builddir
@@ -305,6 +305,8 @@ mysql-test-run:
305305
stage: test
306306
dependencies:
307307
- fedora
308+
needs:
309+
- fedora
308310
<<: *mysql-test-run-def
309311
artifacts:
310312
when: always # Also show results when tests fail
@@ -326,6 +328,8 @@ mysql-test-run-asan:
326328
RESTART_POLICY: "--force-restart"
327329
dependencies:
328330
- "fedora-sanitizer: [-DWITH_ASAN=YES]"
331+
needs:
332+
- "fedora-sanitizer: [-DWITH_ASAN=YES]"
329333
<<: *mysql-test-run-def
330334
artifacts:
331335
when: always # Also show results when tests fail
@@ -339,6 +343,8 @@ mysql-test-run-tsan:
339343
RESTART_POLICY: "--force-restart"
340344
dependencies:
341345
- "fedora-sanitizer: [-DWITH_TSAN=YES]"
346+
needs:
347+
- "fedora-sanitizer: [-DWITH_TSAN=YES]"
342348
<<: *mysql-test-run-def
343349
allow_failure: true
344350
artifacts:
@@ -353,6 +359,8 @@ mysql-test-run-ubsan:
353359
RESTART_POLICY: "--force-restart"
354360
dependencies:
355361
- "fedora-sanitizer: [-DWITH_UBSAN=YES]"
362+
needs:
363+
- "fedora-sanitizer: [-DWITH_UBSAN=YES]"
356364
<<: *mysql-test-run-def
357365
allow_failure: true
358366
artifacts:
@@ -367,6 +375,8 @@ mysql-test-run-msan:
367375
RESTART_POLICY: "--force-restart"
368376
dependencies:
369377
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
378+
needs:
379+
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
370380
<<: *mysql-test-run-def
371381
allow_failure: true
372382
artifacts:
@@ -379,6 +389,8 @@ rpmlint:
379389
stage: test
380390
dependencies:
381391
- fedora
392+
needs:
393+
- fedora
382394
script:
383395
- yum install -y rpmlint
384396
- rm -f rpm/*debuginfo* # Not relevant in this test
@@ -396,6 +408,8 @@ fedora install:
396408
stage: test
397409
dependencies:
398410
- fedora
411+
needs:
412+
- fedora
399413
script:
400414
- rm -f rpm/*debuginfo* # Not relevant in this test
401415
# Nothing provides galera-4 on Fedora, so this step fails if built with wsrep
@@ -429,6 +443,8 @@ fedora upgrade:
429443
stage: test
430444
dependencies:
431445
- fedora
446+
needs:
447+
- fedora
432448
script:
433449
- dnf install -y mariadb-server
434450
# Fedora does not support running services in Docker (like Debian packages do) so start it manually

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
[submodule "libmariadb"]
22
path = libmariadb
33
url = https://github.com/MariaDB/mariadb-connector-c.git
4+
ignore = all
45
[submodule "storage/rocksdb/rocksdb"]
56
path = storage/rocksdb/rocksdb
67
url = https://github.com/facebook/rocksdb.git
8+
ignore = all
79
[submodule "wsrep-lib"]
810
path = wsrep-lib
911
url = https://github.com/codership/wsrep-lib.git
1012
branch = master
13+
ignore = all
1114
[submodule "extra/wolfssl/wolfssl"]
1215
path = extra/wolfssl/wolfssl
1316
url = https://github.com/wolfSSL/wolfssl.git
17+
ignore = all
1418
[submodule "storage/maria/libmarias3"]
1519
path = storage/maria/libmarias3
1620
url = https://github.com/mariadb-corporation/libmarias3.git
21+
ignore = all
1722
[submodule "storage/columnstore/columnstore"]
1823
path = storage/columnstore/columnstore
1924
url = https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
25+
ignore = all

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ IF (WITH_MSAN)
236236
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
237237
ENDIF()
238238

239-
OPTION(WITH_GPROF "Enable profilingg with gprof" OFF)
239+
OPTION(WITH_GPROF "Enable profiling with gprof" OFF)
240240
IF (WITH_GPROF)
241241
MY_CHECK_AND_SET_COMPILER_FLAG("-pg -g -no-pie -fPIC")
242242
ENDIF()

cmake/install_macros.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug
266266
FUNCTION(INSTALL_MYSQL_TEST from to)
267267
IF(INSTALL_MYSQLTESTDIR)
268268
IF(NOT WITH_WSREP)
269-
SET(EXCL_GALERA "(suite/(galera|wsrep|sys_vars/[rt]/(sysvars_)?wsrep).*|include/((w.*)?wsrep.*|.*galera.*)\\.inc|std_data/(galera|wsrep).*)")
269+
SET(EXCL_GALERA "(suite/(galera|wsrep|sys_vars/[rt]/(sysvars_)?wsrep).*|std_data/(galera|wsrep).*)")
270270
ELSE()
271271
SET(EXCL_GALERA "^DOES_NOT_EXIST$")
272272
ENDIF()

debian/mariadb-server.mariadb.init

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ else
3434
exit -1
3535
fi
3636

37+
if [ ! -x /usr/bin/mariadbd-safe ]
38+
then
39+
log_failure_msg "/usr/bin/mariadbd-safe not found or executable! This SysV init script depends on it."
40+
exit -1
41+
fi
42+
3743
# priority can be overridden and "-s" adds output to stderr
3844
ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mariadb -i"
3945

@@ -127,7 +133,7 @@ case "${1:-''}" in
127133
test -e /run/mysqld || install -m 755 -o mysql -g root -d /run/mysqld
128134

129135
# Start MariaDB!
130-
/usr/bin/mysqld_safe "${@:2}" 2>&1 >/dev/null | $ERR_LOGGER &
136+
/usr/bin/mariadbd-safe "${@:2}" 2>&1 >/dev/null | $ERR_LOGGER &
131137

132138
for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do
133139
sleep 1

debian/tests/smoke

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,28 @@ else
4545
systemctl restart mariadb
4646
fi
4747

48-
mysql <<EOT
48+
mariadb <<EOT
4949
CREATE DATABASE testdatabase;
5050
CREATE USER 'testuser'@'localhost' identified by 'testpassword';
5151
GRANT ALL ON testdatabase.* TO 'testuser'@'localhost';
5252
EOT
5353

54-
mysql testdatabase <<EOT
54+
mariadb testdatabase <<EOT
5555
CREATE TABLE foo (bar INTEGER);
5656
INSERT INTO foo (bar) VALUES (41);
5757
EOT
5858

59-
result=$(echo 'SELECT bar+1 FROM foo;'|mysql --batch --skip-column-names --user=testuser --password=testpassword testdatabase)
59+
result=$(echo 'SELECT bar+1 FROM foo;'|mariadb --batch --skip-column-names --user=testuser --password=testpassword testdatabase)
6060
if [ "$result" != "42" ]; then
6161
echo "Unexpected result" >&2
6262
exit 1
6363
fi
6464

65-
mysql --user=testuser --password=testpassword testdatabase <<EOT
65+
mariadb --user=testuser --password=testpassword testdatabase <<EOT
6666
DROP TABLE foo;
6767
EOT
6868

69-
mysql <<EOT
69+
mariadb <<EOT
7070
DROP DATABASE testdatabase;
7171
DROP USER 'testuser'@'localhost';
7272
EOT
@@ -94,7 +94,7 @@ if [ "$(dpkg-architecture -qDEB_HOST_ARCH_BITS)" != 32 ] &&
9494
LOG=/var/lib/mysql/#rocksdb/LOG
9595
# XXX: The server may only be started during the install of
9696
# mariadb-server, which happens before that of the plugin.
97-
[ -e $LOG ] || mysql -e "INSTALL PLUGIN RocksDB SONAME 'ha_rocksdb';"
97+
[ -e $LOG ] || mariadb -e "INSTALL PLUGIN RocksDB SONAME 'ha_rocksdb';"
9898
# XXX: rocksdb_supported_compression_types variable does not report ZSTD.
9999

100100
# Print RocksDB supported items so test log is easier to debug

extra/mariabackup/backup_copy.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,8 +1483,6 @@ bool backup_start(CorruptedPages &corrupted_pages)
14831483
if (!write_galera_info(mysql_connection)) {
14841484
return(false);
14851485
}
1486-
// copied from xtrabackup. what is it needed for here?
1487-
write_current_binlog_file(mysql_connection);
14881486
}
14891487

14901488
if (opt_binlog_info == BINLOG_INFO_ON) {

extra/mariabackup/backup_mysql.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,14 +1444,18 @@ write_galera_info(MYSQL *connection)
14441444

14451445
if ((state_uuid == NULL && state_uuid55 == NULL)
14461446
|| (last_committed == NULL && last_committed55 == NULL)) {
1447-
msg("Failed to get master wsrep state from SHOW STATUS.");
1448-
result = false;
1447+
msg("Warning: failed to get master wsrep state from SHOW STATUS.");
1448+
result = true;
14491449
goto cleanup;
14501450
}
14511451

14521452
result = backup_file_printf(XTRABACKUP_GALERA_INFO,
14531453
"%s:%s\n", state_uuid ? state_uuid : state_uuid55,
14541454
last_committed ? last_committed : last_committed55);
1455+
if (result)
1456+
{
1457+
write_current_binlog_file(connection);
1458+
}
14551459

14561460
cleanup:
14571461
free_mysql_variables(status);

extra/mariabackup/fil_cur.cc

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ xb_fil_cur_open(
129129
in case of error */
130130
cursor->buf = NULL;
131131
cursor->node = NULL;
132+
cursor->n_process_batch = 0;
132133

133134
cursor->space_id = node->space->id;
134135

@@ -374,6 +375,8 @@ xb_fil_cur_result_t xb_fil_cur_read(xb_fil_cur_t* cursor,
374375
return(XB_FIL_CUR_EOF);
375376
}
376377

378+
reinit_buf:
379+
cursor->n_process_batch++;
377380
if (to_read > (ib_int64_t) cursor->buf_size) {
378381
to_read = (ib_int64_t) cursor->buf_size;
379382
}
@@ -416,8 +419,26 @@ xb_fil_cur_result_t xb_fil_cur_read(xb_fil_cur_t* cursor,
416419

417420
if (os_file_read(IORequestRead, cursor->file, cursor->buf, offset,
418421
(ulint) to_read, nullptr) != DB_SUCCESS) {
419-
ret = XB_FIL_CUR_ERROR;
420-
goto func_exit;
422+
if (!srv_is_undo_tablespace(cursor->space_id)) {
423+
ret = XB_FIL_CUR_ERROR;
424+
goto func_exit;
425+
}
426+
427+
if (cursor->buf_page_no
428+
>= SRV_UNDO_TABLESPACE_SIZE_IN_PAGES) {
429+
ret = XB_FIL_CUR_SKIP;
430+
goto func_exit;
431+
}
432+
433+
to_read = SRV_UNDO_TABLESPACE_SIZE_IN_PAGES * page_size;
434+
435+
if (cursor->n_process_batch > 1) {
436+
ret = XB_FIL_CUR_ERROR;
437+
goto func_exit;
438+
}
439+
440+
space->release();
441+
goto reinit_buf;
421442
}
422443

423444
defer = UT_LIST_GET_FIRST(space->chain)->deferred;

extra/mariabackup/fil_cur.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ struct xb_fil_cur_t {
5858
uint thread_n; /*!< thread number for diagnostics */
5959
uint32_t space_id; /*!< ID of tablespace */
6060
uint32_t space_size; /*!< space size in pages */
61+
uint32_t n_process_batch;/*!< Number of batch processed */
6162

6263
/** @return whether this is not a file-per-table tablespace */
6364
bool is_system() const

0 commit comments

Comments
 (0)