Skip to content

Commit a43ff48

Browse files
committed
Merge 10.5 into 10.6
2 parents 7a4fbb5 + a4b7232 commit a43ff48

Some content is hidden

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

64 files changed

+779
-305
lines changed

cmake/pcre.cmake

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ MACRO(BUNDLE_PCRE2)
1414
IF(WIN32)
1515
# Debug libary name.
1616
# Same condition as in pcre2 CMakeLists.txt that adds "d"
17-
SET(file ${dir}/src/pcre2-build/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX})
18-
SET(file_d ${dir}/src/pcre2-build/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}d${CMAKE_STATIC_LIBRARY_SUFFIX})
17+
GET_PROPERTY(MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
18+
IF(MULTICONFIG)
19+
SET(intdir "${CMAKE_CFG_INTDIR}/")
20+
ELSE()
21+
SET(intdir)
22+
ENDIF()
23+
24+
SET(file ${dir}/src/pcre2-build/${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX})
25+
SET(file_d ${dir}/src/pcre2-build/${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}d${CMAKE_STATIC_LIBRARY_SUFFIX})
1926
SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION_DEBUG ${file_d})
2027
ELSE()
2128
SET(file ${dir}/src/pcre2-build/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX})

debian/control

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@ Section: database
33
Priority: optional
44
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
55
Build-Depends: bison,
6-
chrpath,
76
cmake,
8-
cracklib-runtime,
7+
cracklib-runtime <!nocheck>,
98
debhelper (>= 9),
10-
dh-apparmor,
119
dh-exec,
1210
dh-systemd,
1311
flex [amd64],
14-
gdb,
12+
gdb <!nocheck>,
1513
libaio-dev [linux-any],
16-
libarchive-dev,
1714
libboost-atomic-dev [amd64],
1815
libboost-chrono-dev [amd64],
1916
libboost-date-time-dev [amd64],

debian/salsa-ci.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ mariadb-10.1 Stretch to mariadb-10.6 upgrade:
292292
# Install almost everything currently in Debian Stretch,
293293
# omitting libmariadbclient-dev-compat as it would conflict
294294
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*'
295-
# Verify installation of MariaDB from Buster
295+
# Verify installation of MariaDB from Stretch
296296
- *test-verify-initial
297297
- *test-enable-sid-repos
298298
- *test-install
@@ -562,31 +562,6 @@ mysql-8.0 Sid to mariadb-10.6 upgrade:
562562
# Installation often fails (not a MariaDB reason), so do not require this test to pass
563563
allow_failure: true
564564

565-
mysql-5.7 Sid to mariadb-10.6 upgrade:
566-
stage: upgrade in Sid
567-
needs:
568-
- job: build
569-
artifacts: true
570-
image: debian:sid
571-
artifacts:
572-
when: always
573-
name: "$CI_BUILD_NAME"
574-
paths:
575-
- ${WORKING_DIR}/debug
576-
script:
577-
- *test-prepare-container
578-
- apt-get install -y mysql-server-5.7 'libmysqlc*'
579-
- *test-verify-initial
580-
- *test-install
581-
- service mysql status
582-
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
583-
- *test-verify-final
584-
variables:
585-
GIT_STRATEGY: none
586-
except:
587-
variables:
588-
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
589-
590565
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
591566
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
592567
mysql-8.0 Focal to mariadb-10.6 upgrade:
@@ -622,8 +597,6 @@ mysql-8.0 Focal to mariadb-10.6 upgrade:
622597
except:
623598
variables:
624599
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
625-
# Installation often fails (not a MariaDB reason), so do not require this test to pass
626-
allow_failure: true
627600

628601
mysql-5.7 Bionic to mariadb-10.6 upgrade:
629602
stage: upgrade extras

debian/tests/smoke

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
echo "Running test 'smoke'"
2525
set -ex
2626

27-
# Start the deamon if it was not running. For example in Docker testing
27+
# Start the daemon if it was not running. For example in Docker testing
2828
# environments there might not be any systemd et al and the service needs to
2929
# be started manually.
3030
if ! which systemctl
@@ -66,25 +66,43 @@ DROP DATABASE testdatabase;
6666
DROP USER 'testuser'@'localhost';
6767
EOT
6868

