Skip to content

Commit

Permalink
Merge 10.9 into 10.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jan 10, 2023
2 parents 66f7f79 + 820ebce commit cae5a03
Show file tree
Hide file tree
Showing 205 changed files with 3,269 additions and 2,329 deletions.
20 changes: 18 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ variables:
echo "$package"
rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3
echo "------------------------------------------------"
done >> ../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
done >> "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log"
# CPackRPM lists contents in build log, so no need to show the output of this,
# just store it as a build artifact that can be downloaded and diffed against
# other builds to detect which files where added/removed/moved
Expand Down Expand Up @@ -182,7 +182,7 @@ fedora-sanitizer:
GIT_SUBMODULE_STRATEGY: normal
script:
- yum install -y yum-utils rpm-build openssl-devel clang
- yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0
- yum install -y libasan libtsan libubsan
# This repository does not have any .spec files, so install dependencies based on Fedora spec file
- yum-builddep -y mariadb-server
- mkdir builddir; cd builddir
Expand Down Expand Up @@ -305,6 +305,8 @@ mysql-test-run:
stage: test
dependencies:
- fedora
needs:
- fedora
<<: *mysql-test-run-def
artifacts:
when: always # Also show results when tests fail
Expand All @@ -326,6 +328,8 @@ mysql-test-run-asan:
RESTART_POLICY: "--force-restart"
dependencies:
- "fedora-sanitizer: [-DWITH_ASAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_ASAN=YES]"
<<: *mysql-test-run-def
artifacts:
when: always # Also show results when tests fail
Expand All @@ -339,6 +343,8 @@ mysql-test-run-tsan:
RESTART_POLICY: "--force-restart"
dependencies:
- "fedora-sanitizer: [-DWITH_TSAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_TSAN=YES]"
<<: *mysql-test-run-def
allow_failure: true
artifacts:
Expand All @@ -353,6 +359,8 @@ mysql-test-run-ubsan:
RESTART_POLICY: "--force-restart"
dependencies:
- "fedora-sanitizer: [-DWITH_UBSAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_UBSAN=YES]"
<<: *mysql-test-run-def
allow_failure: true
artifacts:
Expand All @@ -367,6 +375,8 @@ mysql-test-run-msan:
RESTART_POLICY: "--force-restart"
dependencies:
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
needs:
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
<<: *mysql-test-run-def
allow_failure: true
artifacts:
Expand All @@ -379,6 +389,8 @@ rpmlint:
stage: test
dependencies:
- fedora
needs:
- fedora
script:
- yum install -y rpmlint
- rm -f rpm/*debuginfo* # Not relevant in this test
Expand All @@ -396,6 +408,8 @@ fedora install:
stage: test
dependencies:
- fedora
needs:
- fedora
script:
- rm -f rpm/*debuginfo* # Not relevant in this test
# Nothing provides galera-4 on Fedora, so this step fails if built with wsrep
Expand Down Expand Up @@ -429,6 +443,8 @@ fedora upgrade:
stage: test
dependencies:
- fedora
needs:
- fedora
script:
- dnf install -y mariadb-server
# Fedora does not support running services in Docker (like Debian packages do) so start it manually
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
[submodule "libmariadb"]
path = libmariadb
url = https://github.com/MariaDB/mariadb-connector-c.git
ignore = all
[submodule "storage/rocksdb/rocksdb"]
path = storage/rocksdb/rocksdb
url = https://github.com/facebook/rocksdb.git
ignore = all
[submodule "wsrep-lib"]
path = wsrep-lib
url = https://github.com/codership/wsrep-lib.git
branch = master
ignore = all
[submodule "extra/wolfssl/wolfssl"]
path = extra/wolfssl/wolfssl
url = https://github.com/wolfSSL/wolfssl.git
ignore = all
[submodule "storage/maria/libmarias3"]
path = storage/maria/libmarias3
url = https://github.com/mariadb-corporation/libmarias3.git
ignore = all
[submodule "storage/columnstore/columnstore"]
path = storage/columnstore/columnstore
url = https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
ignore = all
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ IF (WITH_MSAN)
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
ENDIF()

OPTION(WITH_GPROF "Enable profilingg with gprof" OFF)
OPTION(WITH_GPROF "Enable profiling with gprof" OFF)
IF (WITH_GPROF)
MY_CHECK_AND_SET_COMPILER_FLAG("-pg -g -no-pie -fPIC")
ENDIF()
Expand Down
2 changes: 1 addition & 1 deletion cmake/install_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug
FUNCTION(INSTALL_MYSQL_TEST from to)
IF(INSTALL_MYSQLTESTDIR)
IF(NOT WITH_WSREP)
SET(EXCL_GALERA "(suite/(galera|wsrep|sys_vars/[rt]/(sysvars_)?wsrep).*|include/((w.*)?wsrep.*|.*galera.*)\\.inc|std_data/(galera|wsrep).*)")
SET(EXCL_GALERA "(suite/(galera|wsrep|sys_vars/[rt]/(sysvars_)?wsrep).*|std_data/(galera|wsrep).*)")
ELSE()
SET(EXCL_GALERA "^DOES_NOT_EXIST$")
ENDIF()
Expand Down
2 changes: 1 addition & 1 deletion debian/additions/innotop/innotop
Original file line number Diff line number Diff line change
Expand Up @@ -4933,7 +4933,7 @@ sub noecho_password {
};

if ( $EVAL_ERROR ) {
die "Cannot read respose; is Term::ReadKey installed? $EVAL_ERROR";
die "Cannot read response; is Term::ReadKey installed? $EVAL_ERROR";
}
return $response;
}
Expand Down
4 changes: 2 additions & 2 deletions debian/additions/mariadb-report
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ sub set_myisam_vals
{
print "set_myisam_vals\n" if $op{debug};

# should be moved elsewere
# should be moved elsewhere
$questions = $stats{'Questions'};

$key_read_ratio = sprintf "%.2f",
Expand Down Expand Up @@ -1376,7 +1376,7 @@ format QCACHE =
__ Query Cache _________________________________________________________
Memory usage @>>>>>> of @>>>>>> %Usage: @>>>>>
make_short($qc_mem_used, 1), make_short($vars{'query_cache_size'}, 1), perc($qc_mem_used, $vars{'query_cache_size'})
Block Fragmnt @>>>>>%
Block Fragment @>>>>>%
perc($stats{'Qcache_free_blocks'}, $stats{'Qcache_total_blocks'})
Hits @>>>>>> @>>>>>/s
make_short($stats{'Qcache_hits'}), t($stats{'Qcache_hits'})
Expand Down
8 changes: 7 additions & 1 deletion debian/mariadb-server.mariadb.init
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ else
exit -1
fi

if [ ! -x /usr/bin/mariadbd-safe ]
then
log_failure_msg "/usr/bin/mariadbd-safe not found or executable! This SysV init script depends on it."
exit -1
fi

# priority can be overridden and "-s" adds output to stderr
ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mariadb -i"

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

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

for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do
sleep 1
Expand Down
2 changes: 1 addition & 1 deletion debian/mariadb-server.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ EOF

# This is important to avoid dataloss when there is a removed
# mysql-server version from Woody lying around which used the same
# data directory and then somewhen gets purged by the admin.
# data directory and then somehow gets purged by the admin.
db_set mariadb-server/postrm_remove_database false || true

# Clean up old flags before setting new one
Expand Down
4 changes: 2 additions & 2 deletions debian/not-installed
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lib/systemd/system/mariadb@.service # Installed by rules file
lib/systemd/system/mariadb@.socket # Installed by rules file
usr/bin/mariadb-embedded # Shipping the embedded server in distro packaging does not make sense
usr/bin/mysql_config # Debian packaging has mysql_config as symlink to mariadb_config
usr/bin/mysql_embedded # Symlink to mariadb-embeded which is intentionally not included
usr/bin/mysql_embedded # Symlink to mariadb-embedded which is intentionally not included
usr/bin/sst_dump # Use the one from rocksdb-tools package
usr/lib/aarch64-linux-gnu/libdbbc.a # ColumnStore header file
usr/lib/aarch64-linux-gnu/libidbboot.a # ColumnStore header file
Expand Down Expand Up @@ -41,7 +41,7 @@ usr/share/groonga-normalizer-mysql/lgpl-2.0.txt
usr/share/groonga/COPYING
usr/share/groonga/README.md
usr/share/man/man1/mariadb-embedded.1 # Shipping the embedded server in distro packaging does not make sense
usr/share/man/man1/mysql_embedded.1 # Symlink to mariadb-embeded.1 which is intentionally not included
usr/share/man/man1/mysql_embedded.1 # Symlink to mariadb-embedded.1 which is intentionally not included
usr/share/man/man1/my_safe_process.1
usr/share/man/man1/mysql-stress-test.pl.1
usr/share/man/man1/mysql.server.1
Expand Down
2 changes: 1 addition & 1 deletion debian/salsa-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ build mariadbclient consumer Python-MySQLdb:
image: debian:${RELEASE}
script:
- *test-prepare-container
# Run each step separately to avoitda 800+ lines chunk that lacks the
# Run each step separately to avoid an 800+ line chunk that lacks the
# commands themselves printed and Gitlab-CI cutting off the output
- apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb
- pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with
Expand Down
12 changes: 6 additions & 6 deletions debian/tests/smoke
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ else
systemctl restart mariadb
fi

mysql <<EOT
mariadb <<EOT
CREATE DATABASE testdatabase;
CREATE USER 'testuser'@'localhost' identified by 'testpassword';
GRANT ALL ON testdatabase.* TO 'testuser'@'localhost';
EOT

mysql testdatabase <<EOT
mariadb testdatabase <<EOT
CREATE TABLE foo (bar INTEGER);
INSERT INTO foo (bar) VALUES (41);
EOT

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

mysql --user=testuser --password=testpassword testdatabase <<EOT
mariadb --user=testuser --password=testpassword testdatabase <<EOT
DROP TABLE foo;
EOT

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

# Print RocksDB supported items so test log is easier to debug
Expand Down
2 changes: 0 additions & 2 deletions extra/mariabackup/backup_copy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1483,8 +1483,6 @@ bool backup_start(CorruptedPages &corrupted_pages)
if (!write_galera_info(mysql_connection)) {
return(false);
}
// copied from xtrabackup. what is it needed for here?
write_current_binlog_file(mysql_connection);
}

if (opt_binlog_info == BINLOG_INFO_ON) {
Expand Down
8 changes: 6 additions & 2 deletions extra/mariabackup/backup_mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1374,14 +1374,18 @@ write_galera_info(MYSQL *connection)

if ((state_uuid == NULL && state_uuid55 == NULL)
|| (last_committed == NULL && last_committed55 == NULL)) {
msg("Failed to get master wsrep state from SHOW STATUS.");
result = false;
msg("Warning: failed to get master wsrep state from SHOW STATUS.");
result = true;
goto cleanup;
}

result = backup_file_printf(XTRABACKUP_GALERA_INFO,
"%s:%s\n", state_uuid ? state_uuid : state_uuid55,
last_committed ? last_committed : last_committed55);
if (result)
{
write_current_binlog_file(connection);
}

cleanup:
free_mysql_variables(status);
Expand Down
25 changes: 23 additions & 2 deletions extra/mariabackup/fil_cur.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ xb_fil_cur_open(
in case of error */
cursor->buf = NULL;
cursor->node = NULL;
cursor->n_process_batch = 0;

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

