From 114476f2ec8244bd02b0f51fdaca05e055a2c1dc Mon Sep 17 00:00:00 2001 From: Haidong Ji Date: Mon, 7 Mar 2022 21:17:39 -0600 Subject: [PATCH 01/30] MDEV-27978 fix wrong name in error when max_session_mem_used exceeded Fixed typo in my_malloc_size_cb_func. There is no max-thread-mem-used sys variable in MariaDB, only max-session-mem-used. The relevant entry in sys_vars.cc is also fixed. Added a fallback case in case we could allocate the 256 bytes for the error message containing the exact setting. --- mysql-test/r/error_simulation.result | 10 ++++++++++ mysql-test/r/truncate_notembedded.result | 2 +- mysql-test/t/error_simulation.test | 13 +++++++++++++ sql/mysqld.cc | 7 ++++++- sql/sys_vars.cc | 2 +- 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result index 457e5c8ec9c..680937accfd 100644 --- a/mysql-test/r/error_simulation.result +++ b/mysql-test/r/error_simulation.result @@ -128,3 +128,13 @@ SELECT f1(1); Got one of the listed errors DROP FUNCTION f1; SET debug_dbug= @saved_dbug; +# +# MDEV-27978 wrong option name in error when exceeding max_session_mem_used +# +SET SESSION max_session_mem_used = 8192; +SELECT * FROM information_schema.processlist; +ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement +SET SESSION max_session_mem_used = DEFAULT; +# +# End of 10.2 tests +# diff --git a/mysql-test/r/truncate_notembedded.result b/mysql-test/r/truncate_notembedded.result index dabd5474141..90f27fd2688 100644 --- a/mysql-test/r/truncate_notembedded.result +++ b/mysql-test/r/truncate_notembedded.result @@ -13,7 +13,7 @@ a UNLOCK TABLES; connection con1; TRUNCATE TABLE t1; -ERROR HY000: The MariaDB server is running with the --max-thread-mem-used=45500 option so it cannot execute this statement +ERROR HY000: The MariaDB server is running with the --max-session-mem-used=45500 option so it cannot execute this statement disconnect con1; connection default; DROP TABLE t1; diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test index f713e2da6ba..2c155bc9a22 100644 --- a/mysql-test/t/error_simulation.test +++ b/mysql-test/t/error_simulation.test @@ -158,3 +158,16 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory"; SELECT f1(1); DROP FUNCTION f1; SET debug_dbug= @saved_dbug; + +--echo # +--echo # MDEV-27978 wrong option name in error when exceeding max_session_mem_used +--echo # +SET SESSION max_session_mem_used = 8192; +--error ER_OPTION_PREVENTS_STATEMENT +SELECT * FROM information_schema.processlist; +SET SESSION max_session_mem_used = DEFAULT; + + +--echo # +--echo # End of 10.2 tests +--echo # diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6a7ea117c84..7f18f758d13 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4090,13 +4090,18 @@ static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific) /* Ensure we don't get called here again */ char buf[50], *buf2; thd->set_killed(KILL_QUERY); - my_snprintf(buf, sizeof(buf), "--max-thread-mem-used=%llu", + my_snprintf(buf, sizeof(buf), "--max-session-mem-used=%llu", thd->variables.max_mem_used); if ((buf2= (char*) thd->alloc(256))) { my_snprintf(buf2, 256, ER_THD(thd, ER_OPTION_PREVENTS_STATEMENT), buf); thd->set_killed(KILL_QUERY, ER_OPTION_PREVENTS_STATEMENT, buf2); } + else + { + thd->set_killed(KILL_QUERY, ER_OPTION_PREVENTS_STATEMENT, + "--max-session-mem-used"); + } } DBUG_ASSERT((longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory); diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index ee862e4936e..6a35176bd99 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -5719,7 +5719,7 @@ static Sys_var_ulong Sys_log_tc_size( BLOCK_SIZE(my_getpagesize())); #endif -static Sys_var_ulonglong Sys_max_thread_mem( +static Sys_var_ulonglong Sys_max_session_mem_used( "max_session_mem_used", "Amount of memory a single user session " "is allowed to allocate. This limits the value of the " "session variable MEM_USED", SESSION_VAR(max_mem_used), From 6de482a6fefac0c21daf33ed465644151cdf879f Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 4 Mar 2022 16:46:06 +1100 Subject: [PATCH 02/30] MDEV-28011: debian autobake cleanup Travis is dead to us so we don't need all the conditions around it. Remove depends for no longer supported versions Debian Jessies, and Ubuntu Trusty, Xenial, Wily are all eol as far as we are concerned. The dependancy on an apt cache when running autobake broke the 10.2 aarch64 packages (MDEV-28014). Lets reduce the risk here. --- debian/autobake-deb.sh | 110 +++++------------------------------------ debian/control | 5 +- 2 files changed, 13 insertions(+), 102 deletions(-) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 21ab4d8fe22..a9715dc30fd 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -9,31 +9,7 @@ set -e # On Buildbot, don't run the mysql-test-run test suite as part of build. # It takes a lot of time, and we will do a better test anyway in # Buildbot, running the test suite from installed .debs on a clean VM. -# On Travis-CI we want to simulate the full build, including tests. -# Also on Travis-CI it is useful not to override the DEB_BUILD_OPTIONS -# at this stage at all. -if [[ ! $TRAVIS ]] -then - export DEB_BUILD_OPTIONS="nocheck" -fi - -# Travis-CI optimizations -if [[ $TRAVIS ]] -then - # On Travis-CI, the log must stay under 4MB so make the build less verbose - sed -i -e '/Add support for verbose builds/,+2d' debian/rules - - # Don't include test suite package on Travis-CI to make the build time shorter - sed '/Package: mariadb-test-data/,/^$/d' -i debian/control - sed '/Package: mariadb-test/,/^$/d' -i debian/control - sed '/Package: mariadb-plugin-tokudb/,/^$/d' -i debian/control - sed '/Package: mariadb-plugin-mroonga/,/^$/d' -i debian/control - sed '/Package: mariadb-plugin-spider/,/^$/d' -i debian/control - sed '/Package: mariadb-plugin-oqgraph/,/^$/d' -i debian/control - export MYSQL_COMPILER_LAUNCHER=ccache - sed 's|-DDEB|-DPLUGIN_TOKUDB=NO -DPLUGIN_MROONGA=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -WITH_EMBEDDED_SERVER=OFF -DDEB|' -i debian/rules -fi - +export DEB_BUILD_OPTIONS="nocheck" # Look up distro-version specific stuff # @@ -41,52 +17,8 @@ fi # Debian policy and targetting Debian Sid. Then case-by-case run in autobake-deb.sh # tests for backwards compatibility and strip away parts on older builders. -# If iproute2 is not available (before Debian Jessie and Ubuntu Trusty) -# fall back to the old iproute package. -if ! apt-cache madison iproute2 | grep 'iproute2 *|' >/dev/null 2>&1 -then - sed 's/iproute2/iproute/' -i debian/control -fi - -# If libcrack2 (>= 2.9.0) is not available (before Debian Jessie and Ubuntu Trusty) -# clean away the cracklib stanzas so the package can build without them. -if ! apt-cache madison libcrack2-dev | grep 'libcrack2-dev *| *2\.9' >/dev/null 2>&1 -then - sed '/libcrack2-dev/d' -i debian/control - sed '/Package: mariadb-plugin-cracklib/,/^$/d' -i debian/control -fi - -# If libpcre3-dev (>= 2:8.35-3.2~) is not available (before Debian Jessie or Ubuntu Wily) -# clean away the PCRE3 stanzas so the package can build without them. -# Update check when version 2:8.40 or newer is available. -if ! apt-cache madison libpcre3-dev | grep 'libpcre3-dev *| *2:8\.3[2-9]' >/dev/null 2>&1 -then - sed '/libpcre3-dev/d' -i debian/control -fi - -# If libsystemd-dev is not available (before Debian Jessie or Ubuntu Wily) -# clean away the systemd stanzas so the package can build without them. -if ! apt-cache madison libsystemd-dev | grep 'libsystemd-dev' >/dev/null 2>&1 -then - sed '/dh-systemd/d' -i debian/control - sed '/libsystemd-dev/d' -i debian/control - sed 's/ --with systemd//' -i debian/rules - sed '/systemd/d' -i debian/rules - sed '/\.service/d' -i debian/rules - sed '/galera_new_cluster/d' -i debian/mariadb-server-10.2.install - sed '/galera_recovery/d' -i debian/mariadb-server-10.2.install - sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.2.install -fi - -# Convert gcc version to numberical value. Format is Mmmpp where M is Major -# version, mm is minor version and p is patch. -# -dumpfullversion & -dumpversion to make it uniform across old and new (>=7) -GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' \ - -e 's/\.\([0-9]\)/0\1/g' \ - -e 's/^[0-9]\{3,4\}$/&00/') -# Don't build rocksdb package if gcc version is less than 4.8 or we are running on -# x86 32 bit. -if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]] +# Don't build rocksdb package on x86 32 bit. +if [[ $(arch) =~ i[346]86 ]] then sed '/Package: mariadb-plugin-rocksdb/,/^$/d' -i debian/control fi @@ -106,15 +38,6 @@ then sed '/Package: mariadb-plugin-cassandra/,/^$/d' -i debian/control fi -# From Debian Stretch/Ubuntu Bionic onwards dh-systemd is just an empty -# transitional metapackage and the functionality was merged into debhelper. -# In Ubuntu Hirsute is was completely removed, so it can't be referenced anymore. -# Keep using it only on Debian Jessie and Ubuntu Xenial. -if apt-cache madison dh-systemd | grep 'dh-systemd' >/dev/null 2>&1 -then - sed 's/debhelper (>= 9.20160709~),/debhelper (>= 9), dh-systemd,/' -i debian/control -fi - # Adjust changelog, add new version echo "Incrementing changelog and starting build scripts" @@ -133,13 +56,6 @@ dch -b -D ${CODENAME} -v "${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automat echo "Creating package version ${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... " -# On Travis CI, use -b to build binary only packages as there is no need to -# waste time on generating the source package. -if [[ $TRAVIS ]] -then - BUILDPACKAGE_FLAGS="-b" -fi - # Build the package # Pass -I so that .git and other unnecessary temporary and source control files # will be ignored by dpkg-source when creating the tar.gz source package. @@ -148,17 +64,13 @@ fakeroot dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS # If the step above fails due to missing dependencies, you can manually run # sudo mk-build-deps debian/control -r -i -# Don't log package contents on Travis-CI to save time and log size -if [[ ! $TRAVIS ]] -then - echo "List package contents ..." - cd .. - for package in `ls *.deb` - do - echo $package | cut -d '_' -f 1 - dpkg-deb -c $package | awk '{print $1 " " $2 " " $6}' | sort -k 3 - echo "------------------------------------------------" - done -fi +echo "List package contents ..." +cd .. +for package in `ls *.deb` +do + echo $package | cut -d '_' -f 1 + dpkg-deb -c $package | awk '{print $1 " " $2 " " $6}' | sort -k 3 + echo "------------------------------------------------" +done echo "Build complete" diff --git a/debian/control b/debian/control index 372abafe205..bcae798e4c1 100644 --- a/debian/control +++ b/debian/control @@ -5,9 +5,8 @@ Maintainer: MariaDB Developers Build-Depends: bison, chrpath, cmake (>= 2.7), - debhelper (>= 9.20160709~), + debhelper (>= 10), dh-apparmor, - dh-systemd, dpatch, gdb, libaio-dev [linux-any], @@ -353,7 +352,7 @@ Depends: bsdutils, findutils, galera-3 (>=25.3), gawk, - iproute | iproute2, + iproute2, libdbi-perl, lsb-base (>= 3.0-10), lsof, From ed6e271f786504916dbcbd3d55ee17cd3f2566ef Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Mon, 14 Mar 2022 00:59:44 +0200 Subject: [PATCH 03/30] MDEV-28036 gcol.gcol_supported_sql_funcs_xxx fail in FIPS mode --- mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc index 88268ddd6c4..3f48f86ce7c 100644 --- a/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc +++ b/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc @@ -12,6 +12,9 @@ # Change Date: # # Change: # ################################################################################ + +--source include/have_des.inc + set time_zone="+03:00"; --echo # --echo # NUMERIC FUNCTIONS From bfed2c7d57a7ca34936d6ef0688af7357592dc40 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 11 Mar 2022 20:18:22 +0100 Subject: [PATCH 04/30] MDEV-27753 Incorrect ENGINE type of table after crash for CONNECT table whenever possible, partitioning should use the full partition plugin name, not the one byte legacy code. Normally, ha_partition can get the engine plugin from table_share->default_part_plugin. But in some cases, e.g. in DROP TABLE, the table isn't opened, table_share is NULL, and ha_partition has to parse the frm, much like dd_frm_type() does. temporary_tables.cc, sql_table.cc: When dropping a table, it must be deleted in the engine first, then frm file. Because frm can be the only true source of metadata that the engine might need for DROP. table.cc: when opening a partitioned table, if the engine for partitions is not found, do not fallback to MyISAM. --- mysql-test/main/drop_bad_db_type.result | 54 +++++++----- mysql-test/main/drop_bad_db_type.test | 19 +++-- .../main/partition_not_blackhole.result | 2 +- mysql-test/main/partition_not_blackhole.test | 2 +- sql/ha_partition.cc | 84 +++++++++++++++++-- sql/ha_partition.h | 3 +- sql/sql_table.cc | 12 +-- sql/table.cc | 2 +- sql/temporary_tables.cc | 13 +-- sql/unireg.h | 15 ++++ 10 files changed, 159 insertions(+), 47 deletions(-) diff --git a/mysql-test/main/drop_bad_db_type.result b/mysql-test/main/drop_bad_db_type.result index ae6fe708e60..97869a39aa3 100644 --- a/mysql-test/main/drop_bad_db_type.result +++ b/mysql-test/main/drop_bad_db_type.result @@ -3,34 +3,50 @@ SET debug_dbug='+d,unstable_db_type'; install soname 'ha_archive'; create table t1 (a int) engine=archive; insert t1 values (1),(2),(3); +create table t2 (a int) engine=archive partition by hash(a) partitions 3; flush tables; uninstall soname 'ha_archive'; -select table_schema, table_name from information_schema.tables where table_name like 't1'; -table_schema test -table_name t1 -select table_schema, table_name, engine, version from information_schema.tables where table_name like 't1'; -table_schema test -table_name t1 -engine ARCHIVE -version NULL +select table_schema, table_name from information_schema.tables where table_name like 't_' order by 1,2; +table_schema table_name +test t1 +test t2 +select table_schema, table_name, engine, version from information_schema.tables where table_name like 't_' order by 1,2; +table_schema table_name engine version +test t1 ARCHIVE NULL +test t2 NULL NULL Warnings: -Level Warning -Code 1286 -Message Unknown storage engine 'ARCHIVE' -select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't1'; -table_schema test -table_name t1 -engine ARCHIVE -row_format NULL +Warning 1033 Incorrect information in file: './test/t2.frm' +Warning 1286 Unknown storage engine 'ARCHIVE' +select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't_' order by 1,2; +table_schema table_name engine row_format +test t1 ARCHIVE NULL +test t2 NULL NULL Warnings: -Level Warning -Code 1286 -Message Unknown storage engine 'ARCHIVE' +Warning 1033 Incorrect information in file: './test/t2.frm' +Warning 1286 Unknown storage engine 'ARCHIVE' install soname 'ha_archive'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +PARTITIONS 3 db.opt t1.ARZ t1.frm +t2#P#p0.ARZ +t2#P#p1.ARZ +t2#P#p2.ARZ +t2.frm +t2.par drop table t1; +drop table t2; db.opt uninstall soname 'ha_archive'; SET debug_dbug=@saved_dbug; diff --git a/mysql-test/main/drop_bad_db_type.test b/mysql-test/main/drop_bad_db_type.test index ebc732104d3..0fb5fe5edf4 100644 --- a/mysql-test/main/drop_bad_db_type.test +++ b/mysql-test/main/drop_bad_db_type.test @@ -1,4 +1,4 @@ - +--source include/have_partition.inc --source include/have_debug.inc if (!$HA_ARCHIVE_SO) { @@ -13,18 +13,25 @@ SET debug_dbug='+d,unstable_db_type'; install soname 'ha_archive'; create table t1 (a int) engine=archive; insert t1 values (1),(2),(3); + +create table t2 (a int) engine=archive partition by hash(a) partitions 3; + flush tables; uninstall soname 'ha_archive'; ---vertical_results -select table_schema, table_name from information_schema.tables where table_name like 't1'; -select table_schema, table_name, engine, version from information_schema.tables where table_name like 't1'; -select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't1'; ---horizontal_results +select table_schema, table_name from information_schema.tables where table_name like 't_' order by 1,2; +--replace_result $mysqld_datadir ./ +select table_schema, table_name, engine, version from information_schema.tables where table_name like 't_' order by 1,2; +--replace_result $mysqld_datadir ./ +select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't_' order by 1,2; install soname 'ha_archive'; +show create table t1; +show create table t2; + --list_files $mysqld_datadir/test drop table t1; +drop table t2; --list_files $mysqld_datadir/test uninstall soname 'ha_archive'; diff --git a/mysql-test/main/partition_not_blackhole.result b/mysql-test/main/partition_not_blackhole.result index ff1e51df892..7759f947c32 100644 --- a/mysql-test/main/partition_not_blackhole.result +++ b/mysql-test/main/partition_not_blackhole.result @@ -9,7 +9,7 @@ SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; -ERROR HY000: Failed to read from the .par file +ERROR HY000: Incorrect information in file: './test/t1.frm' DROP TABLE t1; ERROR HY000: Got error 1 "Operation not permitted" from storage engine partition t1.frm diff --git a/mysql-test/main/partition_not_blackhole.test b/mysql-test/main/partition_not_blackhole.test index d9e653b5252..fe7452432b2 100644 --- a/mysql-test/main/partition_not_blackhole.test +++ b/mysql-test/main/partition_not_blackhole.test @@ -17,7 +17,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`; --copy_file std_data/parts/t1_blackhole.par $MYSQLD_DATADIR/test/t1.par SHOW TABLES; --replace_result $MYSQLD_DATADIR ./ ---error ER_FAILED_READ_FROM_PAR_FILE +--error ER_NOT_FORM_FILE SHOW CREATE TABLE t1; # The replace is needed for Solaris diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index bf6fb816b5d..dc4ec0407db 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3059,11 +3059,12 @@ err1: @retval true Failure */ -bool ha_partition::setup_engine_array(MEM_ROOT *mem_root) +bool ha_partition::setup_engine_array(MEM_ROOT *mem_root, + handlerton* first_engine) { uint i; uchar *buff; - handlerton **engine_array, *first_engine; + handlerton **engine_array; enum legacy_db_type db_type, first_db_type; DBUG_ASSERT(!m_file); @@ -3073,11 +3074,8 @@ bool ha_partition::setup_engine_array(MEM_ROOT *mem_root) DBUG_RETURN(true); buff= (uchar *) (m_file_buffer + PAR_ENGINES_OFFSET); - first_db_type= (enum legacy_db_type) buff[0]; - first_engine= ha_resolve_by_legacy_type(ha_thd(), first_db_type); - if (!first_engine) - goto err; + first_db_type= (enum legacy_db_type) buff[0]; if (!(m_engine_array= (plugin_ref*) alloc_root(&m_mem_root, m_tot_parts * sizeof(plugin_ref)))) goto err; @@ -3118,6 +3116,74 @@ err: } +handlerton *ha_partition::get_def_part_engine(const char *name) +{ + if (table_share) + { + if (table_share->default_part_plugin) + return plugin_data(table_share->default_part_plugin, handlerton *); + } + else + { + // DROP TABLE, for example + char buff[FN_REFLEN]; + File file; + MY_STAT state; + uchar *frm_image= 0; + handlerton *hton= 0; + bool use_legacy_type= false; + + fn_format(buff, name, "", reg_ext, MY_APPEND_EXT); + + file= mysql_file_open(key_file_frm, buff, O_RDONLY | O_SHARE, MYF(0)); + if (file < 0) + return NULL; + + if (mysql_file_fstat(file, &state, MYF(MY_WME))) + goto err; + if (state.st_size <= 64) + goto err; + if (!(frm_image= (uchar*)my_malloc(state.st_size, MYF(MY_WME)))) + goto err; + if (mysql_file_read(file, frm_image, state.st_size, MYF(MY_NABP))) + goto err; + + if (frm_image[64] != '/') + { + const uchar *e2= frm_image + 64; + const uchar *e2end = e2 + uint2korr(frm_image + 4); + if (e2end > frm_image + state.st_size) + goto err; + while (e2 + 3 < e2end) + { + uchar type= *e2++; + size_t length= extra2_read_len(&e2, e2end); + if (!length) + goto err; + if (type == EXTRA2_DEFAULT_PART_ENGINE) + { + LEX_CSTRING name= { (char*)e2, length }; + plugin_ref plugin= ha_resolve_by_name(ha_thd(), &name, false); + if (plugin) + hton= plugin_data(plugin, handlerton *); + goto err; + } + e2+= length; + } + } + use_legacy_type= true; +err: + my_free(frm_image); + mysql_file_close(file, MYF(0)); + if (!use_legacy_type) + return hton; + } + + return ha_resolve_by_legacy_type(ha_thd(), + (enum legacy_db_type)m_file_buffer[PAR_ENGINES_OFFSET]); +} + + /** Get info about partition engines and their names from the .par file @@ -3145,7 +3211,11 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root, if (read_par_file(name)) DBUG_RETURN(true); - if (!is_clone && setup_engine_array(mem_root)) + handlerton *default_engine= get_def_part_engine(name); + if (!default_engine) + DBUG_RETURN(true); + + if (!is_clone && setup_engine_array(mem_root, default_engine)) DBUG_RETURN(true); DBUG_RETURN(false); diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 48552301f55..36e18d15c0a 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -580,8 +580,9 @@ private: And one method to read it in. */ bool create_handler_file(const char *name); - bool setup_engine_array(MEM_ROOT *mem_root); + bool setup_engine_array(MEM_ROOT *mem_root, handlerton *first_engine); bool read_par_file(const char *name); + handlerton *get_def_part_engine(const char *name); bool get_from_handler_file(const char *name, MEM_ROOT *mem_root, bool is_clone); bool new_handlers_from_part_info(MEM_ROOT *mem_root); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f06ae3d05dc..07adda33ad3 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2802,15 +2802,13 @@ bool quick_rm_table(THD *thd, handlerton *base, const LEX_CSTRING *db, const LEX_CSTRING *table_name, uint flags, const char *table_path) { char path[FN_REFLEN + 1]; + const size_t pathmax = sizeof(path) - 1 - reg_ext_length; int error= 0; DBUG_ENTER("quick_rm_table"); size_t path_length= table_path ? - (strxnmov(path, sizeof(path) - 1, table_path, reg_ext, NullS) - path) : - build_table_filename(path, sizeof(path)-1, db->str, table_name->str, reg_ext, flags); - if (mysql_file_delete(key_file_frm, path, MYF(0))) - error= 1; /* purecov: inspected */ - path[path_length - reg_ext_length]= '\0'; // Remove reg_ext + (strxnmov(path, pathmax, table_path, NullS) - path) : + build_table_filename(path, pathmax, db->str, table_name->str, "", flags); if (flags & NO_HA_TABLE) { handler *file= get_new_handler((TABLE_SHARE*) 0, thd->mem_root, base); @@ -2822,6 +2820,10 @@ bool quick_rm_table(THD *thd, handlerton *base, const LEX_CSTRING *db, if (!(flags & (FRM_ONLY|NO_HA_TABLE))) error|= ha_delete_table(current_thd, base, path, db, table_name, 0); + memcpy(path + path_length, reg_ext, reg_ext_length + 1); + if (mysql_file_delete(key_file_frm, path, MYF(0))) + error= 1; + if (likely(error == 0)) { PSI_CALL_drop_table_share(flags & FN_IS_TMP, db->str, (uint)db->length, diff --git a/sql/table.cc b/sql/table.cc index 9fda107a021..5e30732fc82 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1370,7 +1370,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, if (frm_image[61] && !share->default_part_plugin) { enum legacy_db_type db_type= (enum legacy_db_type) (uint) frm_image[61]; - share->default_part_plugin= ha_lock_engine(NULL, ha_checktype(thd, db_type)); + share->default_part_plugin= ha_lock_engine(NULL, ha_checktype(thd, db_type, 1)); if (!share->default_part_plugin) goto err; } diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc index e957488e3db..26036fba7e0 100644 --- a/sql/temporary_tables.cc +++ b/sql/temporary_tables.cc @@ -698,19 +698,20 @@ bool THD::rm_temporary_table(handlerton *base, const char *path) char frm_path[FN_REFLEN + 1]; strxnmov(frm_path, sizeof(frm_path) - 1, path, reg_ext, NullS); - if (mysql_file_delete(key_file_frm, frm_path, MYF(0))) - { - error= true; - } - file= get_new_handler((TABLE_SHARE*) 0, current_thd->mem_root, base); + + file= get_new_handler((TABLE_SHARE*) 0, mem_root, base); if (file && file->ha_delete_table(path)) { error= true; sql_print_warning("Could not remove temporary table: '%s', error: %d", path, my_errno); } - delete file; + + if (mysql_file_delete(key_file_frm, frm_path, MYF(0))) + { + error= true; + } DBUG_RETURN(error); } diff --git a/sql/unireg.h b/sql/unireg.h index e9c62334e86..03d63d0fd06 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -188,6 +188,21 @@ enum extra2_field_flags { VERS_OPTIMIZED_UPDATE= 1 << INVISIBLE_MAX_BITS }; +static inline size_t extra2_read_len(const uchar **extra2, const uchar *end) +{ + size_t length= *(*extra2)++; + if (length) + return length; + + if ((*extra2) + 2 >= end) + return 0; + length= uint2korr(*extra2); + (*extra2)+= 2; + if (length < 256 || *extra2 + length > end) + return 0; + return length; +} + int rea_create_table(THD *thd, LEX_CUSTRING *frm, const char *path, const char *db, const char *table_name, HA_CREATE_INFO *create_info, handler *file, From 03c3dc63655aabcfc309208188e44c200f680404 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 12 Mar 2022 15:38:44 +0400 Subject: [PATCH 05/30] MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT Problem: Parse-time conversion from binary to tricky character sets like utf32 produced ill-formed strings. So, later a chash happened in debug builds, or a wrong SHOW CREATE TABLE was returned in release builds. Fix: 1. Backporting a few methods from 10.3: - THD::check_string_for_wellformedness() - THD::convert_string() overloads - THD::make_text_string_connection() 2. Adding a new method THD::reinterpret_string_from_binary(), which makes sure to either returns a well-formed string (optionally prepending with zero bytes), or returns an error. --- mysql-test/r/ctype_utf32.result | 23 ++++++++++ mysql-test/r/ctype_utf32_uca.result | 15 +++++++ mysql-test/t/ctype_utf32.test | 19 ++++++++ mysql-test/t/ctype_utf32_uca.test | 13 ++++++ sql/sql_class.cc | 69 ++++++++++++++++++++++++++++- sql/sql_class.h | 63 +++++++++++++++++++++++++- sql/sql_yacc.yy | 10 +---- 7 files changed, 202 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 584ca12f8c3..143fff9e419 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -2890,5 +2890,28 @@ HEX(c1) 0000006100000063 DROP TABLE t1; # +# MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT +# +CREATE TABLE t1 (a CHAR(1)); +SET COLLATION_CONNECTION=utf32_general_ci, CHARACTER_SET_CLIENT=binary; +ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32; +ERROR HY000: Column 'a' has duplicated value 'a' in ENUM +ALTER TABLE t1 CHANGE a a ENUM('aaa') CHARACTER SET utf32; +ERROR HY000: Invalid utf32 character string: '\x00aaa' +ALTER TABLE t1 CHANGE a a ENUM('aa') CHARACTER SET utf32; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('慡') CHARACTER SET utf32 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('a','b') CHARACTER SET utf32 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET NAMES utf8; +# # End of 10.2 tests # diff --git a/mysql-test/r/ctype_utf32_uca.result b/mysql-test/r/ctype_utf32_uca.result index 46ca6e7baee..2f6e44dc402 100644 --- a/mysql-test/r/ctype_utf32_uca.result +++ b/mysql-test/r/ctype_utf32_uca.result @@ -7941,5 +7941,20 @@ EXECUTE s; DEALLOCATE PREPARE s; SET NAMES utf8; # +# MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT +# +CREATE TABLE t1 (a CHAR(1)); +SET COLLATION_CONNECTION=utf32_myanmar_ci, CHARACTER_SET_CLIENT=binary; +ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32; +ERROR HY000: Column 'a' has duplicated value 'a' in ENUM +ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('a','b') CHARACTER SET utf32 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET NAMES utf8; +# # End of 10.2 tests # diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test index 891fd14d15f..46ff333b5f7 100644 --- a/mysql-test/t/ctype_utf32.test +++ b/mysql-test/t/ctype_utf32.test @@ -1048,6 +1048,25 @@ INSERT INTO t1 (c1) VALUES (1),(2),(3); SELECT HEX(c1) FROM t1 ORDER BY c1; DROP TABLE t1; + +--echo # +--echo # MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT +--echo # + +CREATE TABLE t1 (a CHAR(1)); +SET COLLATION_CONNECTION=utf32_general_ci, CHARACTER_SET_CLIENT=binary; +--error ER_DUPLICATED_VALUE_IN_TYPE +ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32; +--error ER_INVALID_CHARACTER_STRING +ALTER TABLE t1 CHANGE a a ENUM('aaa') CHARACTER SET utf32; +ALTER TABLE t1 CHANGE a a ENUM('aa') CHARACTER SET utf32; +SHOW CREATE TABLE t1; +ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET NAMES utf8; + + --echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/t/ctype_utf32_uca.test b/mysql-test/t/ctype_utf32_uca.test index 2969480b0ef..9073d8c57f5 100644 --- a/mysql-test/t/ctype_utf32_uca.test +++ b/mysql-test/t/ctype_utf32_uca.test @@ -290,6 +290,19 @@ EXECUTE s; DEALLOCATE PREPARE s; SET NAMES utf8; +--echo # +--echo # MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT +--echo # + +CREATE TABLE t1 (a CHAR(1)); +SET COLLATION_CONNECTION=utf32_myanmar_ci, CHARACTER_SET_CLIENT=binary; +--error ER_DUPLICATED_VALUE_IN_TYPE +ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32; +ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET NAMES utf8; + --echo # --echo # End of 10.2 tests diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 479578679f1..4edf573e596 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2148,7 +2148,7 @@ void THD::cleanup_after_query() */ bool THD::convert_string(LEX_STRING *to, CHARSET_INFO *to_cs, - const char *from, uint from_length, + const char *from, size_t from_length, CHARSET_INFO *from_cs) { DBUG_ENTER("THD::convert_string"); @@ -2170,6 +2170,58 @@ bool THD::convert_string(LEX_STRING *to, CHARSET_INFO *to_cs, } +/* + Reinterpret a binary string to a character string + + @param[OUT] to The result will be written here, + either the original string as is, + or a newly alloced fixed string with + some zero bytes prepended. + @param cs The destination character set + @param str The binary string + @param length The length of the binary string + + @return false on success + @return true on error +*/ + +bool THD::reinterpret_string_from_binary(LEX_CSTRING *to, CHARSET_INFO *cs, + const char *str, size_t length) +{ + /* + When reinterpreting from binary to tricky character sets like + UCS2, UTF16, UTF32, we may need to prepend some zero bytes. + This is possible in scenarios like this: + SET COLLATION_CONNECTION=utf32_general_ci, CHARACTER_SET_CLIENT=binary; + This code is similar to String::copy_aligned(). + */ + size_t incomplete= length % cs->mbminlen; // Bytes in an incomplete character + if (incomplete) + { + size_t zeros= cs->mbminlen - incomplete; + size_t aligned_length= zeros + length; + char *dst= (char*) alloc(aligned_length + 1); + if (!dst) + { + to->str= NULL; // Safety + to->length= 0; + return true; + } + bzero(dst, zeros); + memcpy(dst + zeros, str, length); + dst[aligned_length]= '\0'; + to->str= dst; + to->length= aligned_length; + } + else + { + to->str= str; + to->length= length; + } + return check_string_for_wellformedness(to->str, to->length, cs); +} + + /* Convert a string between two character sets. dstcs and srccs cannot be &my_charset_bin. @@ -2274,6 +2326,21 @@ bool THD::convert_string(String *s, CHARSET_INFO *from_cs, CHARSET_INFO *to_cs) } +bool THD::check_string_for_wellformedness(const char *str, + size_t length, + CHARSET_INFO *cs) const +{ + size_t wlen= Well_formed_prefix(cs, str, length).length(); + if (wlen < length) + { + ErrConvString err(str, length, &my_charset_bin); + my_error(ER_INVALID_CHARACTER_STRING, MYF(0), cs->csname, err.ptr()); + return true; + } + return false; +} + + /* Update some cache variables when character set changes */ diff --git a/sql/sql_class.h b/sql/sql_class.h index 3f0fba8fc10..a748def9b56 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3503,8 +3503,31 @@ public: return true; // EOM } bool convert_string(LEX_STRING *to, CHARSET_INFO *to_cs, - const char *from, uint from_length, + const char *from, size_t from_length, CHARSET_INFO *from_cs); + bool reinterpret_string_from_binary(LEX_CSTRING *to, CHARSET_INFO *to_cs, + const char *from, size_t from_length); + bool convert_string(LEX_CSTRING *to, CHARSET_INFO *to_cs, + const char *from, size_t from_length, + CHARSET_INFO *from_cs) + { + LEX_STRING tmp; + bool rc= convert_string(&tmp, to_cs, from, from_length, from_cs); + to->str= tmp.str; + to->length= tmp.length; + return rc; + } + bool convert_string(LEX_CSTRING *to, CHARSET_INFO *tocs, + const LEX_CSTRING *from, CHARSET_INFO *fromcs, + bool simple_copy_is_possible) + { + if (!simple_copy_is_possible) + return unlikely(convert_string(to, tocs, from->str, from->length, fromcs)); + if (fromcs == &my_charset_bin) + return reinterpret_string_from_binary(to, tocs, from->str, from->length); + *to= *from; + return false; + } /* Convert a strings between character sets. Uses my_convert_fix(), which uses an mb_wc .. mc_mb loop internally. @@ -3540,6 +3563,44 @@ public: bool convert_string(String *s, CHARSET_INFO *from_cs, CHARSET_INFO *to_cs); + /* + Check if the string is wellformed, raise an error if not wellformed. + @param str - The string to check. + @param length - the string length. + */ + bool check_string_for_wellformedness(const char *str, + size_t length, + CHARSET_INFO *cs) const; + + bool make_text_string_connection(LEX_CSTRING *to, + const LEX_CSTRING *from) + { + return convert_string(to, variables.collation_connection, + from, charset(), charset_is_collation_connection); + } +#if MYSQL_VERSION_ID < 100300 + /* + A wrapper method for 10.2. It fixes the problem + that various fields in bison %union use LEX_STRING. + In 10.3 those fields are fixed to use LEX_CSTRING. + Please remove this wrapper when mering to 10.3. + */ + bool make_text_string_connection(LEX_STRING *to, + const LEX_STRING *from) + { + LEX_CSTRING cto; + LEX_CSTRING cfrom; + bool rc; + cfrom.str= from->str; + cfrom.length= from->length; + rc= make_text_string_connection(&cto, &cfrom); + to->str= (char*) cto.str; + to->length= cto.length; + return rc; + } +#else +#error Remove the above wrapper +#endif void add_changed_table(TABLE *table); void add_changed_table(const char *key, long key_length); CHANGED_TABLE_LIST * changed_table_dup(const char *key, long key_length); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6f3274aced5..34f37efafdb 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -14571,14 +14571,8 @@ TEXT_STRING_sys: TEXT_STRING_literal: TEXT_STRING { - if (thd->charset_is_collation_connection) - $$= $1; - else - { - if (thd->convert_string(&$$, thd->variables.collation_connection, - $1.str, $1.length, thd->charset())) - MYSQL_YYABORT; - } + if (thd->make_text_string_connection(&$$, &$1)) + MYSQL_YYABORT; } ; From 99837c61a6efd27a270c45bd055fac110d1a6947 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 23 Feb 2022 10:10:01 +1100 Subject: [PATCH 06/30] MDEV-23915 ER_KILL_DENIED_ERROR not passed a thread id The 10.5 test error main.grant_kill showed up a incorrect thread id on a big endian architecture. The cause of this is the sql_kill_user function assumed the error was ER_OUT_OF_RESOURCES, when the the actual error was ER_KILL_DENIED_ERROR. ER_KILL_DENIED_ERROR as an error message requires a thread id to be passed as unsigned long, however a user/host was passed. ER_OUT_OF_RESOURCES doesn't even take a user/host, despite the optimistic comment. We remove this being passed as an argument to the function so that when MDEV-21978 is implemented one less compiler format warning is generated (which would have caught this error sooner). Thanks Otto for reporting and Marko for analysis. --- .../suite/galera/r/galera_kill_applier.result | 4 ++++ .../suite/galera/t/galera_kill_applier.test | 6 ++++-- sql/sql_parse.cc | 18 ++++++++++-------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_kill_applier.result b/mysql-test/suite/galera/r/galera_kill_applier.result index 075cbe6f702..0b1a0c12d0d 100644 --- a/mysql-test/suite/galera/r/galera_kill_applier.result +++ b/mysql-test/suite/galera/r/galera_kill_applier.result @@ -1,8 +1,12 @@ connection node_2; SET GLOBAL wsrep_slave_threads=2; +KILL ID; Got one of the listed errors +KILL QUERY ID; Got one of the listed errors +KILL ID; Got one of the listed errors +KILL QUERY ID; Got one of the listed errors SET GLOBAL wsrep_slave_threads=1; connection node_1; diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test index 4136bac5dc6..c9ff795bab6 100644 --- a/mysql-test/suite/galera/t/galera_kill_applier.test +++ b/mysql-test/suite/galera/t/galera_kill_applier.test @@ -15,21 +15,23 @@ SET GLOBAL wsrep_slave_threads=2; --let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle' LIMIT 1` ---disable_query_log +--replace_result $applier_thread ID --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR --eval KILL $applier_thread +--replace_result $applier_thread ID --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR --eval KILL QUERY $applier_thread --let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1` +--replace_result $aborter_thread ID --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR --eval KILL $aborter_thread +--replace_result $aborter_thread ID --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR --eval KILL QUERY $aborter_thread ---enable_query_log SET GLOBAL wsrep_slave_threads=1; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 67e2fcd6764..a9d928f2c2a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -9117,15 +9117,17 @@ void sql_kill_user(THD *thd, LEX_USER *user, killed_state state) WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) } #endif /* WITH_WSREP */ - if (!(error= kill_threads_for_user(thd, user, state, &rows))) - my_ok(thd, rows); - else + switch (error= kill_threads_for_user(thd, user, state, &rows)) { - /* - This is probably ER_OUT_OF_RESOURCES, but in the future we may - want to write the name of the user we tried to kill - */ - my_error(error, MYF(0), user->host.str, user->user.str); + case 0: + my_ok(thd, rows); + break; + case ER_KILL_DENIED_ERROR: + my_error(error, MYF(0), (unsigned long) thd->thread_id); + break; + case ER_OUT_OF_RESOURCES: + default: + my_error(error, MYF(0)); } #ifdef WITH_WSREP return; From 57dbe8785d14a4b9e5b9dc17625cd00f615e136d Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 15 Mar 2022 13:30:46 +1100 Subject: [PATCH 07/30] MDEV-23915 ER_KILL_DENIED_ERROR not passed a thread id (part 2) Per Marko's comment in JIRA, sql_kill is passing the thread id as long long. We change the format of the error messages to match, and cast the thread id to long long in sql_kill_user. --- sql/share/errmsg-utf8.txt | 48 +++++++++++++++++++-------------------- sql/sql_parse.cc | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 2d4e0562d8f..814716b0a97 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -2231,30 +2231,30 @@ ER_NO_SUCH_THREAD swe "Finns ingen tråd med id %lu" ukr "Невідомий ідентифікатор гілки: %lu" ER_KILL_DENIED_ERROR - cze "Nejste vlastníkem threadu %lu" - dan "Du er ikke ejer af tråden %lu" - nla "U bent geen bezitter van thread %lu" - eng "You are not owner of thread %lu" - est "Ei ole lõime %lu omanik" - fre "Vous n'êtes pas propriétaire de la tâche no: %lu" - ger "Sie sind nicht Eigentümer von Thread %lu" - greek "Δεν είσθε owner του thread %lu" - hindi "आप थ्रेड %lu के OWNER नहीं हैं" - hun "A %lu thread-nek mas a tulajdonosa" - ita "Utente non proprietario del thread %lu" - jpn "スレッド %lu のオーナーではありません。" - kor "쓰레드(Thread) %lu의 소유자가 아닙니다." - nor "Du er ikke eier av tråden %lu" - norwegian-ny "Du er ikkje eigar av tråd %lu" - pol "Nie jeste? wła?cicielem w?tku %lu" - por "Você não é proprietário da 'thread' %lu" - rum "Nu sinteti proprietarul threadului %lu" - rus "Вы не являетесь владельцем потока %lu" - serbian "Vi niste vlasnik thread-a %lu" - slo "Nie ste vlastníkom vlákna %lu" - spa "Tu no eres el propietario del thread%lu" - swe "Du är inte ägare till tråd %lu" - ukr "Ви не володар гілки %lu" + cze "Nejste vlastníkem threadu %lld" + dan "Du er ikke ejer af tråden %lld" + nla "U bent geen bezitter van thread %lld" + eng "You are not owner of thread %lld" + est "Ei ole lõime %lld omanik" + fre "Vous n'êtes pas propriétaire de la tâche no: %lld" + ger "Sie sind nicht Eigentümer von Thread %lld" + greek "Δεν είσθε owner του thread %lld" + hindi "आप थ्रेड %lld के OWNER नहीं हैं" + hun "A %lld thread-nek mas a tulajdonosa" + ita "Utente non proprietario del thread %lld" + jpn "スレッド %lld のオーナーではありません。" + kor "쓰레드(Thread) %lld의 소유자가 아닙니다." + nor "Du er ikke eier av tråden %lld" + norwegian-ny "Du er ikkje eigar av tråd %lld" + pol "Nie jeste? wła?cicielem w?tku %lld" + por "Você não é proprietário da 'thread' %lld" + rum "Nu sinteti proprietarul threadului %lld" + rus "Вы не являетесь владельцем потока %lld" + serbian "Vi niste vlasnik thread-a %lld" + slo "Nie ste vlastníkom vlákna %lld" + spa "Tu no eres el propietario del thread%lld" + swe "Du är inte ägare till tråd %lld" + ukr "Ви не володар гілки %lld" ER_NO_TABLES_USED cze "Nejsou použity žádné tabulky" dan "Ingen tabeller i brug" diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a9d928f2c2a..989ca0c8803 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -9123,7 +9123,7 @@ void sql_kill_user(THD *thd, LEX_USER *user, killed_state state) my_ok(thd, rows); break; case ER_KILL_DENIED_ERROR: - my_error(error, MYF(0), (unsigned long) thd->thread_id); + my_error(error, MYF(0), (long long) thd->thread_id); break; case ER_OUT_OF_RESOURCES: default: From b2c81e06b042025663ea01fa98dac0ff536c7706 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Mon, 28 Feb 2022 10:16:26 +1100 Subject: [PATCH 08/30] MDEV-27955 main.func_json_notembedded test fails on out-of-memory Uses 500M+ of memory by repeating an 8 byte sequence 62.5M times. Reduce the number of repeats on string reduced by 100 times. Tested by applying against the reverted MDEV-24909 code. 1000 times reduction was too much, but 100 still managed to trigger the bug. --- mysql-test/main/func_json_notembedded.result | 6 +++--- mysql-test/main/func_json_notembedded.test | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/main/func_json_notembedded.result b/mysql-test/main/func_json_notembedded.result index be879dfc9d6..756d2e85f7c 100644 --- a/mysql-test/main/func_json_notembedded.result +++ b/mysql-test/main/func_json_notembedded.result @@ -4,11 +4,11 @@ connect u,localhost,root; # MDEV-24909 JSON functions don't respect KILL QUERY / max_statement_time limit # set group_concat_max_len= 4294967295; -set @obj=concat_ws('','{', repeat('"a":"b",', 125000000/2), '"c":"d"}'); -set @arr=concat_ws('','[', repeat('1234567,', 125000000/2), '2345678]'); +set @obj=concat_ws('','{', repeat('"a":"b",', 1250000/2), '"c":"d"}'); +set @arr=concat_ws('','[', repeat('1234567,', 1250000/2), '2345678]'); select length(@obj), length(@arr); length(@obj) length(@arr) -500000009 500000009 +5000009 5000009 set max_statement_time=0.0001; select json_array_append(@arr, '$[0]', 1); ERROR 70100: Query execution was interrupted (max_statement_time exceeded) diff --git a/mysql-test/main/func_json_notembedded.test b/mysql-test/main/func_json_notembedded.test index 328d9974c77..b33615060b4 100644 --- a/mysql-test/main/func_json_notembedded.test +++ b/mysql-test/main/func_json_notembedded.test @@ -9,8 +9,8 @@ connect u,localhost,root; --echo # set group_concat_max_len= 4294967295; -set @obj=concat_ws('','{', repeat('"a":"b",', 125000000/2), '"c":"d"}'); -set @arr=concat_ws('','[', repeat('1234567,', 125000000/2), '2345678]'); +set @obj=concat_ws('','{', repeat('"a":"b",', 1250000/2), '"c":"d"}'); +set @arr=concat_ws('','[', repeat('1234567,', 1250000/2), '2345678]'); select length(@obj), length(@arr); set max_statement_time=0.0001; From 31ad9277fea8b8a9414f9495eeae7e0424275cd6 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 16 Mar 2022 14:30:36 +0530 Subject: [PATCH 09/30] MDEV-28079 Shutdown hangs after altering innodb partition fts table - InnoDB purge waits at resume_FTS() while shutting down. This happens after altering the FTS innodb partition table. stop_FTS() has been called for each partition, but it calls resume_FTS() only once and it leads to hang during shutdown. This issue was introduced by commit 1bd681c8b3c5213ce1f7976940a7dc38b48a0d39(MDEV-25506). --- mysql-test/suite/parts/r/partition_alter_innodb.result | 8 ++++++++ mysql-test/suite/parts/t/partition_alter_innodb.test | 8 ++++++++ storage/innobase/fts/fts0fts.cc | 9 ++++++--- storage/innobase/handler/handler0alter.cc | 4 +++- storage/innobase/include/trx0purge.h | 6 ++++-- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/mysql-test/suite/parts/r/partition_alter_innodb.result b/mysql-test/suite/parts/r/partition_alter_innodb.result index f3921a1db26..fad8434989f 100644 --- a/mysql-test/suite/parts/r/partition_alter_innodb.result +++ b/mysql-test/suite/parts/r/partition_alter_innodb.result @@ -48,3 +48,11 @@ alter table t1 add partition (partition p0 values less than (20)); ERROR HY000: Duplicate partition name p0 alter table t1 add partition (partition p1 values less than (20)) /* comment */; drop table t1; +# +# MDEV-28079 Shutdown hangs after altering innodb partition fts table +# +CREATE TABLE t1(f1 INT, f2 CHAR(100))ENGINE=InnoDB PARTITION BY HASH(f1) PARTITIONS 2; +ALTER TABLE t1 ADD FULLTEXT(f2); +InnoDB 0 transactions not purged +DROP TABLE t1; +# End of 10.6 tests diff --git a/mysql-test/suite/parts/t/partition_alter_innodb.test b/mysql-test/suite/parts/t/partition_alter_innodb.test index 4ea3a0da88c..844b2084531 100644 --- a/mysql-test/suite/parts/t/partition_alter_innodb.test +++ b/mysql-test/suite/parts/t/partition_alter_innodb.test @@ -9,3 +9,11 @@ SET GLOBAL innodb_read_only_compressed=OFF; --disable_query_log SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed; --enable_query_log +--echo # +--echo # MDEV-28079 Shutdown hangs after altering innodb partition fts table +--echo # +CREATE TABLE t1(f1 INT, f2 CHAR(100))ENGINE=InnoDB PARTITION BY HASH(f1) PARTITIONS 2; +ALTER TABLE t1 ADD FULLTEXT(f2); +--source ../innodb/include/wait_all_purged.inc +DROP TABLE t1; +--echo # End of 10.6 tests diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 7302f436918..c8aa6aab35a 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1567,10 +1567,13 @@ static void fts_table_no_ref_count(const char *table_name) /** Stop the purge thread and check n_ref_count of all auxiliary and common table associated with the fts table. -@param table parent FTS table */ -void purge_sys_t::stop_FTS(const dict_table_t &table) +@param table parent FTS table +@param already_stopped True indicates purge threads were + already stopped*/ +void purge_sys_t::stop_FTS(const dict_table_t &table, bool already_stopped) { - purge_sys.stop_FTS(); + if (!already_stopped) + purge_sys.stop_FTS(); fts_table_t fts_table; char table_name[MAX_FULL_NAME_LEN]; diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 5a13240249c..ff069777ec4 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -10903,12 +10903,14 @@ ha_innobase::commit_inplace_alter_table( } } + bool already_stopped= false; for (inplace_alter_handler_ctx** pctx = ctx_array; *pctx; pctx++) { auto ctx = static_cast(*pctx); dberr_t error = DB_SUCCESS; if (fts_exist) { - purge_sys.stop_FTS(*ctx->old_table); + purge_sys.stop_FTS(*ctx->old_table, already_stopped); + already_stopped = true; } if (new_clustered && ctx->old_table->fts) { diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index dc032cdf73a..b3f2fbeedf3 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -286,8 +286,10 @@ public: /** Stop the purge thread and check n_ref_count of all auxiliary and common table associated with the fts table. - @param table parent FTS table */ - void stop_FTS(const dict_table_t &table); + @param table parent FTS table + @param already_stopped True indicates purge threads were + already stopped */ + void stop_FTS(const dict_table_t &table, bool already_stopped=false); }; /** The global data structure coordinating a purge */ From ee80c19633dd5d4e781b3e675d2ece52a5b0f9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 16 Mar 2022 17:19:13 +0200 Subject: [PATCH 10/30] MDEV-26551 InnoDB crash on multiple concurrent SHOW TABLE STATUS dict_get_and_save_data_dir_path(): Protect the operation with dict_table_t::lock_mutex and avoid unnecessary memory allocation. --- storage/innobase/dict/dict0load.cc | 84 ++++++--------------------- storage/innobase/handler/ha_innodb.cc | 4 +- storage/innobase/include/dict0load.h | 7 +-- storage/innobase/row/row0import.cc | 6 +- storage/innobase/srv/srv0start.cc | 2 +- 5 files changed, 27 insertions(+), 76 deletions(-) diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index 71dedd48c29..155f2e55057 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -2078,74 +2078,26 @@ const char *dict_load_table_low(const span &name, return(NULL); } -/********************************************************************//** -Using the table->heap, copy the null-terminated filepath into -table->data_dir_path and replace the 'databasename/tablename.ibd' -portion with 'tablename'. -This allows SHOW CREATE TABLE to return the correct DATA DIRECTORY path. -Make this data directory path only if it has not yet been saved. */ -static -void -dict_save_data_dir_path( -/*====================*/ - dict_table_t* table, /*!< in/out: table */ - const char* filepath) /*!< in: filepath of tablespace */ -{ - ut_ad(dict_sys.frozen()); - ut_a(DICT_TF_HAS_DATA_DIR(table->flags)); - - ut_a(!table->data_dir_path); - ut_a(filepath); - - /* Be sure this filepath is not the default filepath. */ - if (char* default_filepath = fil_make_filepath(nullptr, table->name, - IBD, false)) { - if (0 != strcmp(filepath, default_filepath)) { - ulint pathlen = strlen(filepath); - ut_a(pathlen < OS_FILE_MAX_PATH); - ut_a(0 == strcmp(filepath + pathlen - 4, DOT_IBD)); - - table->data_dir_path = mem_heap_strdup( - table->heap, filepath); - os_file_make_data_dir_path(table->data_dir_path); - } - - ut_free(default_filepath); - } -} - /** Make sure the data_file_name is saved in dict_table_t if needed. -@param[in,out] table Table object -@param[in] dict_locked dict_sys.frozen() */ -void dict_get_and_save_data_dir_path(dict_table_t* table, bool dict_locked) +@param[in,out] table Table object */ +void dict_get_and_save_data_dir_path(dict_table_t *table) { - ut_ad(!table->is_temporary()); - ut_ad(!table->space || table->space->id == table->space_id); + ut_ad(!table->is_temporary()); + ut_ad(!table->space || table->space->id == table->space_id); - if (!table->data_dir_path && table->space_id && table->space) { - if (!dict_locked) { - dict_sys.freeze(SRW_LOCK_CALL); - } - - table->flags |= 1 << DICT_TF_POS_DATA_DIR - & ((1U << DICT_TF_BITS) - 1); - dict_save_data_dir_path(table, - table->space->chain.start->name); - - if (table->data_dir_path == NULL) { - /* Since we did not set the table data_dir_path, - unset the flag. This does not change - SYS_TABLES or FSP_SPACE_FLAGS on the header page - of the tablespace, but it makes dict_table_t - consistent. */ - table->flags &= ~DICT_TF_MASK_DATA_DIR - & ((1U << DICT_TF_BITS) - 1); - } - - if (!dict_locked) { - dict_sys.unfreeze(); - } - } + if (!table->data_dir_path && table->space_id && table->space) + { + const char *filepath= table->space->chain.start->name; + if (strncmp(fil_path_to_mysql_datadir, filepath, + strlen(fil_path_to_mysql_datadir))) + { + table->lock_mutex_lock(); + table->flags|= 1 << DICT_TF_POS_DATA_DIR & ((1U << DICT_TF_BITS) - 1); + table->data_dir_path= mem_heap_strdup(table->heap, filepath); + os_file_make_data_dir_path(table->data_dir_path); + table->lock_mutex_unlock(); + } + } } /** Opens a tablespace for dict_load_table_one() @@ -2199,7 +2151,7 @@ dict_load_tablespace( char* filepath = NULL; if (DICT_TF_HAS_DATA_DIR(table->flags)) { /* This will set table->data_dir_path from fil_system */ - dict_get_and_save_data_dir_path(table, true); + dict_get_and_save_data_dir_path(table); if (table->data_dir_path) { filepath = fil_make_filepath( diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 7b51c97b753..ba48cc4a92e 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -11427,7 +11427,7 @@ ha_innobase::update_create_info( return; } - dict_get_and_save_data_dir_path(m_prebuilt->table, false); + dict_get_and_save_data_dir_path(m_prebuilt->table); if (m_prebuilt->table->data_dir_path) { create_info->data_file_name = m_prebuilt->table->data_dir_path; @@ -13842,7 +13842,7 @@ int ha_innobase::truncate() mem_heap_t* heap = mem_heap_create(1000); - dict_get_and_save_data_dir_path(ib_table, false); + dict_get_and_save_data_dir_path(ib_table); info.data_file_name = ib_table->data_dir_path; const char* temp_name = dict_mem_create_temporary_tablename( heap, ib_table->name.m_name, ib_table->id); diff --git a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict0load.h index 072773694a9..43e732263fd 100644 --- a/storage/innobase/include/dict0load.h +++ b/storage/innobase/include/dict0load.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2021, MariaDB Corporation. +Copyright (c) 2017, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -53,9 +53,8 @@ We also scan the biggest space id, and store it to fil_system. */ void dict_check_tablespaces_and_store_max_id(); /** Make sure the data_file_name is saved in dict_table_t if needed. -@param[in,out] table Table object -@param[in] dict_locked dict_sys.frozen() */ -void dict_get_and_save_data_dir_path(dict_table_t* table, bool dict_locked); +@param[in,out] table Table object */ +void dict_get_and_save_data_dir_path(dict_table_t* table); /***********************************************************************//** Loads a table object based on the table id. diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index aa5bfb099b4..e9034c05b89 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -3128,7 +3128,7 @@ and apply it to dict_table_t static dberr_t handle_instant_metadata(dict_table_t *table, const row_import &cfg) { - dict_get_and_save_data_dir_path(table, false); + dict_get_and_save_data_dir_path(table); char *filepath; if (DICT_TF_HAS_DATA_DIR(table->flags)) @@ -4167,7 +4167,7 @@ fil_tablespace_iterate( return(DB_CORRUPTION);); /* Make sure the data_dir_path is set. */ - dict_get_and_save_data_dir_path(table, false); + dict_get_and_save_data_dir_path(table); ut_ad(!DICT_TF_HAS_DATA_DIR(table->flags) || table->data_dir_path); @@ -4488,7 +4488,7 @@ row_import_for_mysql( /* If the table is stored in a remote tablespace, we need to determine that filepath from the link file and system tables. Find the space ID in SYS_TABLES since this is an ALTER TABLE. */ - dict_get_and_save_data_dir_path(table, true); + dict_get_and_save_data_dir_path(table); ut_ad(!DICT_TF_HAS_DATA_DIR(table->flags) || table->data_dir_path); const char *data_dir_path = DICT_TF_HAS_DATA_DIR(table->flags) diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 830ccbcaa56..b6341bc8aea 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -2072,7 +2072,7 @@ srv_get_meta_data_filename( char* path; /* Make sure the data_dir_path is set. */ - dict_get_and_save_data_dir_path(table, false); + dict_get_and_save_data_dir_path(table); const char* data_dir_path = DICT_TF_HAS_DATA_DIR(table->flags) ? table->data_dir_path : nullptr; From 06e3bc4390ee286fd20b34526510768f1b32ed7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 17 Mar 2022 10:33:06 +0200 Subject: [PATCH 11/30] MDEV-17841 fixup: GCC -Wmaybe-uninitialized In commit ab38b7511bad8cc03a67f0d43e7169e6dfcac9fa an added "goto err" would seemingly cause a read of an uninitialized variable old_info if errpos>=5. However, because we would have errpos=0 at that point, there was no real error. --- storage/maria/ma_open.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c index db15778bc23..cf5bf2a5fea 100644 --- a/storage/maria/ma_open.c +++ b/storage/maria/ma_open.c @@ -1,5 +1,5 @@ /* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - Copyright (c) 2009, 2021, MariaDB Corporation Ab + Copyright (c) 2009, 2022, MariaDB Corporation Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -276,7 +276,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags, char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN], data_name[FN_REFLEN]; uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; - MARIA_HA info, *UNINIT_VAR(m_info), *old_info; + MARIA_HA info, *UNINIT_VAR(m_info), *old_info= NULL; MARIA_SHARE share_buff,*share; double *rec_per_key_part; ulong *nulls_per_key_part; @@ -327,7 +327,6 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags, } #endif /* WITH_S3_STORAGE_ENGINE */ - old_info= 0; if (!internal_table) mysql_mutex_lock(&THR_LOCK_maria); if ((open_flags & HA_OPEN_COPY) || From 9595ea899277e9289f50ca78edc8e83c0718eb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 2 Mar 2022 20:05:50 -0800 Subject: [PATCH 12/30] Deb: Sync Salsa-CI from Debian MariaDB 10.5 repository Since Debian Sid now has MariaDB 10.6, we can't do any upgrade tests in Debian Sid for the 10.5 branch anymore. It would just fail with downgrade errors. Also, since MariaDB 10.5 is no longer in Sid, we can't even test 10.5.x to 10.5.y upgrades in Sid. Instead the 10.5 branch salsa-ci.yml should run all builds and tests based on Debian Bullseye, which has MariaDB 10.5 (only). To achieve this, essentially sync most the the salsa-ci.yml contents from https://salsa.debian.org/mariadb-team/mariadb-10.5/-/tree/bullseye Also add a couple Lintian overrides to make Salsa-CI pass. NOTE TO MERGERS: This commit is intended for the 10.5 branch only, do not merge anything from it on 10.6 or any other branch. --- debian/salsa-ci.yml | 251 +++++++++++--------------------- debian/source/lintian-overrides | 4 +- 2 files changed, 88 insertions(+), 167 deletions(-) diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index 60fdc3d6544..499c0e9e92b 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -7,7 +7,7 @@ include: # Override Salsa-CI with MariaDB specific variations variables: DEB_BUILD_OPTIONS: "nocheck noautodbgsym" - RELEASE: sid + RELEASE: bullseye SALSA_CI_DISABLE_REPROTEST: 1 SALSA_CI_DISABLE_MISSING_BREAKS: 0 SALSA_CI_DISABLE_RC_BUGS: 1 @@ -20,8 +20,8 @@ stages: - provisioning - build - test - - upgrade in Sid - - upgrade from Bullseye/Buster/Stretch + - upgrade in Bullseye + - upgrade from Buster/Stretch - upgrade extras - test extras - publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used @@ -46,10 +46,9 @@ build: - ccache -s # Show ccache stats to validate it worked - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} -build bullseye-backports: - extends: .build-package - variables: - RELEASE: bullseye-backports +# build jobs often needs more than default GitLab timeout (1h) +.build-package: + timeout: 3h build buster-backports: extends: .build-package @@ -103,24 +102,18 @@ blhc: # Prime the apt cache so later apt commands can run apt-get update -# Readline was removed from Debian Sid (and Bullseye) in Feb 2021. To be able to install older -# versions of MariaDB that depend on it, fetch and install it from Buster. -.test-install-readline-in-sid-for-backwards-compat: &test-install-readline-in-sid-for-backwards-compat | - curl -O http://ftp.de.debian.org/debian/pool/main/r/readline5/libreadline5_5.2+dfsg-3+b13_amd64.deb - apt install -y ./libreadline5_5.2+dfsg-3+b13_amd64.deb - .test-verify-initial: &test-verify-initial | dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb' mysql --skip-column-names -e "select @@version, @@version_comment" # Show version - mysql --table -e 'SHOW DATABASES;' # List databases before upgrade + mysql --table -e "SHOW DATABASES;" # List databases before upgrade mysql --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mysql --table -e "SELECT * FROM plugin;" mysql mysql --table -e "SHOW PLUGINS;" mysql -.test-enable-sid-repos: &test-enable-sid-repos | - # Replace any old repos with just Sid - echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list +.test-enable-bullseye-repos: &test-enable-bullseye-repos | + # Replace any old repos with just Bullseye + echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list # Upgrade minimal stack first apt-get update apt-get install -y apt @@ -138,7 +131,7 @@ blhc: cp -ra /etc/mysql debug/etc-mysql cp -ra /var/log/mysql debug/var-log-mysql mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version - mariadb --table -e 'SHOW DATABASES;' # List databases + mariadb --table -e "SHOW DATABASES;" # List databases mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mariadb --table -e "SELECT * FROM plugin;" mysql mariadb --table -e "SHOW PLUGINS;" mysql @@ -178,8 +171,8 @@ fresh install: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb-10.5 Sid upgrade: - stage: upgrade in Sid +mariadb-10.5 Bullseye upgrade: + stage: upgrade in Bullseye needs: - job: build image: debian:${RELEASE} @@ -199,34 +192,8 @@ mariadb-10.5 Sid upgrade: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb-10.5 Bullseye to mariadb-10.5 upgrade: - stage: upgrade from Bullseye/Buster/Stretch - needs: - - job: build - image: debian:bullseye - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - *test-prepare-container - # Install everything MariaDB currently in Debian Bullseye - - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*' - # Verify installation of MariaDB from Bullseye - - *test-verify-initial - - *test-enable-sid-repos - - *test-install - - service mariadb status - - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - mariadb-10.3 Buster to mariadb-10.5 upgrade: - stage: upgrade from Bullseye/Buster/Stretch + stage: upgrade from Buster/Stretch needs: - job: build image: debian:buster @@ -241,7 +208,7 @@ mariadb-10.3 Buster to mariadb-10.5 upgrade: - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*' # Verify installation of MariaDB from Buster - *test-verify-initial - - *test-enable-sid-repos + - *test-enable-bullseye-repos - *test-install - service mysql status - *test-verify-final @@ -252,7 +219,7 @@ mariadb-10.3 Buster to mariadb-10.5 upgrade: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ mariadb-10.1 Stretch to mariadb-10.5 upgrade: - stage: upgrade from Bullseye/Buster/Stretch + stage: upgrade from Buster/Stretch needs: - job: build image: debian:stretch @@ -268,8 +235,7 @@ mariadb-10.1 Stretch to mariadb-10.5 upgrade: - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' # Verify installation of MariaDB from Stretch - *test-verify-initial - - apt-get remove -y manpages # Workaround for Bug#99375 - - *test-enable-sid-repos + - *test-enable-bullseye-repos - *test-install - service mysql status - *test-verify-final @@ -383,41 +349,8 @@ build mariadbclient consumer Python-MySQLdb: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -libmysql* to libmariadb* upgrade: - stage: upgrade in Sid - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - *test-prepare-container - # Install all libmysql* available in Debian unstable - - apt-get install -y pkg-config libmysqlclient-dev - - pkg-config --list-all - - pkg-config --cflags mysqlclient # mysqlclient.pc from original package - - apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb - - pkg-config --list-all - - apt-get install -y ./libmariadb-dev_*.deb - - pkg-config --list-all - - apt-get install -y ./libmariadb-dev-compat_*.deb - - pkg-config --cflags mysqlclient # mysqlclient.pc from compat package - - pkg-config --list-all - - apt-get install -y ./libmariadbd19_*.deb - - pkg-config --list-all - - apt-get install -y ./libmariadbd-dev_*.deb - - pkg-config --list-all - - apt-get install -y default-libmysqlclient-dev default-libmysqld-dev - - *test-verify-libs - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - -default-libmysqlclient-dev Sid upgrade: - stage: upgrade in Sid +default-libmysqlclient-dev Bullseye upgrade: + stage: upgrade in Bullseye needs: - job: build image: debian:${RELEASE} @@ -437,7 +370,7 @@ default-libmysqlclient-dev Sid upgrade: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ default-libmysqlclient-dev Buster upgrade: - stage: upgrade from Bullseye/Buster/Stretch + stage: upgrade from Buster/Stretch needs: - job: build image: debian:buster @@ -450,7 +383,7 @@ default-libmysqlclient-dev Buster upgrade: - *test-prepare-container - apt-get install -y pkg-config default-libmysqlclient-dev - pkg-config --list-all - - *test-enable-sid-repos + - *test-enable-bullseye-repos - *test-install-all-libs - *test-verify-libs except: @@ -458,7 +391,7 @@ default-libmysqlclient-dev Buster upgrade: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ default-libmysqlclient-dev Stretch upgrade: - stage: upgrade from Bullseye/Buster/Stretch + stage: upgrade from Buster/Stretch needs: - job: build image: debian:stretch @@ -471,8 +404,7 @@ default-libmysqlclient-dev Stretch upgrade: - *test-prepare-container - apt-get install -y pkg-config default-libmysqlclient-dev - pkg-config --list-all - - apt-get remove -y manpages # Workaround for Bug#99375 - - *test-enable-sid-repos + - *test-enable-bullseye-repos - *test-install-all-libs - *test-verify-libs except: @@ -480,7 +412,7 @@ default-libmysqlclient-dev Stretch upgrade: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ mariadb-connector-c Stretch upgrade: - stage: upgrade from Bullseye/Buster/Stretch + stage: upgrade from Buster/Stretch needs: - job: build image: debian:stretch @@ -493,42 +425,12 @@ mariadb-connector-c Stretch upgrade: - *test-prepare-container - apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat - pkg-config --list-all - - apt-get remove -y manpages # Workaround for Bug#99375 - - *test-enable-sid-repos + - *test-enable-bullseye-repos - *test-install-all-libs - *test-verify-libs except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - allow_failure: true - # Upgrading libc from Stretch to Bookworm is not possible due to Bug#993755 - -# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump. -# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh. -mysql-8.0 Sid to mariadb-10.5 upgrade: - stage: upgrade in Sid - needs: - - job: build - image: debian:sid - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - *test-prepare-container - # The postinst fails often if 'ps' is missing from system, so install procps - - apt-get install -y procps mysql-server 'libmysqlc*' - - *test-verify-initial - - *test-install - - service mysql status - - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ # Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump. # The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh. @@ -547,14 +449,14 @@ mysql-8.0 Focal to mariadb-10.5 upgrade: # Add Ubuntu Focal archive keys and repository - apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32 - - echo 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted' > /etc/apt/sources.list.d/ubuntu.list + - echo "deb http://archive.ubuntu.com/ubuntu/ focal main restricted" > /etc/apt/sources.list.d/ubuntu.list - apt-get update # First install often fail due to bug in mysql-8.0 - apt-get install -y mysql-server 'libmysqlc*' || true - sleep 10 && apt-get install -f - *test-verify-initial # Enable backports to make galera-4 available - - echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list && apt-get update + - echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list && apt-get update - *test-install - service mysql status - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server @@ -580,14 +482,14 @@ mysql-5.7 Bionic to mariadb-10.5 upgrade: # Add Ubuntu Bionic archive keys and repository - apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32 - - echo 'deb http://archive.ubuntu.com/ubuntu/ bionic main restricted' > /etc/apt/sources.list.d/ubuntu.list + - echo "deb http://archive.ubuntu.com/ubuntu/ bionic main restricted" > /etc/apt/sources.list.d/ubuntu.list - apt-get update - apt-get install -y 'mysql*' 'libmysqlc*' - *test-verify-initial # Enable backports to make libzstd1, rocksdb-tools - - echo 'deb http://deb.debian.org/debian stretch-backports main' >> /etc/apt/sources.list.d/backports.list + - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/backports.list # Enable backports to make galera-4 available - - echo 'deb http://deb.debian.org/debian stretch-backports-sloppy main' >> /etc/apt/sources.list.d/backports.list && apt-get update + - echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list.d/backports.list && apt-get update # Remove plugin that requires libcurl4, not available in Debian Stretch - rm mariadb-plugin-s3*.deb - *test-install @@ -600,11 +502,14 @@ mysql-5.7 Bionic to mariadb-10.5 upgrade: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ +# As Bullseye already has MariaDB 10.5, upstream does not provide any <10.5 +# packages for Bullseye and thus no upgrades on lower versions can be tested +# inside Bullseye mariadb.org-10.5 to mariadb-10.5 upgrade: stage: upgrade extras needs: - job: build - image: debian:sid + image: debian:${RELEASE} artifacts: when: always name: "$CI_BUILD_NAME" @@ -614,14 +519,14 @@ mariadb.org-10.5 to mariadb-10.5 upgrade: - *test-prepare-container - apt install -y curl - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo 'deb http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list + - echo "deb https://deb.mariadb.org/repo/10.5/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - apt-get update # The 10.5.9 release is missing mariadb-plugin-columnstore, define all other packages but it to avoid hitting the error: # The following packages have unmet dependencies: # mariadb-plugin-columnstore : Depends: mariadb-server-10.5 (= 1:10.5.8+maria~sid) but 1:10.5.9+maria~sid is to be installed - apt-get install -y libmariadb3 'libmariadb-*' 'libmariadbd*' 'mariadb-c*' 'mariadb-b*' 'mariadb-s*' 'mariadb-t*' 'mariadb-plugin-con*' 'mariadb-plugin-cr*' 'mariadb-plugin-g*' 'mariadb-plugin-m*' 'mariadb-plugin-o*' 'mariadb-plugin-s*' # Once 10.5.10 is out, revert back to: - # Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Sid, so cannot use wildcard that would include it + # Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Bullseye, so cannot use wildcard that would include it #- apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*' - *test-verify-initial # Install MariaDB built in this commit @@ -634,6 +539,7 @@ mariadb.org-10.5 to mariadb-10.5 upgrade: - *test-verify-final variables: GIT_STRATEGY: none + RELEASE: bullseye # Last Debian release that MariaDB.org publised 10.5 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -641,8 +547,8 @@ mariadb.org-10.5 to mariadb-10.5 upgrade: mariadb.org-10.4 to mariadb-10.5 upgrade: stage: upgrade extras needs: - - job: build - image: debian:sid + - job: build buster-backports + image: debian:${RELEASE} artifacts: when: always name: "$CI_BUILD_NAME" @@ -650,11 +556,10 @@ mariadb.org-10.4 to mariadb-10.5 upgrade: - ${WORKING_DIR}/debug script: - *test-prepare-container - - apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd + - apt install -y curl - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo 'deb http://mirror.one.com/mariadb/repo/10.4/debian sid main' > /etc/apt/sources.list.d/mariadb.list + - echo "deb https://deb.mariadb.org/repo/10.4/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - apt-get update - - *test-install-readline-in-sid-for-backwards-compat - apt-get install -y mariadb-server-10.4 # MariaDB.org version of 10.4 and early 10.5 do not install an init file, so # it must be installed here manually @@ -667,6 +572,7 @@ mariadb.org-10.4 to mariadb-10.5 upgrade: - *test-verify-final variables: GIT_STRATEGY: none + RELEASE: buster # Last Debian release that MariaDB.org publised 10.4 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -674,8 +580,8 @@ mariadb.org-10.4 to mariadb-10.5 upgrade: mariadb.org-10.3 to mariadb-10.5 upgrade: stage: upgrade extras needs: - - job: build - image: debian:sid + - job: build buster-backports + image: debian:${RELEASE} artifacts: when: always name: "$CI_BUILD_NAME" @@ -685,24 +591,21 @@ mariadb.org-10.3 to mariadb-10.5 upgrade: - *test-prepare-container - apt install -y curl - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo 'deb http://mirror.one.com/mariadb/repo/10.3/debian sid main' > /etc/apt/sources.list.d/mariadb.list + - echo "deb https://deb.mariadb.org/repo/10.3/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - apt-get update - - *test-install-readline-in-sid-for-backwards-compat - apt-get install -y mariadb-server-10.3 - # Verify initial state before upgrade - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status - # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3 - - mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - - echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf - - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql - - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql + - *test-verify-initial + # Enable backports to make galera-4 available + - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update - *test-install - service mysql status - - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server + # Give the mariadb-upgrade plenty of time to complete, otherwise next commands + # fail on non-existing mariadb.sys user + - sleep 15 - *test-verify-final variables: GIT_STRATEGY: none + RELEASE: buster # Last Debian release that MariaDB.org publised 10.3 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -710,8 +613,8 @@ mariadb.org-10.3 to mariadb-10.5 upgrade: mariadb.org-10.2 to mariadb-10.5 upgrade: stage: upgrade extras needs: - - job: build - image: debian:sid + - job: build stretch-backports + image: debian:${RELEASE} artifacts: when: always name: "$CI_BUILD_NAME" @@ -719,26 +622,42 @@ mariadb.org-10.2 to mariadb-10.5 upgrade: - ${WORKING_DIR}/debug script: - *test-prepare-container - - apt install -y curl + - apt install -y curl apt-transport-https - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo 'deb http://mirror.one.com/mariadb/repo/10.2/debian sid main' > /etc/apt/sources.list.d/mariadb.list + - echo "deb https://deb.mariadb.org/repo/10.2/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - apt-get update - - *test-install-readline-in-sid-for-backwards-compat - apt-get install -y mariadb-server-10.2 # Verify initial state before upgrade - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - service mysql status # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3 - - mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - - echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf - - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost" - - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.plugin; SHOW PLUGINS" + - | + mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" + mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SHOW DATABASES;" + mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost;" + mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS;" + # Enable backports to make libzstd1, rocksdb-tools + - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/backports.list + # Enable backports to make galera-4 available + - echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list.d/backports.list && apt-get update + # Increase default backports priority policy from '100' to '500' so it can actually be used + - | + cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies + Package: * + Pin: release n=stretch-* + Pin-Priority: 500 + EOF + # Remove plugin that requires libcurl4, not available in Debian Stretch + - rm mariadb-plugin-s3*.deb - *test-install - service mysql status - - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server + # Give the mariadb-upgrade plenty of time to complete, otherwise next commands + # fail on non-existing mariadb.sys user + - sleep 15 - *test-verify-final variables: GIT_STRATEGY: none + RELEASE: stretch # Last Debian release that MariaDB.org publised 10.2 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -757,16 +676,16 @@ mysql.com-5.7 to mariadb-10.5 upgrade: - *test-prepare-container - | apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 8C718D3B5072E1F5 - echo 'deb https://repo.mysql.com/apt/debian/ buster mysql-5.7' > /etc/apt/sources.list.d/mysql.list + apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 467B942D3A79BD29 + echo "deb https://repo.mysql.com/apt/debian/ buster mysql-5.7" > /etc/apt/sources.list.d/mysql.list apt-get update apt-get install -y 'mysql*' 'libmysqlc*' - *test-verify-initial # Enable backports to make galera-4 available - - echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update + - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update - *test-install - service mysql status - - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server + - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server - *test-verify-final variables: GIT_STRATEGY: none @@ -789,16 +708,16 @@ percona-xtradb-5.7 to mariadb-10.5 upgrade (MDEV-22679): - | apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 9334A25F8507EFA5 - echo 'deb https://repo.percona.com/apt/ buster main' > /etc/apt/sources.list.d/mysql.list + echo "deb https://repo.percona.com/apt/ buster main" > /etc/apt/sources.list.d/mysql.list apt-get update apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client - service mysql status - *test-verify-initial # Enable backports to make galera-4 available - - echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update + - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update - *test-install - service mysql status - - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server + - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server - *test-verify-final variables: GIT_STRATEGY: none diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides index 593e88609bf..a9500a44598 100644 --- a/debian/source/lintian-overrides +++ b/debian/source/lintian-overrides @@ -23,8 +23,10 @@ version-substvar-for-external-package libmariadbd-dev -> libmariadbclient-dev # ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124 source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2 # Must be fixed upstream -source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js line 58 is 273 characters long (>256) +source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js * # Intentional control relationships version-substvar-for-external-package Replaces (line 216) ${source:Version} libmariadbd-dev -> libmariadbclient-dev version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqlclient-dev version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqld-dev +# We can't change build dependencies on a stable branch (10.5..10.8) so just override this +missing-build-dependency-for-dh-addon systemd * From 8840583a92243f6ac543689148ca79c85fa0a09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 18 Mar 2022 10:52:08 +0200 Subject: [PATCH 13/30] MDEV-27909 InnoDB: Failing assertion: state == TRX_STATE_NOT_STARTED ... on DDL The fix in commit 6e390a62baa9dfd92d2776d28c97fd9525422295 (MDEV-26772) was a step to the right direction, but implemented incorrectly. When an InnoDB persistent statistics table cannot be locked immediately, we must not let row_mysql_handle_errors() to roll back the transaction. lock_table_for_trx(): Add the parameter no_wait (default false) for an immediate return of DB_LOCK_WAIT in case of a conflict. ha_innobase::delete_table(), ha_innobase::rename_table(): Pass no_wait=true to lock_table_for_trx() when needed, instead of temporarily setting THDVAR(thd, lock_wait_timeout) to 0. --- storage/innobase/handler/ha_innodb.cc | 28 ++++------ storage/innobase/include/lock0lock.h | 18 +++---- storage/innobase/lock/lock0lock.cc | 78 +++++++++++++-------------- 3 files changed, 55 insertions(+), 69 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index ba48cc4a92e..72300f83c9c 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -13547,29 +13547,26 @@ int ha_innobase::delete_table(const char *name) dict_sys.unfreeze(); } - auto &timeout= THDVAR(thd, lock_wait_timeout); - const auto save_timeout= timeout; - if (table->name.is_temporary()) - timeout= 0; + const bool skip_wait{table->name.is_temporary()}; if (table_stats && index_stats && !strcmp(table_stats->name.m_name, TABLE_STATS_NAME) && !strcmp(index_stats->name.m_name, INDEX_STATS_NAME) && - !(err= lock_table_for_trx(table_stats, trx, LOCK_X))) - err= lock_table_for_trx(index_stats, trx, LOCK_X); + !(err= lock_table_for_trx(table_stats, trx, LOCK_X, skip_wait))) + err= lock_table_for_trx(index_stats, trx, LOCK_X, skip_wait); - if (err != DB_SUCCESS && !timeout) + if (err != DB_SUCCESS && skip_wait) { /* We may skip deleting statistics if we cannot lock the tables, when the table carries a temporary name. */ + ut_ad(err == DB_LOCK_WAIT); + ut_ad(trx->error_state == DB_SUCCESS); err= DB_SUCCESS; dict_table_close(table_stats, false, thd, mdl_table); dict_table_close(index_stats, false, thd, mdl_index); table_stats= nullptr; index_stats= nullptr; } - - timeout= save_timeout; } if (err == DB_SUCCESS) @@ -14075,17 +14072,15 @@ ha_innobase::rename_table( if (error == DB_SUCCESS && table_stats && index_stats && !strcmp(table_stats->name.m_name, TABLE_STATS_NAME) && !strcmp(index_stats->name.m_name, INDEX_STATS_NAME)) { - auto &timeout = THDVAR(thd, lock_wait_timeout); - const auto save_timeout = timeout; - if (from_temp) { - timeout = 0; - } - error = lock_table_for_trx(table_stats, trx, LOCK_X); + error = lock_table_for_trx(table_stats, trx, LOCK_X, + from_temp); if (error == DB_SUCCESS) { error = lock_table_for_trx(index_stats, trx, - LOCK_X); + LOCK_X, from_temp); } if (error != DB_SUCCESS && from_temp) { + ut_ad(error == DB_LOCK_WAIT); + ut_ad(trx->error_state == DB_SUCCESS); error = DB_SUCCESS; /* We may skip renaming statistics if we cannot lock the tables, when the @@ -14098,7 +14093,6 @@ ha_innobase::rename_table( table_stats = nullptr; index_stats = nullptr; } - timeout = save_timeout; } } diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 28d75517d45..e4ceff6dec2 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -394,15 +394,13 @@ lock_table( void lock_table_resurrect(dict_table_t *table, trx_t *trx, lock_mode mode); /** Sets a lock on a table based on the given mode. -@param[in] table table to lock -@param[in,out] trx transaction -@param[in] mode LOCK_X or LOCK_S -@return error code or DB_SUCCESS. */ -dberr_t -lock_table_for_trx( - dict_table_t* table, - trx_t* trx, - enum lock_mode mode) +@param table table to lock +@param trx transaction +@param mode LOCK_X or LOCK_S +@param no_wait whether to skip handling DB_LOCK_WAIT +@return error code */ +dberr_t lock_table_for_trx(dict_table_t *table, trx_t *trx, lock_mode mode, + bool no_wait= false) MY_ATTRIBUTE((nonnull, warn_unused_result)); /** Exclusively lock the data dictionary tables. @@ -915,10 +913,8 @@ public: @param page whether to discard also from lock_sys.prdt_hash */ void prdt_page_free_from_discard(const page_id_t id, bool all= false); -#ifdef WITH_WSREP /** Cancel possible lock waiting for a transaction */ static void cancel_lock_wait_for_trx(trx_t *trx); -#endif /* WITH_WSREP */ }; /** The lock system */ diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index fa1ea357fe6..f920ac1ac95 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -3627,52 +3627,50 @@ static void lock_table_dequeue(lock_t *in_lock, bool owns_wait_mutex) } } + /** Sets a lock on a table based on the given mode. -@param[in] table table to lock -@param[in,out] trx transaction -@param[in] mode LOCK_X or LOCK_S -@return error code or DB_SUCCESS. */ -dberr_t -lock_table_for_trx( - dict_table_t* table, - trx_t* trx, - enum lock_mode mode) +@param table table to lock +@param trx transaction +@param mode LOCK_X or LOCK_S +@param no_wait whether to skip handling DB_LOCK_WAIT +@return error code */ +dberr_t lock_table_for_trx(dict_table_t *table, trx_t *trx, lock_mode mode, + bool no_wait) { - mem_heap_t* heap; - que_thr_t* thr; - dberr_t err; - sel_node_t* node; - heap = mem_heap_create(512); + mem_heap_t *heap= mem_heap_create(512); + sel_node_t *node= sel_node_create(heap); + que_thr_t *thr= pars_complete_graph_for_exec(node, trx, heap, nullptr); + thr->graph->state= QUE_FORK_ACTIVE; - node = sel_node_create(heap); - thr = pars_complete_graph_for_exec(node, trx, heap, NULL); - thr->graph->state = QUE_FORK_ACTIVE; - - /* We use the select query graph as the dummy graph needed - in the lock module call */ - - thr = static_cast( - que_fork_get_first_thr( - static_cast(que_node_get_parent(thr)))); + thr= static_cast + (que_fork_get_first_thr(static_cast + (que_node_get_parent(thr)))); run_again: - thr->run_node = thr; - thr->prev_node = thr->common.parent; + thr->run_node= thr; + thr->prev_node= thr->common.parent; + dberr_t err= lock_table(table, mode, thr); - err = lock_table(table, mode, thr); + switch (err) { + case DB_SUCCESS: + break; + case DB_LOCK_WAIT: + if (no_wait) + { + lock_sys.cancel_lock_wait_for_trx(trx); + break; + } + /* fall through */ + default: + trx->error_state= err; + if (row_mysql_handle_errors(&err, trx, thr, nullptr)) + goto run_again; + } - trx->error_state = err; + que_graph_free(thr->graph); + trx->op_info= ""; - if (UNIV_UNLIKELY(err != DB_SUCCESS)) { - if (row_mysql_handle_errors(&err, trx, thr, NULL)) { - goto run_again; - } - } - - que_graph_free(thr->graph); - trx->op_info = ""; - - return(err); + return err; } /** Exclusively lock the data dictionary tables. @@ -5639,8 +5637,7 @@ static void lock_cancel_waiting_and_release(lock_t *lock) lock_wait_end(trx); trx->mutex_unlock(); } -#ifdef WITH_WSREP -TRANSACTIONAL_TARGET + void lock_sys_t::cancel_lock_wait_for_trx(trx_t *trx) { lock_sys.wr_lock(SRW_LOCK_CALL); @@ -5654,7 +5651,6 @@ void lock_sys_t::cancel_lock_wait_for_trx(trx_t *trx) lock_sys.wr_unlock(); mysql_mutex_unlock(&lock_sys.wait_mutex); } -#endif /* WITH_WSREP */ /** Cancel a waiting lock request. @tparam check_victim whether to check for DB_DEADLOCK From 35725df6e2791d19bebf0301bb9fcb6200f5b00d Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 22 Mar 2022 03:23:32 +0100 Subject: [PATCH 14/30] MDEV-27524 addendum: fix for bug introduced by automatic migration --- scripts/wsrep_sst_common.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 084854c8dcb..cc5db9e9e01 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -1214,16 +1214,6 @@ verify_ca_matches_cert() return fi - local readable=1; [ ! -r "$cert" ] && readable=0 - [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 - [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 - - if [ readable -eq 0 ]; then - wsrep_log_error \ - "Both PEM file and CA file (or path) must be readable" - exit 22 - fi - local not_match=0 local errmsg errmsg=$("$OPENSSL_BINARY" verify -verbose \ From 5ccd845d51d80a2f94dc796037f6d2aef106f75d Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 10 Feb 2022 19:17:06 +0200 Subject: [PATCH 15/30] MDEV-27760 event may non stop replicate in circular semisync setup MDEV-21117 had to relax own events acceptance condition for a case when a former semisync master server recovers after crash as the semisync slave. That however admitted a possibility for endless event "orbiting" in the non-strict slave gtid mode of semisync circular setup. The same server-id event termination is restored now for the non-strict gtid mode to follow regular rules (that is it's ignored unless @@global.replicate_same_server_id allows it in). To address MDEV-21117 recovery agenda, in the strict gtid mode and the transaction's gtid ordered strictly greater than the current slave gtid state, the same server-id transaction is accepted. The gtid strict mode is safe to accept transactions even if the slave state were not set correct by the user, e.g at the former master. An added test shows a typical out-of-order error at execution so no data corruption is guaranteed in such a case. --- .../suite/rpl/r/rpl_circular_semi_sync.result | 76 ++++++++++++ .../suite/rpl/t/rpl_circular_semi_sync.cnf | 11 ++ .../suite/rpl/t/rpl_circular_semi_sync.test | 115 ++++++++++++++++++ sql/slave.cc | 24 ++-- 4 files changed, 217 insertions(+), 9 deletions(-) create mode 100644 mysql-test/suite/rpl/r/rpl_circular_semi_sync.result create mode 100644 mysql-test/suite/rpl/t/rpl_circular_semi_sync.cnf create mode 100644 mysql-test/suite/rpl/t/rpl_circular_semi_sync.test diff --git a/mysql-test/suite/rpl/r/rpl_circular_semi_sync.result b/mysql-test/suite/rpl/r/rpl_circular_semi_sync.result new file mode 100644 index 00000000000..dcced9833ca --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_circular_semi_sync.result @@ -0,0 +1,76 @@ +include/master-slave.inc +[connection master] +# Master server_1 and Slave server_2 initialiation ... +connection server_2; +include/stop_slave.inc +connection server_1; +set @@sql_log_bin = off; +call mtr.add_suppression("Slave: An attempt was made to binlog GTID 10-1-1 which would create an out-of-order sequence number with existing GTID"); +set @@sql_log_bin = on; +RESET MASTER; +set @@session.gtid_domain_id=10; +set @@global.rpl_semi_sync_master_enabled = 1; +set @@global.rpl_semi_sync_master_wait_point=AFTER_SYNC; +connection server_2; +RESET MASTER; +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; +set @@session.gtid_domain_id=20; +set @@global.rpl_semi_sync_slave_enabled = 1; +# a 1948 warning is expected +set @@global.gtid_slave_pos = ""; +Warnings: +Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-1. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos +CHANGE MASTER TO master_use_gtid= slave_pos; +include/start_slave.inc +# ... server_1 -> server_2 is set up +connection server_1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Innodb; +INSERT INTO t1 VALUES (1); +connection server_2; +# Circular configuration server_2 -> server_1 initialiation ... +connection server_1; +# A. ... first when server_1 is in gtid strict mode... +set @@global.gtid_strict_mode = true; +set @@global.rpl_semi_sync_slave_enabled = 1; +CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=SLAVE_POS; +# ... only for it to fail 'cos if its inconsistent (empty) slave's gtid state: +SELECT @@global.gtid_slave_pos; +@@global.gtid_slave_pos + +START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1950] +# B. ... Resume on the circular setup with the server_id now in the non-strict mode ... +set @@global.gtid_strict_mode = false; +include/start_slave.inc +# ... to have succeeded. +connection server_2; +INSERT INTO t1 VALUES (2); +connection server_1; +INSERT INTO t1 VALUES (3); +connection server_2; +# The gtid states on server_2 must be equal to ... +SHOW VARIABLES LIKE 'gtid_binlog_pos'; +Variable_name Value +gtid_binlog_pos 0-2-1,10-1-3,20-2-1 +SHOW VARIABLES LIKE 'gtid_slave_pos'; +Variable_name Value +gtid_slave_pos 0-2-1,10-1-3,20-2-1 +connection server_1; +# ... the gtid states on server_1 +SHOW VARIABLES LIKE 'gtid_slave_pos'; +Variable_name Value +gtid_slave_pos 0-2-1,10-1-3,20-2-1 +SHOW VARIABLES LIKE 'gtid_binlog_pos'; +Variable_name Value +gtid_binlog_pos 0-2-1,10-1-3,20-2-1 +# Cleanup +connection server_1; +include/stop_slave.inc +set @@global.rpl_semi_sync_master_enabled = default; +set @@global.rpl_semi_sync_slave_enabled = default; +set @@global.rpl_semi_sync_master_wait_point=default; +DROP TABLE t1; +connection server_2; +set @@global.rpl_semi_sync_master_enabled = default; +set @@global.rpl_semi_sync_slave_enabled = default; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_circular_semi_sync.cnf b/mysql-test/suite/rpl/t/rpl_circular_semi_sync.cnf new file mode 100644 index 00000000000..be39fea91d8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_circular_semi_sync.cnf @@ -0,0 +1,11 @@ +!include suite/rpl/rpl_1slave_base.cnf +!include include/default_client.cnf + + +[mysqld.1] +log-slave-updates +sync-binlog=1 + +[mysqld.2] +log-slave-updates +sync-binlog=1 diff --git a/mysql-test/suite/rpl/t/rpl_circular_semi_sync.test b/mysql-test/suite/rpl/t/rpl_circular_semi_sync.test new file mode 100644 index 00000000000..51fa5a242ea --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_circular_semi_sync.test @@ -0,0 +1,115 @@ +# ==== References ==== +# +# MDEV-27760 event may non stop replicate in circular semisync setup +# +--source include/have_innodb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# The following tests prove +# A. out-of-order gtid error when the stict gtid mode semisync slave +# receives the same server-id gtid event inconsistent +# (rpl_semi_sync_fail_over tests the consistent case) with its state; +# B. in the non-strict mode the same server-id events remains ignored +# by default as usual. +# +--echo # Master server_1 and Slave server_2 initialiation ... +--connection server_2 +--source include/stop_slave.inc + +# Initial master +--connection server_1 +set @@sql_log_bin = off; +call mtr.add_suppression("Slave: An attempt was made to binlog GTID 10-1-1 which would create an out-of-order sequence number with existing GTID"); +set @@sql_log_bin = on; + +RESET MASTER; + +set @@session.gtid_domain_id=10; + +set @@global.rpl_semi_sync_master_enabled = 1; +set @@global.rpl_semi_sync_master_wait_point=AFTER_SYNC; + +--connection server_2 +RESET MASTER; +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; + +set @@session.gtid_domain_id=20; + +set @@global.rpl_semi_sync_slave_enabled = 1; +--echo # a 1948 warning is expected +set @@global.gtid_slave_pos = ""; +CHANGE MASTER TO master_use_gtid= slave_pos; +--source include/start_slave.inc +--echo # ... server_1 -> server_2 is set up + +--connection server_1 +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Innodb; +INSERT INTO t1 VALUES (1); +--save_master_pos + +--connection server_2 +--sync_with_master + +--echo # Circular configuration server_2 -> server_1 initialiation ... +--connection server_1 +--echo # A. ... first when server_1 is in gtid strict mode... +set @@global.gtid_strict_mode = true; +set @@global.rpl_semi_sync_slave_enabled = 1; + +evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=SLAVE_POS; + +--echo # ... only for it to fail 'cos if its inconsistent (empty) slave's gtid state: +SELECT @@global.gtid_slave_pos; +START SLAVE; +# ER_GTID_STRICT_OUT_OF_ORDER +--let $slave_sql_errno = 1950 +--source include/wait_for_slave_sql_error.inc + +--echo # B. ... Resume on the circular setup with the server_id now in the non-strict mode ... +set @@global.gtid_strict_mode = false; +--source include/start_slave.inc + +--echo # ... to have succeeded. + +--connection server_2 +INSERT INTO t1 VALUES (2); +--save_master_pos + +--connection server_1 +--sync_with_master + +INSERT INTO t1 VALUES (3); +--save_master_pos + +--connection server_2 +--sync_with_master +--echo # The gtid states on server_2 must be equal to ... +--let $wait_condition=select @@gtid_slave_pos=@@gtid_binlog_pos +--source include/wait_condition.inc +SHOW VARIABLES LIKE 'gtid_binlog_pos'; +SHOW VARIABLES LIKE 'gtid_slave_pos'; + +--connection server_1 +--echo # ... the gtid states on server_1 +--let $wait_condition=select @@gtid_slave_pos=@@gtid_binlog_pos +--source include/wait_condition.inc +SHOW VARIABLES LIKE 'gtid_slave_pos'; +SHOW VARIABLES LIKE 'gtid_binlog_pos'; + +--echo # Cleanup +--connection server_1 +--source include/stop_slave.inc +set @@global.rpl_semi_sync_master_enabled = default; +set @@global.rpl_semi_sync_slave_enabled = default; +set @@global.rpl_semi_sync_master_wait_point=default; + +DROP TABLE t1; +--save_master_pos + +--connection server_2 +--sync_with_master +set @@global.rpl_semi_sync_master_enabled = default; +set @@global.rpl_semi_sync_slave_enabled = default; + +--source include/rpl_end.inc diff --git a/sql/slave.cc b/sql/slave.cc index c0eef02ca7a..a6578be199a 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -6186,13 +6186,13 @@ static int queue_event(Master_info* mi, const uchar *buf, ulong event_len) bool is_rows_event= false; /* The flag has replicate_same_server_id semantics and is raised to accept - a same-server-id event on the semisync slave, for both the gtid and legacy - connection modes. - Such events can appear as result of this server recovery so the event - was created there and replicated elsewhere right before the crash. At recovery - it could be evicted from the server's binlog. - */ - bool do_accept_own_server_id= false; + a same-server-id event group by the gtid strict mode semisync slave. + Own server-id events can appear as result of this server crash-recovery: + the transaction was created on this server then being master, got replicated + elsewhere right before the crash before commit; + finally at recovery the transaction gets evicted from the server's binlog. + */ + bool do_accept_own_server_id; /* FD_q must have been prepared for the first R_a event inside get_master_version_and_clock() @@ -6281,6 +6281,8 @@ static int queue_event(Master_info* mi, const uchar *buf, ulong event_len) dbug_rows_event_count = 0; };); #endif + s_id= uint4korr(buf + SERVER_ID_OFFSET); + mysql_mutex_lock(&mi->data_lock); switch (buf[EVENT_TYPE_OFFSET]) { @@ -6722,6 +6724,7 @@ static int queue_event(Master_info* mi, const uchar *buf, ulong event_len) ++mi->events_queued_since_last_gtid; inc_pos= event_len; + } break; /* @@ -6864,6 +6867,10 @@ static int queue_event(Master_info* mi, const uchar *buf, ulong event_len) break; } + do_accept_own_server_id= (s_id == global_system_variables.server_id + && rpl_semi_sync_slave_enabled && opt_gtid_strict_mode + && mi->using_gtid != Master_info::USE_GTID_NO); + /* Integrity of Rows- event group check. A sequence of Rows- events must end with STMT_END_F flagged one. @@ -6909,7 +6916,6 @@ static int queue_event(Master_info* mi, const uchar *buf, ulong event_len) */ mysql_mutex_lock(log_lock); - s_id= uint4korr(buf + SERVER_ID_OFFSET); /* Write the event to the relay log, unless we reconnected in the middle of an event group and now need to skip the initial part of the group that @@ -6955,7 +6961,7 @@ static int queue_event(Master_info* mi, const uchar *buf, ulong event_len) else if ((s_id == global_system_variables.server_id && !(mi->rli.replicate_same_server_id || - (do_accept_own_server_id= rpl_semi_sync_slave_enabled))) || + do_accept_own_server_id)) || event_that_should_be_ignored(buf) || /* the following conjunction deals with IGNORE_SERVER_IDS, if set From 1960f7b2241f4d184962a6b8ee4b2af12083f055 Mon Sep 17 00:00:00 2001 From: Tuukka Pasanen Date: Tue, 25 Jan 2022 14:09:22 +0200 Subject: [PATCH 16/30] MDEV-27033: Clean lintian 'extended-description-is-empty' errors Fix Debian lintian errors: E: mariadb-plugin-provider-bzip2: extended-description-is-empty E: mariadb-plugin-provider-lz4: extended-description-is-empty E: mariadb-plugin-provider-lzma: extended-description-is-empty E: mariadb-plugin-provider-lzo: extended-description-is-empty E: mariadb-plugin-provider-snappy: extended-description-is-empty by adding Debian Policy Manual section 3.4 (The description of a package) extended descriptions to mariadb-plugin-provide-* packages --- debian/control | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/debian/control b/debian/control index 0cd9e7eef67..da6a4645935 100644 --- a/debian/control +++ b/debian/control @@ -944,6 +944,13 @@ Depends: mariadb-server-10.7, ${misc:Depends}, ${shlibs:Depends} Description: BZip2 compression support in the server and storage engines + The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga, + can use different compression libraries. + . + Plugin provides BZip2 (https://sourceware.org/bzip2/) compression + . + Note that these affect InnoDB and Mroonga only; + RocksDB still uses the compression algorithms from its own library Package: mariadb-plugin-provider-lz4 Architecture: any @@ -951,6 +958,13 @@ Depends: mariadb-server-10.7, ${misc:Depends}, ${shlibs:Depends} Description: LZ4 compression support in the server and storage engines + The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga, + can use different compression libraries. + . + Plugin provides LZ4 (http://lz4.github.io/lz4/) compression + . + Note that these affect InnoDB and Mroonga only; + RocksDB still uses the compression algorithms from its own library Package: mariadb-plugin-provider-lzma Architecture: any @@ -958,6 +972,13 @@ Depends: mariadb-server-10.7, ${misc:Depends}, ${shlibs:Depends} Description: LZMA compression support in the server and storage engines + The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga, + can use different compression libraries. + . + Plugin provides LZMA (https://tukaani.org/lzma/) compression + . + Note that these affect InnoDB and Mroonga only; + RocksDB still uses the compression algorithms from its own library Package: mariadb-plugin-provider-lzo Architecture: any @@ -965,6 +986,13 @@ Depends: mariadb-server-10.7, ${misc:Depends}, ${shlibs:Depends} Description: LZO compression support in the server and storage engines + The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga, + can use different compression libraries. + . + Plugin provides LZO (http://www.oberhumer.com/opensource/lzo/) compression + . + Note that these affect InnoDB and Mroonga only; + RocksDB still uses the compression algorithms from its own library Package: mariadb-plugin-provider-snappy Architecture: any @@ -972,6 +1000,13 @@ Depends: mariadb-server-10.7, ${misc:Depends}, ${shlibs:Depends} Description: Snappy compression support in the server and storage engines + The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga, + can use different compression libraries. + . + Plugin provides Snappy (https://github.com/google/snappy) compression + . + Note that these affect InnoDB and Mroonga only; + RocksDB still uses the compression algorithms from its own library Package: mariadb-test Architecture: any From 770f62bf3e8f535b8e513bd33c5b0e3444f45b14 Mon Sep 17 00:00:00 2001 From: Tuukka Pasanen Date: Mon, 21 Mar 2022 10:16:38 +0200 Subject: [PATCH 17/30] MDEV-28135: Add missing conflict and breaks for MariaDB 10.6 There is missing conflict and breaks for MariaDB 10.6 which can cause upgrading from 10.6 not be clean and end up with errors on Debian. --- debian/control | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/control b/debian/control index da6a4645935..ada91550726 100644 --- a/debian/control +++ b/debian/control @@ -537,6 +537,7 @@ Conflicts: mariadb-server-core-10.0, mariadb-server-core-10.3, mariadb-server-core-10.4, mariadb-server-core-10.5, + mariadb-server-core-10.6, mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.3, @@ -656,6 +657,7 @@ Conflicts: mariadb-server (<< ${source:Version}), mariadb-server-10.3, mariadb-server-10.4, mariadb-server-10.5, + mariadb-server-10.6, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, @@ -695,6 +697,7 @@ Replaces: handlersocket-mysql-5.5, mariadb-server-10.3, mariadb-server-10.4, mariadb-server-10.5, + mariadb-server-10.6, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, From 9c57bbdad0a6d8aceb45634048c881f8432c68d2 Mon Sep 17 00:00:00 2001 From: Tuukka Pasanen Date: Fri, 18 Mar 2022 10:43:24 +0200 Subject: [PATCH 18/30] MDEV-28120 Remove false-positive Lintian linking error Lintian uses objdump-command to determine is share object linked against C-libary. Compression provider shared objects does not have any symbols from C-library they only depend compression library and MariaDB libaries. This is false-positive as Lintian error itself is correct as shared object does not share any symbols from for example Glibc. Added overrides suppress Lintian errors: * E: mariadb-plugin-provider-bzip2: library-not-linked-against-libc usr/lib/mysql/plugin/provider_bzip2.so * E: mariadb-plugin-provider-lz4: library-not-linked-against-libc usr/lib/mysql/plugin/provider_lz4.so * E: mariadb-plugin-provider-lzma: library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzma.so * E: mariadb-plugin-provider-lzo: library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzo.so * E: mariadb-plugin-provider-snappy: library-not-linked-against-libc usr/lib/mysql/plugin/provider_snappy.so --- debian/mariadb-plugin-provider-bzip2.lintian-overrides | 3 +++ debian/mariadb-plugin-provider-lz4.lintian-overrides | 3 +++ debian/mariadb-plugin-provider-lzma.lintian-overrides | 3 +++ debian/mariadb-plugin-provider-lzo.lintian-overrides | 3 +++ debian/mariadb-plugin-provider-snappy.lintian-overrides | 3 +++ 5 files changed, 15 insertions(+) create mode 100644 debian/mariadb-plugin-provider-bzip2.lintian-overrides create mode 100644 debian/mariadb-plugin-provider-lz4.lintian-overrides create mode 100644 debian/mariadb-plugin-provider-lzma.lintian-overrides create mode 100644 debian/mariadb-plugin-provider-lzo.lintian-overrides create mode 100644 debian/mariadb-plugin-provider-snappy.lintian-overrides diff --git a/debian/mariadb-plugin-provider-bzip2.lintian-overrides b/debian/mariadb-plugin-provider-bzip2.lintian-overrides new file mode 100644 index 00000000000..563c05a3a6b --- /dev/null +++ b/debian/mariadb-plugin-provider-bzip2.lintian-overrides @@ -0,0 +1,3 @@ +# It's intentional that bzip2 compression plugin doesn't have symbols from libc +# More info https://jira.mariadb.org/browse/MDEV-28120 +library-not-linked-against-libc usr/lib/mysql/plugin/provider_bzip2.so \ No newline at end of file diff --git a/debian/mariadb-plugin-provider-lz4.lintian-overrides b/debian/mariadb-plugin-provider-lz4.lintian-overrides new file mode 100644 index 00000000000..3f7d7e9ecfb --- /dev/null +++ b/debian/mariadb-plugin-provider-lz4.lintian-overrides @@ -0,0 +1,3 @@ +# It's intentional that LZ4 compression plugin doesn't have symbols from libc +# More info https://jira.mariadb.org/browse/MDEV-28120 +library-not-linked-against-libc usr/lib/mysql/plugin/provider_lz4.so \ No newline at end of file diff --git a/debian/mariadb-plugin-provider-lzma.lintian-overrides b/debian/mariadb-plugin-provider-lzma.lintian-overrides new file mode 100644 index 00000000000..94eafa766a4 --- /dev/null +++ b/debian/mariadb-plugin-provider-lzma.lintian-overrides @@ -0,0 +1,3 @@ +# It's intentional that LZMA compression plugin doesn't have symbols from libc +# More info https://jira.mariadb.org/browse/MDEV-28120 +library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzma.so \ No newline at end of file diff --git a/debian/mariadb-plugin-provider-lzo.lintian-overrides b/debian/mariadb-plugin-provider-lzo.lintian-overrides new file mode 100644 index 00000000000..8184923cf9a --- /dev/null +++ b/debian/mariadb-plugin-provider-lzo.lintian-overrides @@ -0,0 +1,3 @@ +# It's intentional that LZO compression plugin doesn't have symbols from libc +# More info https://jira.mariadb.org/browse/MDEV-28120 +library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzo.so \ No newline at end of file diff --git a/debian/mariadb-plugin-provider-snappy.lintian-overrides b/debian/mariadb-plugin-provider-snappy.lintian-overrides new file mode 100644 index 00000000000..6c76162573d --- /dev/null +++ b/debian/mariadb-plugin-provider-snappy.lintian-overrides @@ -0,0 +1,3 @@ +# It's intentional that Snappy compression plugin doesn't have symbols from libc +# More info https://jira.mariadb.org/browse/MDEV-28120 +library-not-linked-against-libc usr/lib/mysql/plugin/provider_snappy.so \ No newline at end of file From c3ca729ba8c2fff7255cb33462e868e28726374e Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 9 Mar 2022 17:30:21 +0530 Subject: [PATCH 19/30] MDEV-27858 Assertion `page_dir_get_n_heap(new_page) == 2U' failed in PageBulk::init - InnoDB should check whether bulk transaction id set to its own transaction id before start bulk insert operation. - When bulk insert failure happens, InnoDB should set the error info of the transaction. --- .../suite/innodb/r/insert_into_empty.result | 10 ++++++++++ .../suite/innodb/t/insert_into_empty.test | 11 +++++++++++ storage/innobase/row/row0merge.cc | 18 +++++++++++++++--- storage/innobase/trx/trx0rec.cc | 3 ++- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/innodb/r/insert_into_empty.result b/mysql-test/suite/innodb/r/insert_into_empty.result index 3f4d56e8245..6d50d25a982 100644 --- a/mysql-test/suite/innodb/r/insert_into_empty.result +++ b/mysql-test/suite/innodb/r/insert_into_empty.result @@ -240,3 +240,13 @@ SELECT length(f1) FROM t1; length(f1) 8459264 DROP TABLE t1; +# +# MDEV-27858 Assertion `page_dir_get_n_heap(new_page) == 2U' failed in PageBulk::init +# +CREATE TABLE t1 (c INT) ENGINE=InnoDB; +CREATE TABLE t2 (c INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1); +LOCK TABLES t1 WRITE,t2 WRITE; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +DROP TABLE t2, t1; diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test index 1d4f79b3f44..79bf5cab227 100644 --- a/mysql-test/suite/innodb/t/insert_into_empty.test +++ b/mysql-test/suite/innodb/t/insert_into_empty.test @@ -250,3 +250,14 @@ CREATE TABLE t1(f1 MEDIUMTEXT)ENGINE=InnoDB; INSERT INTO t1 VALUES(REPEAT(1, 8459264)); SELECT length(f1) FROM t1; DROP TABLE t1; + +--echo # +--echo # MDEV-27858 Assertion `page_dir_get_n_heap(new_page) == 2U' failed in PageBulk::init +--echo # +CREATE TABLE t1 (c INT) ENGINE=InnoDB; +CREATE TABLE t2 (c INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1); +LOCK TABLES t1 WRITE,t2 WRITE; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +DROP TABLE t2, t1; diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index c9f52621325..6249857402c 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -5205,7 +5205,11 @@ add_to_buf: row_merge_dup_t dup{index, nullptr, nullptr, 0}; row_merge_buf_sort(buf, &dup); if (dup.n_dup) - return DB_DUPLICATE_KEY; + { + trx->error_info= index; + err= DB_DUPLICATE_KEY; + goto func_exit; + } } else row_merge_buf_sort(buf, NULL); @@ -5214,7 +5218,10 @@ add_to_buf: file->n_rec+= buf->n_tuples; err= write_to_tmp_file(i); if (err != DB_SUCCESS) - return err; + { + trx->error_info= index; + goto func_exit; + } clean_bulk_buffer(i); buf= &m_merge_buf[i]; goto add_to_buf; @@ -5243,7 +5250,10 @@ dberr_t row_merge_bulk_t::write_to_index(ulint index_no, trx_t *trx) { row_merge_buf_sort(&buf, &dup); if (dup.n_dup) - return DB_DUPLICATE_KEY; + { + err= DB_DUPLICATE_KEY; + goto func_exit; + } } else row_merge_buf_sort(&buf, NULL); if (file && file->fd != OS_FILE_CLOSED) @@ -5276,6 +5286,8 @@ dberr_t row_merge_bulk_t::write_to_index(ulint index_no, trx_t *trx) nullptr, &m_blob_file); func_exit: + if (err != DB_SUCCESS) + trx->error_info= index; err= btr_bulk.finish(err); return err; } diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index bfad53e691b..05333652a25 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -2055,7 +2055,8 @@ trx_undo_report_row_operation( } else if (!m.second || !trx->bulk_insert) { bulk = false; } else if (index->table->is_temporary()) { - } else if (trx_has_lock_x(*trx, *index->table)) { + } else if (trx_has_lock_x(*trx, *index->table) + && index->table->bulk_trx_id == trx->id) { m.first->second.start_bulk_insert(index->table); if (dberr_t err = m.first->second.bulk_insert_buffered( From 44231dc6d5c7dfdf0f1e6a09c84a8ef6a960f7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 23 Mar 2022 16:41:58 +0200 Subject: [PATCH 20/30] Cleanup: have_sanitizer='ASAN,UBSAN' This was suggested by Sergei Golubhick. Fixes up commit b91a123d8c9c321d54256d4ba055857c9505632b --- sql/sys_vars.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 07aad0b5d3a..9c59b6e0da4 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -5082,7 +5082,7 @@ static Sys_var_have Sys_have_symlink( # ifdef __SANITIZE_ADDRESS__ # ifdef WITH_UBSAN -# define SANITIZER_MODE "ASAN+UBSAN" +# define SANITIZER_MODE "ASAN,UBSAN" # else # define SANITIZER_MODE "ASAN" # endif From 75b7cd680b8272ac5a0848791757c1d310501574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 23 Mar 2022 16:42:43 +0200 Subject: [PATCH 21/30] MDEV-23974 Tests fail due to [Warning] InnoDB: Trying to delete tablespace A few regression tests invoke heavy flushing of the buffer pool and may trigger warnings that tablespaces could not be deleted because of pending writes. Those warnings are to be expected during the execution of such tests. The warnings are also frequently seen with Valgrind or MemorySanitizer. For those, the global suppression in have_innodb.inc does the trick. --- mysql-test/include/have_innodb.inc | 10 ++++++++++ mysql-test/main/flush_block_commit_notembedded.test | 4 ++++ mysql-test/suite/encryption/t/innochecksum.test | 5 +++++ .../suite/innodb/include/innodb-page-compression.inc | 4 ++++ .../suite/innodb/t/innodb-page_compression_bzip2.test | 5 +++++ .../suite/innodb/t/innodb-page_compression_lz4.test | 5 +++++ .../suite/innodb/t/innodb-page_compression_lzma.test | 5 +++++ .../suite/innodb/t/innodb-page_compression_lzo.test | 5 +++++ .../suite/innodb/t/innodb-page_compression_tables.test | 4 ++++ .../suite/innodb/t/innodb-page_compression_zip.test | 5 +++++ mysql-test/suite/innodb/t/undo_truncate.test | 3 +++ .../r/innodb_buffer_pool_dump_pct_basic.result | 5 +++++ mysql-test/suite/versioning/common.inc | 2 +- 13 files changed, 61 insertions(+), 1 deletion(-) diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc index 69ffdb5b284..a4147bb7463 100644 --- a/mysql-test/include/have_innodb.inc +++ b/mysql-test/include/have_innodb.inc @@ -2,3 +2,13 @@ # suite.pm will make sure that all tests including this file # will be skipped unless innodb is enabled # +--disable_query_log +if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`) +{ +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +} +if ($VALGRIND_TEST) +{ +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +} +--enable_query_log diff --git a/mysql-test/main/flush_block_commit_notembedded.test b/mysql-test/main/flush_block_commit_notembedded.test index 5be9e50e58b..024640893d9 100644 --- a/mysql-test/main/flush_block_commit_notembedded.test +++ b/mysql-test/main/flush_block_commit_notembedded.test @@ -12,6 +12,10 @@ --echo # Save the initial number of concurrent sessions --source include/count_sessions.inc +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log connect (con1,localhost,root,,); connect (con2,localhost,root,,); diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test index 0f44844c103..72e95de84e5 100644 --- a/mysql-test/suite/encryption/t/innochecksum.test +++ b/mysql-test/suite/encryption/t/innochecksum.test @@ -15,6 +15,11 @@ if (!$INNOCHECKSUM) { --die Need innochecksum binary } +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log + let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`; SET GLOBAL innodb_file_per_table = ON; # zlib diff --git a/mysql-test/suite/innodb/include/innodb-page-compression.inc b/mysql-test/suite/innodb/include/innodb-page-compression.inc index fec0f0cf01c..b16edcf2a28 100644 --- a/mysql-test/suite/innodb/include/innodb-page-compression.inc +++ b/mysql-test/suite/innodb/include/innodb-page-compression.inc @@ -1,5 +1,9 @@ # This test is slow on buildbot. --source include/big_test.inc +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log create table innodb_normal (c1 int not null auto_increment primary key, b char(200)) engine=innodb; create table innodb_page_compressed1 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=1; create table innodb_page_compressed2 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=2; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test b/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test index 2b4a9ea22a9..8b1060e5dad 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test @@ -2,6 +2,11 @@ -- source include/have_innodb_bzip2.inc -- source include/not_embedded.inc +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log + # bzip2 set global innodb_compression_algorithm = 5; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test b/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test index ec9bc456e74..52b0dac1160 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test @@ -4,6 +4,11 @@ # The test can take very long time with valgrind --source include/not_valgrind.inc +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log + # lz4 set global innodb_compression_algorithm = 2; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test b/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test index e05c08f7515..786f8be3117 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test @@ -2,6 +2,11 @@ -- source include/have_innodb_lzma.inc -- source include/not_embedded.inc +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log + # lzma set global innodb_compression_algorithm = 4; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test b/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test index af831bd2467..1739ddd4a28 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test @@ -2,6 +2,11 @@ -- source include/have_innodb_lzo.inc -- source include/not_embedded.inc +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log + # lzo set global innodb_compression_algorithm = 3; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test index 312aa22edba..6e9d3388154 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test @@ -2,6 +2,10 @@ --source include/not_embedded.inc let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log # zlib set global innodb_compression_algorithm = 1; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_zip.test b/mysql-test/suite/innodb/t/innodb-page_compression_zip.test index ad78767e903..871fa9bb72b 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_zip.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_zip.test @@ -3,6 +3,11 @@ # This test is slow on buildbot. --source include/big_test.inc +--disable_query_log +# This may be triggered on a slow system or one that lacks native AIO. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); +--enable_query_log + # zlib set global innodb_compression_algorithm = 1; diff --git a/mysql-test/suite/innodb/t/undo_truncate.test b/mysql-test/suite/innodb/t/undo_truncate.test index 437103de787..d954ff28307 100644 --- a/mysql-test/suite/innodb/t/undo_truncate.test +++ b/mysql-test/suite/innodb/t/undo_truncate.test @@ -6,6 +6,9 @@ --disable_query_log call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool"); +--disable_query_log +# This may be triggered on a slow system. +call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); --enable_query_log SET GLOBAL innodb_undo_log_truncate = 0; diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result index 93a85ffbf43..d4ae7edb70e 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result @@ -4,6 +4,11 @@ SELECT @orig; 25 SET GLOBAL innodb_buffer_pool_dump_pct=3; # Do the dump +SELECT @@global.innodb_buffer_pool_dump_now; +SELECT variable_value INTO @old_dump_status FROM information_schema.global_status +WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; +SET GLOBAL innodb_buffer_pool_dump_now = ON; +SELECT @@global.innodb_buffer_pool_dump_now; SET GLOBAL innodb_buffer_pool_dump_pct=20; SELECT @@global.innodb_buffer_pool_dump_pct; @@global.innodb_buffer_pool_dump_pct diff --git a/mysql-test/suite/versioning/common.inc b/mysql-test/suite/versioning/common.inc index 25adf15dd50..0c65720fa1a 100644 --- a/mysql-test/suite/versioning/common.inc +++ b/mysql-test/suite/versioning/common.inc @@ -1,9 +1,9 @@ ---disable_query_log if (!$TEST_VERSIONING_SO) { --skip needs test_versioning plugin } source include/have_innodb.inc; +--disable_query_log set @@session.time_zone='+00:00'; select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; From 2ca3861b552d83908327826c1d30f10cf0efd4b3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 23 Mar 2022 12:40:43 +0100 Subject: [PATCH 22/30] MDEV-28106 S3 tries to include thread.h while compiling on Windows S3 engine and libmarias3 don't compile on Windows also fixes: MDEV-28104 Typo in storage/maria/s3_func.c: 'FN_DECVHAR --- storage/maria/CMakeLists.txt | 2 +- storage/maria/s3_func.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt index 1091b6d9a2c..9e9b8ed4ac0 100644 --- a/storage/maria/CMakeLists.txt +++ b/storage/maria/CMakeLists.txt @@ -117,7 +117,7 @@ SET(S3_SOURCES s3_func.c libmarias3/src/sha256-internal.c libmarias3/src/xml.c libmarias3/src/assume_role.c) -IF(NOT PLUGIN_S3 STREQUAL NO) +IF(NOT PLUGIN_S3 STREQUAL NO AND NOT WIN32) FIND_PACKAGE(CURL) ENDIF() diff --git a/storage/maria/s3_func.c b/storage/maria/s3_func.c index 06178c1c0c2..491a8e0a323 100644 --- a/storage/maria/s3_func.c +++ b/storage/maria/s3_func.c @@ -1310,7 +1310,7 @@ my_bool set_database_and_table_from_path(S3_INFO *s3, const char *path) if (path[length-1] == FN_LIBCHAR || path[length-1] == '/') break; #ifdef FN_DEVCHAR - if (path[length-1] == FN_DECVHAR) + if (path[length-1] == FN_DEVCHAR) break; #endif } From d2c019b200d7b9eb010a070c8bdbb9249e7dcffb Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 23 Mar 2022 13:06:13 +0100 Subject: [PATCH 23/30] MDEV-28107 S3 doesn't build if CURL is in non-default location --- storage/maria/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt index 9e9b8ed4ac0..13d8035bdc8 100644 --- a/storage/maria/CMakeLists.txt +++ b/storage/maria/CMakeLists.txt @@ -122,9 +122,9 @@ IF(NOT PLUGIN_S3 STREQUAL NO AND NOT WIN32) ENDIF() IF (CURL_FOUND) - LINK_DIRECTORIES(${PC_CURL_LIBDIR}) + INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) MYSQL_ADD_PLUGIN(s3 ha_s3.cc ${S3_SOURCES} COMPONENT s3-engine - LINK_LIBRARIES curl z STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf) + LINK_LIBRARIES ${CURL_LIBRARIES} z STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf) ENDIF() SET(CPACK_RPM_s3-engine_PACKAGE_SUMMARY "Amazon S3 archival storage engine for MariaDB" PARENT_SCOPE) From b101f19d2936ca0e9081ece8ec5d3b40c3bc27ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 24 Mar 2022 13:43:58 +0200 Subject: [PATCH 24/30] MDEV-23974 fixup: rpl.rpl_gtid_stop_start fails The call mtr.add_suppression() that was added in commit 75b7cd680b8272ac5a0848791757c1d310501574 for MemorySanitizer and Valgrind runs is causing a result difference for the test rpl.rpl_gtid_stop_start. Let us disable the binlog for executing that statement. Also, the test perfschema.statement_program_lost_inst would fail due to the changes to have_innodb.inc in this commit. To compensate for that, we will make more --suite=perfschema tests run without InnoDB, and explicitly enable InnoDB in those tests that depend on a transactional storage engine. --- mysql-test/include/have_innodb.inc | 2 ++ mysql-test/suite/perfschema/include/program_nested_setup.inc | 3 +-- mysql-test/suite/perfschema/r/max_program_zero.result | 2 +- .../suite/perfschema/r/statement_program_lost_inst.result | 2 +- .../suite/perfschema/r/statement_program_nested.result | 5 +++-- .../r/statement_program_nesting_event_check.result | 5 ++++- mysql-test/suite/perfschema/t/statement_program_nested.test | 2 ++ .../perfschema/t/statement_program_nesting_event_check.test | 3 +++ 8 files changed, 17 insertions(+), 7 deletions(-) diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc index a4147bb7463..0de070e1994 100644 --- a/mysql-test/include/have_innodb.inc +++ b/mysql-test/include/have_innodb.inc @@ -5,10 +5,12 @@ --disable_query_log if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`) { +SET STATEMENT sql_log_bin=0 FOR call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); } if ($VALGRIND_TEST) { +SET STATEMENT sql_log_bin=0 FOR call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations"); } --enable_query_log diff --git a/mysql-test/suite/perfschema/include/program_nested_setup.inc b/mysql-test/suite/perfschema/include/program_nested_setup.inc index 1f96fa28f93..bbf885988dd 100644 --- a/mysql-test/suite/perfschema/include/program_nested_setup.inc +++ b/mysql-test/suite/perfschema/include/program_nested_setup.inc @@ -3,7 +3,6 @@ # --source include/no_protocol.inc ---source include/have_innodb.inc --echo # SET-UP CREATE DATABASE nested_sp; @@ -17,7 +16,7 @@ CREATE TABLE t1( CREATE TABLE t2( n INT UNSIGNED NOT NULL, f BIGINT UNSIGNED -) engine=innodb; +); --echo ############################ --echo # Creating Stored Programs # diff --git a/mysql-test/suite/perfschema/r/max_program_zero.result b/mysql-test/suite/perfschema/r/max_program_zero.result index b75b24ffdb4..85b9f49501c 100644 --- a/mysql-test/suite/perfschema/r/max_program_zero.result +++ b/mysql-test/suite/perfschema/r/max_program_zero.result @@ -166,7 +166,7 @@ data INT NOT NULL CREATE TABLE t2( n INT UNSIGNED NOT NULL, f BIGINT UNSIGNED -) engine=innodb; +); ############################ # Creating Stored Programs # ############################ diff --git a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result index ebacc9a8f7e..1723c35da2c 100644 --- a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result +++ b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result @@ -166,7 +166,7 @@ data INT NOT NULL CREATE TABLE t2( n INT UNSIGNED NOT NULL, f BIGINT UNSIGNED -) engine=innodb; +); ############################ # Creating Stored Programs # ############################ diff --git a/mysql-test/suite/perfschema/r/statement_program_nested.result b/mysql-test/suite/perfschema/r/statement_program_nested.result index 95cbdc81a1f..8ed6a81947f 100644 --- a/mysql-test/suite/perfschema/r/statement_program_nested.result +++ b/mysql-test/suite/perfschema/r/statement_program_nested.result @@ -13,7 +13,7 @@ data INT NOT NULL CREATE TABLE t2( n INT UNSIGNED NOT NULL, f BIGINT UNSIGNED -) engine=innodb; +); ############################ # Creating Stored Programs # ############################ @@ -67,6 +67,7 @@ END WHILE; END| CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW CALL ifac(10)| +ALTER TABLE t2 ENGINE=InnoDB; ##################### # Executing queries # ##################### @@ -1199,7 +1200,7 @@ data INT NOT NULL CREATE TABLE t2( n INT UNSIGNED NOT NULL, f BIGINT UNSIGNED -) engine=innodb; +); ############################ # Creating Stored Programs # ############################ diff --git a/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result b/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result index e045ff7db01..5e376a12a18 100644 --- a/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result +++ b/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result @@ -101,6 +101,7 @@ CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW SET @del:= @del + 1| CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW SET @del:= @del + 8 + old.j| +ALTER TABLE t2 ENGINE=InnoDB; ##################### # Executing queries # ##################### @@ -159,6 +160,7 @@ WHERE CURRENT_SCHEMA='stored_programs' AND ORDER BY OBJECT_NAME,NESTING_EVENT_LEVEL,SQL_TEXT; EVENT_NAME SQL_TEXT OBJECT_NAME NESTING_EVENT_TYPE NESTING_EVENT_LEVEL statement/scheduler/event NULL NULL NULL 0 +statement/sql/alter_table ALTER TABLE t2 ENGINE=InnoDB NULL NULL 0 statement/sql/call_procedure CALL SampleProc1(30,40,50) NULL NULL 0 statement/sql/call_procedure CALL SampleProc2("Jwalamukhi",34) NULL NULL 0 statement/sql/call_procedure CALL SampleProc3() NULL NULL 0 @@ -375,7 +377,7 @@ data INT NOT NULL CREATE TABLE t2( n INT UNSIGNED NOT NULL, f BIGINT UNSIGNED -) engine=innodb; +); ############################ # Creating Stored Programs # ############################ @@ -429,6 +431,7 @@ END WHILE; END| CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW CALL ifac(10)| +ALTER TABLE t2 ENGINE=InnoDB; ##################### # Executing queries # ##################### diff --git a/mysql-test/suite/perfschema/t/statement_program_nested.test b/mysql-test/suite/perfschema/t/statement_program_nested.test index e6649704bbf..183e9858226 100644 --- a/mysql-test/suite/perfschema/t/statement_program_nested.test +++ b/mysql-test/suite/perfschema/t/statement_program_nested.test @@ -4,6 +4,7 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--source include/have_innodb.inc TRUNCATE TABLE performance_schema.events_statements_summary_by_program; TRUNCATE TABLE performance_schema.events_statements_history_long; @@ -13,6 +14,7 @@ TRUNCATE TABLE performance_schema.events_statements_history_long; --echo ################################################# --source suite/perfschema/include/program_nested_setup.inc +ALTER TABLE t2 ENGINE=InnoDB; --source suite/perfschema/include/program_nested_execution.inc SELECT EVENT_NAME, SQL_TEXT, CURRENT_SCHEMA, OBJECT_TYPE, OBJECT_SCHEMA, diff --git a/mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test b/mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test index 20c59e9a3a8..73829be8b42 100644 --- a/mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test +++ b/mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test @@ -7,6 +7,7 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--source include/have_innodb.inc TRUNCATE TABLE performance_schema.events_statements_history_long; @@ -14,6 +15,7 @@ TRUNCATE TABLE performance_schema.events_statements_history_long; --echo # Non-nested Stored programs. --echo #---------------------------- --source suite/perfschema/include/program_setup.inc +ALTER TABLE t2 ENGINE=InnoDB; --source suite/perfschema/include/program_execution.inc SELECT EVENT_NAME, SQL_TEXT, OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL @@ -31,6 +33,7 @@ TRUNCATE TABLE performance_schema.events_statements_history_long; --echo # Nested stored programs. --echo #------------------------ --source suite/perfschema/include/program_nested_setup.inc +ALTER TABLE t2 ENGINE=InnoDB; --source suite/perfschema/include/program_nested_execution.inc SELECT EVENT_NAME, SQL_TEXT, OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL From 8684af76e34641331695860fc13eb9fc2ff94215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 24 Mar 2022 16:09:04 +0200 Subject: [PATCH 25/30] MDEV-28137 Some memory transactions are unnecessarily complex buf_page_get_zip(): Do not perform a system call inside a memory transaction. Instead, if the page latch is unavailable, abort the memory transaction and let the fall-back code path wait for the page latch. buf_pool_t::watch_remove(): Return the previous state of the block. buf_page_init_for_read(): Use regular stores for moving the buffer fix count of watch_remove() to the new block descriptor. A more extensive version of this was reviewed by Daniel Black and tested with Intel TSX-NI by Axel Schwenke and Matthias Leich. My assumption that regular loads and stores would execute faster in a memory transaction than operations like std::atomic::fetch_add() turned out to be incorrect. --- storage/innobase/buf/buf0buf.cc | 41 +++++++++++++++++++-- storage/innobase/buf/buf0rea.cc | 57 ++++++++++++++---------------- storage/innobase/include/buf0buf.h | 9 ++--- 3 files changed, 71 insertions(+), 36 deletions(-) diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index e456389149a..3f4f7888315 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -2269,29 +2269,66 @@ buf_page_t* buf_page_get_zip(const page_id_t page_id, ulint zip_size) lookup: for (bool discard_attempted= false;;) { +#ifndef NO_ELISION + if (xbegin()) { - transactional_shared_lock_guard g{hash_lock}; + if (hash_lock.is_locked()) + xabort(); bpage= buf_pool.page_hash.get(page_id, chain); if (!bpage || buf_pool.watch_is_sentinel(*bpage)) + { + xend(); goto must_read_page; + } + if (!bpage->zip.data) + { + /* There is no ROW_FORMAT=COMPRESSED page. */ + xend(); + return nullptr; + } + if (discard_attempted || !bpage->frame) + { + if (!bpage->lock.s_lock_try()) + xabort(); + xend(); + break; + } + xend(); + } + else +#endif + { + hash_lock.lock_shared(); + bpage= buf_pool.page_hash.get(page_id, chain); + if (!bpage || buf_pool.watch_is_sentinel(*bpage)) + { + hash_lock.unlock_shared(); + goto must_read_page; + } ut_ad(bpage->in_file()); ut_ad(page_id == bpage->id()); if (!bpage->zip.data) + { /* There is no ROW_FORMAT=COMPRESSED page. */ + hash_lock.unlock_shared(); return nullptr; + } if (discard_attempted || !bpage->frame) { - /* Even when we are holding a page_hash latch, it should be + /* Even when we are holding a hash_lock, it should be acceptable to wait for a page S-latch here, because buf_page_t::read_complete() will not wait for buf_pool.mutex, and because S-latch would not conflict with a U-latch that would be protecting buf_page_t::write_complete(). */ bpage->lock.s_lock(); + hash_lock.unlock_shared(); break; } + + hash_lock.unlock_shared(); } discard_attempted= true; diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index f47c983c650..436d2bd0aa3 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2021, MariaDB Corporation. +Copyright (c) 2015, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -50,19 +50,30 @@ i/o-fixed buffer blocks */ /** Remove the sentinel block for the watch before replacing it with a real block. watch_unset() or watch_occurred() will notice that the block has been replaced with the real block. -@param watch sentinel -@param chain locked hash table chain */ -inline void buf_pool_t::watch_remove(buf_page_t *watch, - buf_pool_t::hash_chain &chain) +@param w sentinel +@param chain locked hash table chain +@return w->state() */ +inline uint32_t buf_pool_t::watch_remove(buf_page_t *w, + buf_pool_t::hash_chain &chain) { mysql_mutex_assert_owner(&buf_pool.mutex); - ut_ad(page_hash.lock_get(chain).is_write_locked()); - ut_a(watch_is_sentinel(*watch)); - if (watch->buf_fix_count()) - page_hash.remove(chain, watch); - ut_ad(!watch->in_page_hash); - watch->set_state(buf_page_t::NOT_USED); - watch->id_= page_id_t(~0ULL); + ut_ad(xtest() || page_hash.lock_get(chain).is_write_locked()); + ut_ad(w >= &watch[0]); + ut_ad(w < &watch[array_elements(watch)]); + ut_ad(!w->in_zip_hash); + ut_ad(!w->zip.data); + + uint32_t s{w->state()}; + w->set_state(buf_page_t::NOT_USED); + ut_ad(s >= buf_page_t::UNFIXED); + ut_ad(s < buf_page_t::READ_FIX); + + if (~buf_page_t::LRU_MASK & s) + page_hash.remove(chain, w); + + ut_ad(!w->in_page_hash); + w->id_= page_id_t(~0ULL); + return s; } /** Initialize a page for read to the buffer buf_pool. If the page is @@ -139,14 +150,8 @@ static buf_page_t* buf_page_init_for_read(ulint mode, const page_id_t page_id, {buf_pool.page_hash.lock_get(chain)}; if (hash_page) - { - /* Preserve the reference count. */ - uint32_t buf_fix_count= hash_page->state(); - ut_a(buf_fix_count >= buf_page_t::UNFIXED); - ut_a(buf_fix_count < buf_page_t::READ_FIX); - buf_pool.watch_remove(hash_page, chain); - block->page.fix(buf_fix_count - buf_page_t::UNFIXED); - } + bpage->set_state(buf_pool.watch_remove(hash_page, chain) + + (buf_page_t::READ_FIX - buf_page_t::UNFIXED)); buf_pool.page_hash.append(chain, &block->page); } @@ -209,16 +214,8 @@ static buf_page_t* buf_page_init_for_read(ulint mode, const page_id_t page_id, {buf_pool.page_hash.lock_get(chain)}; if (hash_page) - { - /* Preserve the reference count. It can be 0 if - buf_pool_t::watch_unset() is executing concurrently, - waiting for buf_pool.mutex, which we are holding. */ - uint32_t buf_fix_count= hash_page->state(); - ut_a(buf_fix_count >= buf_page_t::UNFIXED); - ut_a(buf_fix_count < buf_page_t::READ_FIX); - bpage->fix(buf_fix_count - buf_page_t::UNFIXED); - buf_pool.watch_remove(hash_page, chain); - } + bpage->set_state(buf_pool.watch_remove(hash_page, chain) + + (buf_page_t::READ_FIX - buf_page_t::UNFIXED)); buf_pool.page_hash.append(chain, bpage); } diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index a7ecc888137..7c372379ad3 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2021, MariaDB Corporation. +Copyright (c) 2013, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1535,9 +1535,10 @@ public: /** Remove the sentinel block for the watch before replacing it with a real block. watch_unset() or watch_occurred() will notice that the block has been replaced with the real block. - @param watch sentinel - @param chain locked hash table chain */ - inline void watch_remove(buf_page_t *watch, hash_chain &chain); + @param w sentinel + @param chain locked hash table chain + @return w->state() */ + inline uint32_t watch_remove(buf_page_t *w, hash_chain &chain); /** @return whether less than 1/4 of the buffer pool is available */ TPOOL_SUPPRESS_TSAN From 0da5f45a50b5a3bba9fcb9959af04d8229c94188 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Tue, 22 Mar 2022 16:52:00 +0530 Subject: [PATCH 26/30] MDEV-27819: func_2.xxx_charset skipped after renaming utf8 to utf8mb3 Analysis: utf8 character set is now utf8mb3 or utf8mb4. So charset_master is not able to find utf8 at the beginning of test. Hence it skips the tests that use charset_master. Fix: rename utf8 to utf8mb3 in charset_master. --- .../suite/funcs_2/charset/charset_master.test | 20 ++--- .../suite/funcs_2/r/innodb_charset.result | 80 +++++++++---------- .../suite/funcs_2/r/memory_charset.result | 80 +++++++++---------- .../suite/funcs_2/r/myisam_charset.result | 80 +++++++++---------- 4 files changed, 130 insertions(+), 130 deletions(-) diff --git a/mysql-test/suite/funcs_2/charset/charset_master.test b/mysql-test/suite/funcs_2/charset/charset_master.test index 8f3ac64c753..099f44c9a02 100644 --- a/mysql-test/suite/funcs_2/charset/charset_master.test +++ b/mysql-test/suite/funcs_2/charset/charset_master.test @@ -38,7 +38,7 @@ if (`SELECT COUNT(*) <> 36 FROM information_schema.character_sets 'hp8' , 'keybcs2', 'koi8r' , 'koi8u' , 'latin1', 'latin2' , 'latin5' , 'latin7' , 'macce' , 'macroman', 'sjis' , 'swe7' , 'tis620' , 'ucs2' , 'ujis', - 'utf8' + 'utf8mb3' )`) { --skip Not all character sets required for this test are present @@ -72,12 +72,12 @@ WHERE collation_name IN ( 'ucs2_latvian_ci', 'ucs2_lithuanian_ci', 'ucs2_persian_ci', 'ucs2_polish_ci', 'ucs2_roman_ci', 'ucs2_romanian_ci', 'ucs2_slovak_ci', 'ucs2_slovenian_ci', 'ucs2_spanish2_ci', 'ucs2_spanish_ci', 'ucs2_swedish_ci', 'ucs2_turkish_ci', -'ucs2_unicode_ci', 'ujis_bin', 'ujis_japanese_ci', 'utf8_bin', -'utf8_czech_ci', 'utf8_danish_ci', 'utf8_estonian_ci', 'utf8_general_ci', -'utf8_hungarian_ci', 'utf8_icelandic_ci', 'utf8_latvian_ci', 'utf8_lithuanian_ci', -'utf8_persian_ci', 'utf8_polish_ci', 'utf8_roman_ci', 'utf8_romanian_ci', -'utf8_slovak_ci', 'utf8_slovenian_ci', 'utf8_spanish2_ci', 'utf8_spanish_ci', -'utf8_swedish_ci', 'utf8_turkish_ci', 'utf8_unicode_ci' +'ucs2_unicode_ci', 'ujis_bin', 'ujis_japanese_ci', 'utf8mb3_bin', +'utf8mb3_czech_ci', 'utf8mb3_danish_ci', 'utf8mb3_estonian_ci', 'utf8mb3_general_ci', +'utf8mb3_hungarian_ci', 'utf8mb3_icelandic_ci', 'utf8mb3_latvian_ci', 'utf8mb3_lithuanian_ci', +'utf8mb3_persian_ci', 'utf8mb3_polish_ci', 'utf8mb3_roman_ci', 'utf8mb3_romanian_ci', +'utf8mb3_slovak_ci', 'utf8mb3_slovenian_ci', 'utf8mb3_spanish2_ci', 'utf8mb3_spanish_ci', +'utf8mb3_swedish_ci', 'utf8mb3_turkish_ci', 'utf8mb3_unicode_ci' )`) { --skip Not all collations required for this test are present @@ -86,7 +86,7 @@ WHERE collation_name IN ( ################################ let $check_std_csets= 1; let $check_ucs2_csets= 1; -let $check_utf8_csets= 1; +let $check_utf8mb3_csets= 1; # Bug#32784: Timeout in test "innodb_charset": InnoDB much slower # than other handlers @@ -104,7 +104,7 @@ SET autocommit=0; ################################ let $check_std_csets= 1; let $check_ucs2_csets= 1; -let $check_utf8_csets= 1; +let $check_utf8mb3_csets= 1; # # Check all charsets/collation combinations @@ -610,7 +610,7 @@ let $coll= ucs2_unicode_ci; } -if ($check_utf8_csets) +if ($check_utf8mb3_csets) { # utf8 diff --git a/mysql-test/suite/funcs_2/r/innodb_charset.result b/mysql-test/suite/funcs_2/r/innodb_charset.result index 1ce5972eccc..3f4e2af12e5 100644 --- a/mysql-test/suite/funcs_2/r/innodb_charset.result +++ b/mysql-test/suite/funcs_2/r/innodb_charset.result @@ -17563,7 +17563,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_bin; @@ -20104,7 +20104,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; @@ -22645,7 +22645,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; @@ -25186,7 +25186,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_estonian_ci; @@ -27727,7 +27727,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_general_ci; @@ -30268,7 +30268,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_hungarian_ci; @@ -32809,7 +32809,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_icelandic_ci; @@ -35350,7 +35350,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_latvian_ci; @@ -37891,7 +37891,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_lithuanian_ci; @@ -40432,7 +40432,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_persian_ci; @@ -42973,7 +42973,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_polish_ci; @@ -45514,7 +45514,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_roman_ci; @@ -48055,7 +48055,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_romanian_ci; @@ -50596,7 +50596,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovak_ci; @@ -53137,7 +53137,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovenian_ci; @@ -55678,7 +55678,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish2_ci; @@ -58219,7 +58219,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish_ci; @@ -60760,7 +60760,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_swedish_ci; @@ -63301,7 +63301,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_turkish_ci; @@ -65842,7 +65842,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=InnoDB CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; @@ -68382,7 +68382,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_bin) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_bin # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_bin # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -70921,7 +70921,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_czech_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_czech_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_czech_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_czech_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -73460,7 +73460,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_danish_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_danish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_danish_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_danish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -75999,7 +75999,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_estonian_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_estonian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_estonian_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_estonian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -78538,7 +78538,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_general_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -81077,7 +81077,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_hungarian_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_hungarian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_hungarian_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_hungarian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -83616,7 +83616,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_icelandic_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_icelandic_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_icelandic_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_icelandic_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -86155,7 +86155,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_latvian_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_latvian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_latvian_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_latvian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -88694,7 +88694,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_lithuanian_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_lithuanian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_lithuanian_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_lithuanian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -91233,7 +91233,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_persian_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_persian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_persian_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_persian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -93772,7 +93772,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_polish_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_polish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_polish_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_polish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -96311,7 +96311,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_roman_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_roman_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_roman_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_roman_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -98850,7 +98850,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_romanian_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_romanian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_romanian_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_romanian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -101389,7 +101389,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovak_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_slovak_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_slovak_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_slovak_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -103928,7 +103928,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovenian_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_slovenian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_slovenian_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_slovenian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -106467,7 +106467,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish2_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_spanish2_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_spanish2_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_spanish2_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -109006,7 +109006,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_spanish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_spanish_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_spanish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -111545,7 +111545,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_swedish_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_swedish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_swedish_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_swedish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -114084,7 +114084,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_turkish_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_turkish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_turkish_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_turkish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -116623,7 +116623,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_unicode_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 InnoDB # # # # # # # # # # # # utf8_unicode_ci # # # 0 N +t1 InnoDB # # # # # # # # # # # # utf8mb3_unicode_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; diff --git a/mysql-test/suite/funcs_2/r/memory_charset.result b/mysql-test/suite/funcs_2/r/memory_charset.result index 66cdada9b61..bf21eac2a53 100644 --- a/mysql-test/suite/funcs_2/r/memory_charset.result +++ b/mysql-test/suite/funcs_2/r/memory_charset.result @@ -17563,7 +17563,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_bin; @@ -20104,7 +20104,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; @@ -22645,7 +22645,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; @@ -25186,7 +25186,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_estonian_ci; @@ -27727,7 +27727,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_general_ci; @@ -30268,7 +30268,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_hungarian_ci; @@ -32809,7 +32809,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_icelandic_ci; @@ -35350,7 +35350,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_latvian_ci; @@ -37891,7 +37891,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_lithuanian_ci; @@ -40432,7 +40432,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_persian_ci; @@ -42973,7 +42973,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_polish_ci; @@ -45514,7 +45514,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_roman_ci; @@ -48055,7 +48055,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_romanian_ci; @@ -50596,7 +50596,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovak_ci; @@ -53137,7 +53137,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovenian_ci; @@ -55678,7 +55678,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish2_ci; @@ -58219,7 +58219,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish_ci; @@ -60760,7 +60760,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_swedish_ci; @@ -63301,7 +63301,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_turkish_ci; @@ -65842,7 +65842,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=Memory CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; @@ -68382,7 +68382,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_bin) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_bin; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_bin # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_bin # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -70921,7 +70921,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_czech_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_czech_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_czech_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_czech_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -73460,7 +73460,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_danish_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_danish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_danish_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_danish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -75999,7 +75999,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_estonian_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_estonian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_estonian_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_estonian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -78538,7 +78538,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_general_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_general_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_general_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_general_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -81077,7 +81077,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_hungarian_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_hungarian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_hungarian_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_hungarian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -83616,7 +83616,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_icelandic_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_icelandic_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_icelandic_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_icelandic_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -86155,7 +86155,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_latvian_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_latvian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_latvian_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_latvian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -88694,7 +88694,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_lithuanian_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_lithuanian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_lithuanian_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_lithuanian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -91233,7 +91233,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_persian_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_persian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_persian_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_persian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -93772,7 +93772,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_polish_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_polish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_polish_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_polish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -96311,7 +96311,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_roman_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_roman_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_roman_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_roman_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -98850,7 +98850,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_romanian_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_romanian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_romanian_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_romanian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -101389,7 +101389,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovak_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_slovak_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_slovak_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_slovak_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -103928,7 +103928,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovenian_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_slovenian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_slovenian_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_slovenian_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -106467,7 +106467,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish2_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_spanish2_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_spanish2_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_spanish2_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -109006,7 +109006,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_spanish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_spanish_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_spanish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -111545,7 +111545,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_swedish_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_swedish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_swedish_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_swedish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -114084,7 +114084,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_turkish_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_turkish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_turkish_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_turkish_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -116623,7 +116623,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci) ENGINE=Memory CHARACTER SET utf8 COLLATE utf8_unicode_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MEMORY # # # # # # # # # # # # utf8_unicode_ci # # # 0 N +t1 MEMORY # # # # # # # # # # # # utf8mb3_unicode_ci # # # 0 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; diff --git a/mysql-test/suite/funcs_2/r/myisam_charset.result b/mysql-test/suite/funcs_2/r/myisam_charset.result index 9950b446a63..b6cbebd4ec1 100644 --- a/mysql-test/suite/funcs_2/r/myisam_charset.result +++ b/mysql-test/suite/funcs_2/r/myisam_charset.result @@ -17563,7 +17563,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_bin; @@ -20104,7 +20104,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; @@ -22645,7 +22645,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; @@ -25186,7 +25186,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_estonian_ci; @@ -27727,7 +27727,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_general_ci; @@ -30268,7 +30268,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_hungarian_ci; @@ -32809,7 +32809,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_icelandic_ci; @@ -35350,7 +35350,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_latvian_ci; @@ -37891,7 +37891,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_lithuanian_ci; @@ -40432,7 +40432,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_persian_ci; @@ -42973,7 +42973,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_polish_ci; @@ -45514,7 +45514,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_roman_ci; @@ -48055,7 +48055,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_romanian_ci; @@ -50596,7 +50596,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovak_ci; @@ -53137,7 +53137,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovenian_ci; @@ -55678,7 +55678,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish2_ci; @@ -58219,7 +58219,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish_ci; @@ -60760,7 +60760,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_swedish_ci; @@ -63301,7 +63301,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_turkish_ci; @@ -65842,7 +65842,7 @@ SET NAMES utf8; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; @@ -68382,7 +68382,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_bin) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_bin # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_bin # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -70921,7 +70921,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_czech_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_czech_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_czech_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_czech_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -73460,7 +73460,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_danish_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_danish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_danish_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_danish_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -75999,7 +75999,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_estonian_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_estonian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_estonian_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_estonian_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -78538,7 +78538,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_general_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_general_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_general_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -81077,7 +81077,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_hungarian_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_hungarian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_hungarian_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_hungarian_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -83616,7 +83616,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_icelandic_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_icelandic_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_icelandic_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_icelandic_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -86155,7 +86155,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_latvian_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_latvian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_latvian_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_latvian_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -88694,7 +88694,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_lithuanian_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_lithuanian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_lithuanian_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_lithuanian_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -91233,7 +91233,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_persian_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_persian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_persian_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_persian_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -93772,7 +93772,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_polish_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_polish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_polish_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_polish_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -96311,7 +96311,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_roman_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_roman_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_roman_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_roman_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -98850,7 +98850,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_romanian_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_romanian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_romanian_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_romanian_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -101389,7 +101389,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovak_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_slovak_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_slovak_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_slovak_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -103928,7 +103928,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovenian_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_slovenian_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_slovenian_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_slovenian_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -106467,7 +106467,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish2_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_spanish2_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_spanish2_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_spanish2_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -109006,7 +109006,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_spanish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_spanish_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_spanish_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -111545,7 +111545,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_swedish_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_swedish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_swedish_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_swedish_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -114084,7 +114084,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_turkish_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_turkish_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_turkish_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_turkish_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; @@ -116623,7 +116623,7 @@ USE test; CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 MyISAM # # # # # # # # # # # # utf8_unicode_ci # # # 17179868160 N +t1 MyISAM # # # # # # # # # # # # utf8mb3_unicode_ci # # # 17179868160 N LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; From 157a838b1951d5767794ddfa211684ad9108a59d Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 18 Mar 2022 11:42:20 +1100 Subject: [PATCH 27/30] MDEV-28153: Debian autobake- use absolute dependencies rather than a buildtime detection While moving to a prescribed dependencies in MDEV-28011, an error was made in the merge. The Ubuntu and Debian supported architectures of rocksdb-tools are different and need to be treated as such. This actually had no effect as our support of mariadb-plugin-rocksdb was never different to the distro support of rocksdb-tools. Some notes where added to this affect. There is also nothing to do for Debian sid, and never should be. The differentiation and grouping of distro codenames is for convenience in merging upwards as more dependencies change across distro versions. The fixing of versions rather than relying on apt-cache to be correct prevents unstable changes between releases, and potentially uninstallable packages like happened in MDEV-28014. Correct comment about zstd to MDEV-16525 --- debian/autobake-deb.sh | 52 ++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index e35372f7127..ce36b9abd37 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -16,6 +16,7 @@ set -e # Buildbot, running the test suite from installed .debs on a clean VM. export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS" +source ./VERSION # General CI optimizations to keep build output smaller if [[ $GITLAB_CI ]] then @@ -50,29 +51,50 @@ remove_rocksdb_tools() fi } +architecture=$(dpkg-architecture -q DEB_BUILD_ARCH) + CODENAME="$(lsb_release -sc)" case "${CODENAME}" in - stretch) - # MDEV-28022 libzstd-dev-1.1.3 minimum version - sed -i -e '/libzstd-dev/d' \ - -e 's/libcurl4/libcurl3/g' -i debian/control - remove_rocksdb_tools - ;; - bionic) - remove_rocksdb_tools - ;; + stretch) + # MDEV-16525 libzstd-dev-1.1.3 minimum version + sed -e '/libzstd-dev/d' \ + -e 's/libcurl4/libcurl3/g' -i debian/control + remove_rocksdb_tools + ;& + buster) + ;& + bullseye|bookworm) + # mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools + # so no removal is necessary. + ;& + sid) + # should always be empty here. + # need to match here to avoid the default Error however + ;; + # UBUNTU + bionic) + remove_rocksdb_tools + ;& + focal) + ;& + impish|jammy) + # mariadb-plugin-rocksdb s390x not supported by us (yet) + # ubuntu doesn't support mips64el yet, so keep this just + # in case something changes. + if [[ ! "$architecture" =~ amd64|arm64|ppc64el|s390x ]] + then + remove_rocksdb_tools + fi + ;; + *) + echo "Error - unknown release codename $CODENAME" >&2 + exit 1 esac -if [[ ! "$(dpkg-architecture -q DEB_BUILD_ARCH)" =~ amd64|arm64|ppc64el|s390x ]] -then - remove_rocksdb_tools -fi - # Adjust changelog, add new version echo "Incrementing changelog and starting build scripts" # Find major.minor version -source ./VERSION UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}" PATCHLEVEL="+maria" LOGSTRING="MariaDB build" From 1b2ee693b7cf2f514fa93c3acc047d4328b96364 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 18 Mar 2022 12:20:09 +1100 Subject: [PATCH 28/30] MDEV-28153: Debian autobake- use absolute dependencies rather than a buildtime detection Fixing the version of debian/ubuntu dependencies in 10.6 removes the apt-cache checking of libpmem and liburing dependencies. By arranging the checks earliest to latest, we unconditionally change the dependences in earlier versions, and in later versions we perform architecture checks to see if there is a dependency on this architecture before removing/changing. This takes from the architecture information on Ubuntu[1,2] and Debian[3,4]. [1] https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=liburing-dev [2] https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=libpmem-dev [3] https://packages.debian.org/search?suite=all§ion=all&arch=any&searchon=names&keywords=liburing-dev [4] https://packages.debian.org/search?suite=all§ion=all&arch=any&searchon=names&keywords=libpmem-dev --- debian/autobake-deb.sh | 55 ++++++++----- debian/salsa-ci.yml | 170 +++++++++++++++++++++++------------------ 2 files changed, 133 insertions(+), 92 deletions(-) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index ec8b36a4928..d1dd3f3b642 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -51,6 +51,19 @@ remove_rocksdb_tools() fi } +replace_uring_with_aio() +{ + sed 's/liburing-dev/libaio-dev/g' -i debian/control + sed -e '/-DIGNORE_AIO_CHECK=YES/d' \ + -e '/-DWITH_URING=yes/d' -i debian/rules +} + +disable_pmem() +{ + sed '/libpmem-dev/d' -i debian/control + sed '/-DWITH_PMEM=yes/d' -i debian/rules +} + architecture=$(dpkg-architecture -q DEB_BUILD_ARCH) CODENAME="$(lsb_release -sc)" @@ -60,22 +73,38 @@ case "${CODENAME}" in sed -e '/libzstd-dev/d' \ -e 's/libcurl4/libcurl3/g' -i debian/control remove_rocksdb_tools + disable_pmem ;& buster) + replace_uring_with_aio + if [ ! "$architecture" = amd64 ] + then + disable_pmem + fi ;& bullseye|bookworm) # mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools # so no removal is necessary. + if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]] + then + disable_pmem + fi + if [[ ! "$architecture" =~ amd64|arm64|armel|armhf|i386|mips64el|mipsel|ppc64el|s390x ]] + then + replace_uring_with_aio + fi ;& sid) # should always be empty here. # need to match here to avoid the default Error however ;; - # UBUNTU + # UBUNTU bionic) remove_rocksdb_tools + [ "$architecture" != amd64 ] && disable_pmem ;& focal) + replace_uring_with_aio ;& impish|jammy) # mariadb-plugin-rocksdb s390x not supported by us (yet) @@ -85,28 +114,20 @@ case "${CODENAME}" in then remove_rocksdb_tools fi + if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]] + then + disable_pmem + fi + if [[ ! "$architecture" =~ amd64|arm64|armhf|ppc64el|s390x ]] + then + replace_uring_with_aio + fi ;; *) echo "Error - unknown release codename $CODENAME" >&2 exit 1 esac -# From Debian Bullseye/Ubuntu Groovy, liburing replaces libaio -if ! apt-cache madison liburing-dev | grep 'liburing-dev' >/dev/null 2>&1 -then - sed 's/liburing-dev/libaio-dev/g' -i debian/control - sed '/-DIGNORE_AIO_CHECK=YES/d' -i debian/rules - sed '/-DWITH_URING=yes/d' -i debian/rules -fi - -# From Debian Buster/Ubuntu Focal onwards libpmem-dev is available -# Don't reference it when built in distro releases that lack it -if ! apt-cache madison libpmem-dev | grep 'libpmem-dev' >/dev/null 2>&1 -then - sed '/libpmem-dev/d' -i debian/control - sed '/-DWITH_PMEM=yes/d' -i debian/rules -fi - # Adjust changelog, add new version echo "Incrementing changelog and starting build scripts" diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index cbd6bd5fc47..c5fa28e47b1 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -7,7 +7,7 @@ include: # Override Salsa-CI with MariaDB specific variations variables: DEB_BUILD_OPTIONS: "nocheck noautodbgsym" - RELEASE: bullseye + RELEASE: sid SALSA_CI_DISABLE_REPROTEST: 1 SALSA_CI_DISABLE_MISSING_BREAKS: 0 SALSA_CI_DISABLE_RC_BUGS: 1 @@ -20,8 +20,8 @@ stages: - provisioning - build - test - - upgrade in Bullseye - - upgrade from Buster/Stretch + - upgrade in Sid + - upgrade from Bullseye/Buster/Stretch - upgrade extras - test extras - publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used @@ -46,9 +46,10 @@ build: - ccache -s # Show ccache stats to validate it worked - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} -# build jobs often needs more than default GitLab timeout (1h) -.build-package: - timeout: 3h +build bullseye-backports: + extends: .build-package + variables: + RELEASE: bullseye-backports build buster-backports: extends: .build-package @@ -99,14 +100,14 @@ blhc: dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb' mysql --skip-column-names -e "select @@version, @@version_comment" # Show version - mysql --table -e "SHOW DATABASES;" # List databases before upgrade + mysql --table -e 'SHOW DATABASES;' # List databases before upgrade mysql --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mysql --table -e "SELECT * FROM plugin;" mysql mysql --table -e "SHOW PLUGINS;" mysql -.test-enable-bullseye-repos: &test-enable-bullseye-repos | - # Replace any old repos with just Bullseye - echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list +.test-enable-sid-repos: &test-enable-sid-repos | + # Replace any old repos with just Sid + echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list # Upgrade minimal stack first apt-get update apt-get install -y apt @@ -124,7 +125,7 @@ blhc: cp -ra /etc/mysql debug/etc-mysql cp -ra /var/log/mysql debug/var-log-mysql mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version - mariadb --table -e "SHOW DATABASES;" # List databases + mariadb --table -e 'SHOW DATABASES;' # List databases mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mariadb --table -e "SELECT * FROM plugin;" mysql mariadb --table -e "SHOW PLUGINS;" mysql @@ -261,7 +262,7 @@ mariadb-10.3 Buster to mariadb-10.6 upgrade: - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*' # Verify installation of MariaDB from Buster - *test-verify-initial - - *test-enable-bullseye-repos + - *test-enable-sid-repos - *test-install - service mysql status - *test-verify-final @@ -288,7 +289,8 @@ mariadb-10.1 Stretch to mariadb-10.6 upgrade: - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' # Verify installation of MariaDB from Stretch - *test-verify-initial - - *test-enable-bullseye-repos + - apt-get remove -y manpages # Workaround for Bug#99375 + - *test-enable-sid-repos - *test-install - service mysql status - *test-verify-final @@ -402,8 +404,41 @@ build mariadbclient consumer Python-MySQLdb: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -default-libmysqlclient-dev Bullseye upgrade: - stage: upgrade in Bullseye +libmysql* to libmariadb* upgrade: + stage: upgrade in Sid + needs: + - job: build + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - *test-prepare-container + # Install all libmysql* available in Debian unstable + - apt-get install -y pkg-config libmysqlclient-dev + - pkg-config --list-all + - pkg-config --cflags mysqlclient # mysqlclient.pc from original package + - apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb + - pkg-config --list-all + - apt-get install -y ./libmariadb-dev_*.deb + - pkg-config --list-all + - apt-get install -y ./libmariadb-dev-compat_*.deb + - pkg-config --cflags mysqlclient # mysqlclient.pc from compat package + - pkg-config --list-all + - apt-get install -y ./libmariadbd19_*.deb + - pkg-config --list-all + - apt-get install -y ./libmariadbd-dev_*.deb + - pkg-config --list-all + - apt-get install -y default-libmysqlclient-dev default-libmysqld-dev + - *test-verify-libs + except: + variables: + - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ + +default-libmysqlclient-dev Sid upgrade: + stage: upgrade in Sid needs: - job: build image: debian:${RELEASE} @@ -423,7 +458,7 @@ default-libmysqlclient-dev Bullseye upgrade: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ default-libmysqlclient-dev Buster upgrade: - stage: upgrade from Buster/Stretch + stage: upgrade from Bullseye/Buster/Stretch needs: - job: build image: debian:buster @@ -436,7 +471,7 @@ default-libmysqlclient-dev Buster upgrade: - *test-prepare-container - apt-get install -y pkg-config default-libmysqlclient-dev - pkg-config --list-all - - *test-enable-bullseye-repos + - *test-enable-sid-repos - *test-install-all-libs - *test-verify-libs except: @@ -444,7 +479,7 @@ default-libmysqlclient-dev Buster upgrade: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ default-libmysqlclient-dev Stretch upgrade: - stage: upgrade from Buster/Stretch + stage: upgrade from Bullseye/Buster/Stretch needs: - job: build image: debian:stretch @@ -457,7 +492,8 @@ default-libmysqlclient-dev Stretch upgrade: - *test-prepare-container - apt-get install -y pkg-config default-libmysqlclient-dev - pkg-config --list-all - - *test-enable-bullseye-repos + - apt-get remove -y manpages # Workaround for Bug#99375 + - *test-enable-sid-repos - *test-install-all-libs - *test-verify-libs except: @@ -465,7 +501,7 @@ default-libmysqlclient-dev Stretch upgrade: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ mariadb-connector-c Stretch upgrade: - stage: upgrade from Buster/Stretch + stage: upgrade from Bullseye/Buster/Stretch needs: - job: build image: debian:stretch @@ -478,7 +514,8 @@ mariadb-connector-c Stretch upgrade: - *test-prepare-container - apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat - pkg-config --list-all - - *test-enable-bullseye-repos + - apt-get remove -y manpages # Workaround for Bug#99375 + - *test-enable-sid-repos - *test-install-all-libs - *test-verify-libs except: @@ -531,14 +568,14 @@ mysql-8.0 Focal to mariadb-10.6 upgrade: # Add Ubuntu Focal archive keys and repository - apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32 - - echo "deb http://archive.ubuntu.com/ubuntu/ focal main restricted" > /etc/apt/sources.list.d/ubuntu.list + - echo 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted' > /etc/apt/sources.list.d/ubuntu.list - apt-get update # First install often fail due to bug in mysql-8.0 - apt-get install -y mysql-server 'libmysqlc*' || true - sleep 10 && apt-get install -f - *test-verify-initial # Enable backports to make galera-4 available - - echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list && apt-get update + - echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list && apt-get update - *test-install - service mysql status - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server @@ -553,7 +590,7 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: stage: upgrade extras needs: - job: build - image: debian:${RELEASE} + image: debian:sid artifacts: when: always name: "$CI_BUILD_NAME" @@ -563,14 +600,14 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: - *test-prepare-container - apt install -y curl - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/repo/10.5/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list + - echo 'deb http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list - apt-get update # The 10.5.9 release is missing mariadb-plugin-columnstore, define all other packages but it to avoid hitting the error: # The following packages have unmet dependencies: # mariadb-plugin-columnstore : Depends: mariadb-server-10.5 (= 1:10.5.8+maria~sid) but 1:10.5.9+maria~sid is to be installed - apt-get install -y libmariadb3 'libmariadb-*' 'libmariadbd*' 'mariadb-c*' 'mariadb-b*' 'mariadb-s*' 'mariadb-t*' 'mariadb-plugin-con*' 'mariadb-plugin-cr*' 'mariadb-plugin-g*' 'mariadb-plugin-m*' 'mariadb-plugin-o*' 'mariadb-plugin-s*' # Once 10.5.10 is out, revert back to: - # Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Bullseye, so cannot use wildcard that would include it + # Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Sid, so cannot use wildcard that would include it #- apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*' - *test-verify-initial # Install MariaDB built in this commit @@ -583,7 +620,6 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: - *test-verify-final variables: GIT_STRATEGY: none - RELEASE: bullseye # Last Debian release that MariaDB.org publised 10.5 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -591,8 +627,8 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: mariadb.org-10.4 to mariadb-10.6 upgrade: stage: upgrade extras needs: - - job: build buster-backports - image: debian:${RELEASE} + - job: build + image: debian:sid artifacts: when: always name: "$CI_BUILD_NAME" @@ -600,9 +636,9 @@ mariadb.org-10.4 to mariadb-10.6 upgrade: - ${WORKING_DIR}/debug script: - *test-prepare-container - - apt install -y curl + - apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/repo/10.4/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list + - echo 'deb http://mirror.one.com/mariadb/repo/10.4/debian sid main' > /etc/apt/sources.list.d/mariadb.list - apt-get update - apt-get install -y mariadb-server-10.4 # MariaDB.org version of 10.4 and early 10.5 do not install an init file, so @@ -616,7 +652,6 @@ mariadb.org-10.4 to mariadb-10.6 upgrade: - *test-verify-final variables: GIT_STRATEGY: none - RELEASE: buster # Last Debian release that MariaDB.org publised 10.4 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -624,8 +659,8 @@ mariadb.org-10.4 to mariadb-10.6 upgrade: mariadb.org-10.3 to mariadb-10.6 upgrade: stage: upgrade extras needs: - - job: build buster-backports - image: debian:${RELEASE} + - job: build + image: debian:sid artifacts: when: always name: "$CI_BUILD_NAME" @@ -635,21 +670,23 @@ mariadb.org-10.3 to mariadb-10.6 upgrade: - *test-prepare-container - apt install -y curl - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/repo/10.3/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list + - echo 'deb http://mirror.one.com/mariadb/repo/10.3/debian sid main' > /etc/apt/sources.list.d/mariadb.list - apt-get update - apt-get install -y mariadb-server-10.3 - - *test-verify-initial - # Enable backports to make galera-4 available - - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update + # Verify initial state before upgrade + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3 + - mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf + - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql + - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql - *test-install - service mysql status - # Give the mariadb-upgrade plenty of time to complete, otherwise next commands - # fail on non-existing mariadb.sys user - - sleep 15 + - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - *test-verify-final variables: GIT_STRATEGY: none - RELEASE: buster # Last Debian release that MariaDB.org publised 10.3 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -657,8 +694,8 @@ mariadb.org-10.3 to mariadb-10.6 upgrade: mariadb.org-10.2 to mariadb-10.6 upgrade: stage: upgrade extras needs: - - job: build stretch-backports - image: debian:${RELEASE} + - job: build + image: debian:sid artifacts: when: always name: "$CI_BUILD_NAME" @@ -666,42 +703,25 @@ mariadb.org-10.2 to mariadb-10.6 upgrade: - ${WORKING_DIR}/debug script: - *test-prepare-container - - apt install -y curl apt-transport-https + - apt install -y curl - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/repo/10.2/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list + - echo 'deb http://mirror.one.com/mariadb/repo/10.2/debian sid main' > /etc/apt/sources.list.d/mariadb.list - apt-get update - apt-get install -y mariadb-server-10.2 # Verify initial state before upgrade - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - service mysql status # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3 - - | - mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SHOW DATABASES;" - mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost;" - mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS;" - # Enable backports to make libzstd1, rocksdb-tools - - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/backports.list - # Enable backports to make galera-4 available - - echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list.d/backports.list && apt-get update - # Increase default backports priority policy from '100' to '500' so it can actually be used - - | - cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies - Package: * - Pin: release n=stretch-* - Pin-Priority: 500 - EOF - # Remove plugin that requires libcurl4, not available in Debian Stretch - - rm mariadb-plugin-s3*.deb + - mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf + - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost" + - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.plugin; SHOW PLUGINS" - *test-install - service mysql status - # Give the mariadb-upgrade plenty of time to complete, otherwise next commands - # fail on non-existing mariadb.sys user - - sleep 15 + - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - *test-verify-final variables: GIT_STRATEGY: none - RELEASE: stretch # Last Debian release that MariaDB.org publised 10.2 binaries for except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ @@ -720,16 +740,16 @@ mysql.com-5.7 to mariadb-10.6 upgrade: - *test-prepare-container - | apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 467B942D3A79BD29 - echo "deb https://repo.mysql.com/apt/debian/ buster mysql-5.7" > /etc/apt/sources.list.d/mysql.list + apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 8C718D3B5072E1F5 + echo 'deb https://repo.mysql.com/apt/debian/ buster mysql-5.7' > /etc/apt/sources.list.d/mysql.list apt-get update apt-get install -y 'mysql*' 'libmysqlc*' - *test-verify-initial # Enable backports to make galera-4 available - - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update + - echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update - *test-install - service mysql status - - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server + - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - *test-verify-final variables: GIT_STRATEGY: none @@ -752,16 +772,16 @@ percona-xtradb-5.7 to mariadb-10.6 upgrade (MDEV-22679): - | apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 9334A25F8507EFA5 - echo "deb https://repo.percona.com/apt/ buster main" > /etc/apt/sources.list.d/mysql.list + echo 'deb https://repo.percona.com/apt/ buster main' > /etc/apt/sources.list.d/mysql.list apt-get update apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client - service mysql status - *test-verify-initial # Enable backports to make galera-4 available - - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update + - echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update - *test-install - service mysql status - - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server + - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - *test-verify-final variables: GIT_STRATEGY: none From 63f76d3b98ea5bc829c0bc08830ec3a9267915c4 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 18 Mar 2022 17:36:53 +1100 Subject: [PATCH 29/30] Deb: enable pmem on riscv64 --- debian/control | 2 +- debian/rules | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index de5dc51d906..7f0d88e991c 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,7 @@ Build-Depends: bison, libnuma-dev [linux-any], libpam0g-dev, libpcre2-dev, - libpmem-dev [amd64 arm64 ppc64el], + libpmem-dev [amd64 arm64 ppc64el riscv64], libsnappy-dev, libssl-dev, libssl-dev:native, diff --git a/debian/rules b/debian/rules index aa778f209f3..d3d7d5f8934 100755 --- a/debian/rules +++ b/debian/rules @@ -60,7 +60,7 @@ endif # Only attempt to build with PMEM on archs that have package libpmem-dev available # See https://packages.debian.org/search?searchon=names&keywords=libpmem-dev -ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64 ppc64el)) +ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64 ppc64el riscv64)) CMAKEFLAGS += -DWITH_PMEM=yes endif From 13b97880bd8f6901225a1f8d6ff2eb6ba9303ceb Mon Sep 17 00:00:00 2001 From: Tuukka Pasanen Date: Tue, 22 Mar 2022 09:04:37 +0200 Subject: [PATCH 30/30] MDEV-27965: MariaDB needs at least libfmt version 7.0 Add requirement in Debian control file for libfmt 7.0 which is needed for building MariaDB. This supports the SFORMAT function added in MDEV-25015. + autobake-deb.sh so old Debian/Ubuntu still bundle the libfmt pulled in from upstream. Closes #2062 --- debian/autobake-deb.sh | 8 ++++++++ debian/control | 1 + 2 files changed, 9 insertions(+) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 0c4fa1fb85e..706f4655570 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -65,6 +65,12 @@ disable_pmem() sed '/-DWITH_PMEM=yes/d' -i debian/rules } +disable_libfmt() +{ + # 0.7+ required + sed '/libfmt-dev/d' -i debian/control +} + architecture=$(dpkg-architecture -q DEB_BUILD_ARCH) CODENAME="$(lsb_release -sc)" @@ -77,6 +83,7 @@ case "${CODENAME}" in disable_pmem ;& buster) + disable_libfmt replace_uring_with_aio if [ ! "$architecture" = amd64 ] then @@ -106,6 +113,7 @@ case "${CODENAME}" in ;& focal) replace_uring_with_aio + disable_libfmt ;& impish|jammy) # mariadb-plugin-rocksdb s390x not supported by us (yet) diff --git a/debian/control b/debian/control index fb290fbe2e9..61000bd2432 100644 --- a/debian/control +++ b/debian/control @@ -23,6 +23,7 @@ Build-Depends: bison, libcurl4-openssl-dev | libcurl4-dev, libedit-dev, libedit-dev:native, + libfmt-dev (>= 7.0.0), libjemalloc-dev [linux-any], libjudy-dev, libkrb5-dev,