69-
mysql <<EOT
69+
# List based on what is advertised at
70+
# https://mariadb.com/kb/en/innodb-page-compression/#configuring-the-innodb-page-compression-algorithm
71+
# but disabled with '#' the options that are not available in this binary build
72+
mariadb <<EOT
7073
SET GLOBAL innodb_compression_algorithm=lz4;
74+
#SET GLOBAL innodb_compression_algorithm=lzo;
75+
#SET GLOBAL innodb_compression_algorithm=lzma;
76+
#SET GLOBAL innodb_compression_algorithm=bzip2;
77+
#SET GLOBAL innodb_compression_algorithm=snappy;
7178
SET GLOBAL innodb_compression_algorithm=zlib;
7279
SET GLOBAL innodb_compression_algorithm=none;
7380
EOT
7481

75-
# Check whether RocksDB should be installed or not.
82+
# Check whether RocksDB should be installed or not
7683
plugin=mariadb-plugin-rocksdb
7784
if [ "$(dpkg-architecture -qDEB_HOST_ARCH_BITS)" != 32 ] &&
78-
[ "$(dpkg-architecture -qDEB_HOST_ARCH_ENDIAN)" = little ]; then
85+
[ "$(dpkg-architecture -qDEB_HOST_ARCH_ENDIAN)" = little ]
86+
then
7987
dpkg-query -W $plugin
8088

8189
LOG=/var/lib/mysql/#rocksdb/LOG
8290
# XXX: The server may only be started during the install of
8391
# mariadb-server-10.6, which happens before that of the plugin.
8492
[ -e $LOG ] || mysql -e "INSTALL PLUGIN RocksDB SONAME 'ha_rocksdb';"
8593
# XXX: rocksdb_supported_compression_types variable does not report ZSTD.
94+
95+
# Print RocksDB supported items so test log is easier to debug
96+
grep -F " supported:" $LOG
97+
98+
# Check that the expected compression methods are supported
8699
for a in LZ4 Snappy Zlib ZSTD; do
87-
grep -qE "k$a(Compression)? supported: 1" $LOG
100+
if ! grep -qE "k$a(Compression)? supported: 1" $LOG
101+
then
102+
# Fail with explicit error message
103+
echo "Error: Compression method $a not supported by RocksDB!" >&2
104+
exit 1
105+
fi
88106
done
89107
else
90108
! dpkg-query -W $plugin

debian/tests/upstream

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ EOF
5050
fi
5151

5252
ARCH=$(dpkg --print-architecture)
53-
if [ "$ARCH" = "s390x" ]; then
54-
echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST
53+
if [ "$ARCH" = "s390x" ]
54+
then
55+
echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST
56+
elif [ "$ARCH" = "armhf" ] || [ "$ARCH" = "i386" ]
57+
then
58+
echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> $SKIP_TEST_LST
5559
fi
5660

5761
cd /usr/share/mysql/mysql-test

extra/mariabackup/xtrabackup.cc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
6161
#include <sys/resource.h>
6262
#endif
6363

64+
#ifdef __APPLE__
65+
# include "libproc.h"
66+
#endif
67+
6468

6569
#include <btr0sea.h>
6670
#include <dict0priv.h>
@@ -6218,8 +6222,9 @@ void handle_options(int argc, char **argv, char ***argv_server,
62186222
}
62196223
}
62206224

6225+
mariabackup_args.push_back(nullptr);
62216226
*argv_client= *argv_server= *argv_backup= &mariabackup_args[0];
6222-
int argc_backup= static_cast<int>(mariabackup_args.size());
6227+
int argc_backup= static_cast<int>(mariabackup_args.size() - 1);
62236228
int argc_client= argc_backup;
62246229
int argc_server= argc_backup;
62256230

@@ -6682,6 +6687,12 @@ static int get_exepath(char *buf, size_t size, const char *argv0)
66826687
ssize_t ret = readlink("/proc/self/exe", buf, size-1);
66836688
if(ret > 0)
66846689
return 0;
6690+
#elif defined(__APPLE__)
6691+
size_t ret = proc_pidpath(getpid(), buf, static_cast<uint32_t>(size));
6692+
if (ret > 0) {
6693+
buf[ret] = 0;
6694+
return 0;
6695+
}
66856696
#endif
66866697

66876698
return my_realpath(buf, argv0, 0);