Expand Down Expand Up @@ -374,6 +375,8 @@ xb_fil_cur_result_t xb_fil_cur_read(xb_fil_cur_t* cursor,
return(XB_FIL_CUR_EOF);
}

reinit_buf:
cursor->n_process_batch++;
if (to_read > (ib_int64_t) cursor->buf_size) {
to_read = (ib_int64_t) cursor->buf_size;
}
Expand Down Expand Up @@ -416,8 +419,26 @@ xb_fil_cur_result_t xb_fil_cur_read(xb_fil_cur_t* cursor,

if (os_file_read(IORequestRead, cursor->file, cursor->buf, offset,
(ulint) to_read, nullptr) != DB_SUCCESS) {
ret = XB_FIL_CUR_ERROR;
goto func_exit;
if (!srv_is_undo_tablespace(cursor->space_id)) {
ret = XB_FIL_CUR_ERROR;
goto func_exit;
}

if (cursor->buf_page_no
>= SRV_UNDO_TABLESPACE_SIZE_IN_PAGES) {
ret = XB_FIL_CUR_SKIP;
goto func_exit;
}

to_read = SRV_UNDO_TABLESPACE_SIZE_IN_PAGES * page_size;

if (cursor->n_process_batch > 1) {
ret = XB_FIL_CUR_ERROR;
goto func_exit;
}

space->release();
goto reinit_buf;
}

defer = UT_LIST_GET_FIRST(space->chain)->deferred;
Expand Down
1 change: 1 addition & 0 deletions extra/mariabackup/fil_cur.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct xb_fil_cur_t {
uint thread_n; /*!< thread number for diagnostics */
uint32_t space_id; /*!< ID of tablespace */
uint32_t space_size; /*!< space size in pages */
uint32_t n_process_batch;/*!< Number of batch processed */

/** @return whether this is not a file-per-table tablespace */
bool is_system() const
Expand Down
Loading

0 comments on commit cae5a03

Please sign in to comment.