mysql-test/main/deadlock_ftwrl.result

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
CREATE TABLE t1(a INT);
2+
SELECT GET_LOCK("l1", 0);
3+
GET_LOCK("l1", 0)
4+
1
5+
connect con1,localhost,root,,;
6+
LOCK TABLES t1 WRITE;
7+
connection default;
8+
set debug_sync='mdl_acquire_lock_wait SIGNAL ftwrl';
9+
FLUSH TABLES WITH READ LOCK;
10+
connection con1;
11+
set debug_sync='now WAIT_FOR ftwrl';
12+
SELECT GET_LOCK("l1", 1000);
13+
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
14+
disconnect con1;
15+
connection default;
16+
SELECT RELEASE_LOCK("l1");
17+
RELEASE_LOCK("l1")
18+
1
19+
UNLOCK TABLES;
20+
DROP TABLE t1;
21+
set debug_sync='reset';

mysql-test/main/deadlock_ftwrl.test

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# MDEV-20946 Hard FTWRL deadlock under user level locks
2+
#
3+
# Deadlock detector should resolve conflicts between FTWRL and user locks.
4+
5+
--source include/have_debug_sync.inc
6+
--source include/count_sessions.inc
7+
8+
CREATE TABLE t1(a INT);
9+
SELECT GET_LOCK("l1", 0);
10+
11+
connect(con1,localhost,root,,);
12+
LOCK TABLES t1 WRITE;
13+
14+
connection default;
15+
set debug_sync='mdl_acquire_lock_wait SIGNAL ftwrl';
16+
send FLUSH TABLES WITH READ LOCK;
17+
# At this point "default" is waiting for tables to be unlocked from
18+
# LOCK TABLES WRITE issued by "con1".
19+
20+
connection con1;
21+
set debug_sync='now WAIT_FOR ftwrl';
22+
# The lock in the following GET_LOCK cannot be acquired since "default" holds
23+
# a lock on "l1" and is waiting in FLUSH TABLES for con1.
24+
--error ER_LOCK_DEADLOCK
25+
SELECT GET_LOCK("l1", 1000);
26+
disconnect con1; # Performs an implicit UNLOCK TABLES.
27+
28+
connection default;
29+
reap;
30+
SELECT RELEASE_LOCK("l1");
31+
UNLOCK TABLES;
32+
DROP TABLE t1;
33+
34+
set debug_sync='reset';
35+
36+
--source include/wait_until_count_sessions.inc

mysql-test/main/information_schema.result

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION;
565565
create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION;
566566
select * from information_schema.views;
567567
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
568-
def mysql user select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` NONE YES mariadb.sys@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
568+
def mysql user select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` NONE YES mariadb.sys@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
569569
def test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
570570
def test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
571571
def test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
@@ -2338,5 +2338,12 @@ count(*)
23382338
2
23392339
DROP TABLE t1;
23402340
#
2341+
# MDEV-24868 Server crashes in optimize_schema_tables_memory_usage after select from information_schema.innodb_sys_columns
2342+
#
2343+
create table t1 ( name varchar(64) character set utf8, len int);
2344+
select * from t1 where (name, len) in (select name, len from information_schema.innodb_sys_columns having len = 8);
2345+
name len
2346+
drop table t1;
2347+
#
23412348
# End of 10.3 tests
23422349
#

mysql-test/main/information_schema.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,6 +2042,14 @@ INSERT INTO t1 VALUES ('2012-12-12'),('2021-11-11');
20422042
SELECT count(*) FROM t1 AS t1a LEFT JOIN (t1 AS t1b JOIN INFORMATION_SCHEMA.ROUTINES) ON (t1b.a IS NULL);
20432043
SELECT count(*) FROM t1 AS t1a LEFT JOIN (t1 AS t1b JOIN INFORMATION_SCHEMA.PROFILING) ON (t1b.a IS NULL);
20442044
DROP TABLE t1;
2045+
2046+
--echo #
2047+
--echo # MDEV-24868 Server crashes in optimize_schema_tables_memory_usage after select from information_schema.innodb_sys_columns
2048+
--echo #
2049+
create table t1 ( name varchar(64) character set utf8, len int);
2050+
select * from t1 where (name, len) in (select name, len from information_schema.innodb_sys_columns having len = 8);
2051+
drop table t1;
2052+
20452053
--echo #
20462054
--echo # End of 10.3 tests
20472055
--echo #

0 commit comments

Comments
 (0)