From 992d85025cf7c60038587e469e5de5ca13fcc5d3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 6 Mar 2025 10:03:04 +0100 Subject: [PATCH 01/15] cmake CMP0177 policy, no dot in the install destination path --- mysql-test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt index 7487e301df5..bb467b8ec22 100644 --- a/mysql-test/CMakeLists.txt +++ b/mysql-test/CMakeLists.txt @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA -INSTALL_MYSQL_TEST("." ".") +INSTALL_MYSQL_TEST("." "") IF(NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) # Enable running mtr from build directory From 6aa860be27480db134a3c71065b9b47d15b72674 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 11 Mar 2025 11:22:00 +0100 Subject: [PATCH 02/15] MDEV-36268 mariadb-dump used wrong quoting character use ' not " and use quote_for_equal() --- client/mysqldump.c | 15 +++++++---- mysql-test/main/mysqldump-system.result | 6 ++--- mysql-test/main/mysqldump.result | 33 +++++++++++++++++++++++++ mysql-test/main/mysqldump.test | 9 +++++++ 4 files changed, 55 insertions(+), 8 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 1cb41b66e30..e7264c07ad9 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -2098,7 +2098,7 @@ static char *quote_for_equal(const char *name, char *buff) *to++='\\'; } if (*name == '\'') - *to++= '\\'; + *to++= '\''; *to++= *name++; } to[0]= '\''; @@ -3612,7 +3612,7 @@ static void dump_trigger_old(FILE *sql_file, MYSQL_RES *show_triggers_rs, fprintf(sql_file, "DELIMITER ;;\n" - "/*!50003 SET SESSION SQL_MODE=\"%s\" */;;\n" + "/*!50003 SET SESSION SQL_MODE='%s' */;;\n" "/*!50003 CREATE */ ", (*show_trigger_row)[6]); @@ -4578,17 +4578,19 @@ static int dump_all_users_roles_and_grants() return 1; while ((row= mysql_fetch_row(tableres))) { + char buf[200]; if (opt_replace_into) /* Protection against removing the current import user */ /* MySQL-8.0 export capability */ fprintf(md_result_file, "DELIMITER |\n" - "/*M!100101 IF current_user()=\"%s\" THEN\n" + "/*M!100101 IF current_user()=%s THEN\n" " SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001," " MESSAGE_TEXT=\"Don't remove current user %s'\";\n" "END IF */|\n" "DELIMITER ;\n" - "/*!50701 DROP USER IF EXISTS %s */;\n", row[0], row[0], row[0]); + "/*!50701 DROP USER IF EXISTS %s */;\n", + quote_for_equal(row[0],buf), row[0], row[0]); if (dump_create_user(row[0])) result= 1; /* if roles exist, defer dumping grants until after roles created */ @@ -6698,6 +6700,7 @@ static my_bool get_view_structure(char *table, char* db) char *result_table, *opt_quoted_table; char table_buff[NAME_LEN*2+3]; char table_buff2[NAME_LEN*2+3]; + char temp_buff[NAME_LEN*2 + 3], temp_buff2[NAME_LEN*2 + 3]; char query[QUERY_LENGTH]; FILE *sql_file= md_result_file; DBUG_ENTER("get_view_structure"); @@ -6758,7 +6761,9 @@ static my_bool get_view_structure(char *table, char* db) "SELECT CHECK_OPTION, DEFINER, SECURITY_TYPE, " " CHARACTER_SET_CLIENT, COLLATION_CONNECTION " "FROM information_schema.views " - "WHERE table_name=\"%s\" AND table_schema=\"%s\"", table, db); + "WHERE table_name=%s AND table_schema=%s", + quote_for_equal(table, temp_buff2), + quote_for_equal(db, temp_buff)); if (mysql_query(mysql, query)) { diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result index e011132b0f9..14cbc7eb5c0 100644 --- a/mysql-test/main/mysqldump-system.result +++ b/mysql-test/main/mysqldump-system.result @@ -176,21 +176,21 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DELIMITER | -/*M!100101 IF current_user()="'mariadb.sys'@'localhost'" THEN +/*M!100101 IF current_user()='''mariadb.sys''@''localhost''' THEN SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'mariadb.sys'@'localhost''"; END IF */| DELIMITER ; /*!50701 DROP USER IF EXISTS 'mariadb.sys'@'localhost' */; CREATE /*M!100103 OR REPLACE */ USER `mariadb.sys`@`localhost` PASSWORD EXPIRE; DELIMITER | -/*M!100101 IF current_user()="'root'@'localhost'" THEN +/*M!100101 IF current_user()='''root''@''localhost''' THEN SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'root'@'localhost''"; END IF */| DELIMITER ; /*!50701 DROP USER IF EXISTS 'root'@'localhost' */; CREATE /*M!100103 OR REPLACE */ USER `root`@`localhost`; DELIMITER | -/*M!100101 IF current_user()="'USER'@'%'" THEN +/*M!100101 IF current_user()='''USER''@''%''' THEN SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'USER'@'%''"; END IF */| DELIMITER ; diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index 93e0f9ee89c..8e8e342d833 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -6590,4 +6590,37 @@ CREATE TABLE `t1` ( /*!40101 SET character_set_client = @saved_cs_client */; ERROR at line 9: Not allowed in the sandbox mode drop table t1; +# +# MDEV-36268 mariadb-dump used wrong quoting character +# +create table t1 (a int); +create view `v'1"2` as select * from t1 with check option; +/*M!999999\- enable the sandbox mode */ +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8mb4; +/*!50001 CREATE VIEW `v'1"2` AS SELECT + 1 AS `a` */; +SET character_set_client = @saved_cs_client; +/*!50001 DROP VIEW IF EXISTS `v'1"2`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `v'1"2` AS select `t1`.`a` AS `a` from `t1` */ +/*!50002 WITH CASCADED CHECK OPTION */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +drop view `v'1"2`; +drop table t1; # End of 10.5 tests diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test index 00569a9db7a..58790c15fd2 100644 --- a/mysql-test/main/mysqldump.test +++ b/mysql-test/main/mysqldump.test @@ -3023,4 +3023,13 @@ EOF --remove_file $MYSQLTEST_VARDIR/tmp/mdev33727.sql drop table t1; +--echo # +--echo # MDEV-36268 mariadb-dump used wrong quoting character +--echo # +create table t1 (a int); +create view `v'1"2` as select * from t1 with check option; # "' +--exec $MYSQL_DUMP --compact test +drop view `v'1"2`; # "' +drop table t1; + --echo # End of 10.5 tests From 1cc138958e312e4b252691a97f9ee2eafec0de1f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 16 Mar 2025 11:26:30 +0100 Subject: [PATCH 03/15] MDEV-35727 main.mysql-interactive fails in buildbot on debian fix failing main.mysql-interactive * increase socat EOF timeout from 0.5s to 10s * add an explicit exit to not wait 10s (or even 0.5s - the test now finishes in 0.15s) * enable it for libedit --- mysql-test/main/mysql-interactive.result | 4 +++- mysql-test/main/mysql-interactive.test | 11 ++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/mysql-test/main/mysql-interactive.result b/mysql-test/main/mysql-interactive.result index a18c018b932..cdb0931418a 100644 --- a/mysql-test/main/mysql-interactive.result +++ b/mysql-test/main/mysql-interactive.result @@ -4,6 +4,7 @@ delimiter $ select 1; $ +exit Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is X Server version: Y @@ -21,4 +22,5 @@ MariaDB [(none)]> select 1; +---+ 1 row in set -MariaDB [(none)]> \ No newline at end of file +MariaDB [(none)]> exit +Bye diff --git a/mysql-test/main/mysql-interactive.test b/mysql-test/main/mysql-interactive.test index 0051d8e58c6..e387f937226 100644 --- a/mysql-test/main/mysql-interactive.test +++ b/mysql-test/main/mysql-interactive.test @@ -6,23 +6,16 @@ source include/not_windows.inc; # this would need an instrumented ncurses library source include/not_msan.inc; -error 0,1; -exec $MYSQL -V|grep -q readline; -if ($sys_errno == 1) -{ - # strangely enough - skip does not work with libedit; -} - write_file $MYSQL_TMP_DIR/mysql_in; delimiter $ select 1; $ +exit EOF let TERM=dumb; replace_regex /id is \d+/id is X/ /Server version: .*/Server version: Y/ / \(\d+\.\d+ sec\)//; error 0,127; -exec socat EXEC:"$MYSQL",pty STDIO < $MYSQL_TMP_DIR/mysql_in; +exec socat -t10 EXEC:"$MYSQL",pty STDIO < $MYSQL_TMP_DIR/mysql_in; if ($sys_errno == 127) { remove_file $MYSQL_TMP_DIR/mysql_in; From bca07a6f88db9278d00eb460c8c1a79f05e867cd Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 21 Mar 2025 16:59:34 +0100 Subject: [PATCH 04/15] cleanup: mysql_upgrade.test make it strict, don't just ignore all the pesky numbers it shows, replace the current mariadb version with X.Y.Z, replace first two components of the current version with X.Y replace the first component (or first-1, if the second is 0) with X fix perl to write mysql_upgrade_info files in binary mode, otherwise mariadb-upgrade reads them incorrectly on Windows. --- mysql-test/main/mysql_upgrade.result | 23 ++++++++++++----------- mysql-test/main/mysql_upgrade.test | 25 +++++++++++++++++-------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index bc33cc75cfa..8c3d7354604 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -47,7 +47,8 @@ test Phase 7/7: Running 'FLUSH PRIVILEGES' OK Run it again - should say already completed -This installation of MariaDB is already upgraded to VERSION.There is no need to run mysql_upgrade again for VERSION. +This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. You can use --force if you still want to run mysql_upgrade Force should run it regardless of whether it has been run before Phase 1/7: Checking and upgrading mysql database @@ -776,11 +777,11 @@ FLUSH PRIVILEGES; # # MDEV-27279: mariadb_upgrade add --check-if-upgrade-is-needed # -This installation of MariaDB is already upgraded to MariaDB . -There is no need to run mysql_upgrade again for MariaDB . +This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. Looking for 'mariadb' as: mariadb -This installation of MariaDB is already upgraded to MariaDB . -There is no need to run mysql_upgrade again for MariaDB . +This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. # # MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it # @@ -790,17 +791,17 @@ Empty or non existent ...mysql_upgrade_info. Assuming mysql_upgrade has to be ru # MDEV-27279: mariadb_upgrade check-if-upgrade with minor version change # Looking for 'mariadb' as: mariadb -This installation of MariaDB is already upgraded to MariaDB . -There is no need to run mysql_upgrade again for MariaDB . -This installation of MariaDB is already upgraded to MariaDB . -There is no need to run mysql_upgrade again for MariaDB . +This installation of MariaDB is already upgraded to X.Y.0-MariaDB. +There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. +This installation of MariaDB is already upgraded to X.Y.0-MariaDB. +There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. You can use --force if you still want to run mysql_upgrade # # MDEV-27279: mariadb_upgrade check-if-upgrade with major version change # -Major version upgrade detected from MariaDB to MariaDB . Check required! +Major version upgrade detected from X.0.99 to X.Y.Z-MariaDB. Check required! Looking for 'mysql' as: mysql -Major version upgrade detected from MariaDB to MariaDB . Check required! +Major version upgrade detected from X.0.99 to X.Y.Z-MariaDB. Check required! drop table mysql.global_priv; rename table mysql.global_priv_bak to mysql.global_priv; # End of 10.2 tests diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test index 647106facf1..1a7b6ac85f3 100644 --- a/mysql-test/main/mysql_upgrade.test +++ b/mysql-test/main/mysql_upgrade.test @@ -4,6 +4,10 @@ -- source include/have_partition.inc -- source include/no_valgrind_without_big.inc +let majorminor=`select substring_index(version(), '.', 2)`; +# for major upgrade test, see below +let major=`select substring_index(version(), '.', 1) - (version() like '%.0.%')`; + set sql_mode=""; # @@ -18,7 +22,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; file_exists $MYSQLD_DATADIR/mysql_upgrade_info; --echo Run it again - should say already completed ---replace_regex /upgraded to [^\n].*/upgraded to VERSION./ /again for [^\n]*/again for VERSION./ +--replace_result $MYSQL_SERVER_VERSION X.Y.Z-MariaDB --exec $MYSQL_UPGRADE 2>&1 # It should have created a file in the MySQL Servers datadir @@ -288,10 +292,11 @@ FLUSH PRIVILEGES; --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / +--replace_result $MYSQL_SERVER_VERSION X.Y.Z-MariaDB --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mariadb.* as:[^\n]*/'mariadb' as: mariadb/ +--replace_result $MYSQL_SERVER_VERSION X.Y.Z-MariaDB +--replace_regex /'mariadb.* as:[^\n]*/'mariadb' as: mariadb/ --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose @@ -319,16 +324,18 @@ perl; my $file= $ENV{'DATADIR'} or die "MYSQLD_DATADIR not set"; $ver =~ s/^(\d*)\.(\d*).(\d*)(.*)/$1.$2.0$4/; open(FILE, ">$file/mysql_upgrade_info") or die "Failed to open $file"; + binmode FILE; print FILE "$ver\n"; close(FILE); EOF --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mariadb.* as:[^\n]*/'mariadb' as: mariadb/ +--replace_result $MYSQL_SERVER_VERSION X.Y.Z-MariaDB $majorminor X.Y +--replace_regex /'mariadb.* as:[^\n]*/'mariadb' as: mariadb/ --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / +--replace_result $MYSQL_SERVER_VERSION X.Y.Z-MariaDB $majorminor X.Y --exec $MYSQL_UPGRADE --remove_file $MYSQLD_DATADIR/mysql_upgrade_info @@ -343,16 +350,18 @@ let DATADIR= $MYSQLD_DATADIR; perl; my $ver= $ENV{'MYSQL_SERVER_VERSION'} or die "MYSQL_SERVER_VERSION not set"; my $file= $ENV{'DATADIR'} or die "MYSQLD_DATADIR not set"; - $ver =~ s/^(\d*)\.(\d*).(\d*)(.*)/$1.0.$3$4/; + $ver =~ s/^(\d*)\.(\d*).(\d*)(.*)/$1.0.99/; open(FILE, ">$file/mysql_upgrade_info") or die "Failed to open $file"; + binmode FILE; print FILE "$ver\n"; close(FILE); EOF --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / +--replace_result $MYSQL_SERVER_VERSION X.Y.Z-MariaDB $major X --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mariadb.* as:[^\n]*/'mysql' as: mysql/ +--replace_result $MYSQL_SERVER_VERSION X.Y.Z-MariaDB $major X +--replace_regex /'mariadb.* as:[^\n]*/'mysql' as: mysql/ --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose --remove_file $MYSQLD_DATADIR/mysql_upgrade_info drop table mysql.global_priv; From 04771ff6b1dae3ea1c35029744cfbbf2b6da4538 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 21 Mar 2025 17:52:43 +0100 Subject: [PATCH 05/15] MDEV-28209 New mysql_upgrade message on minor-only upgrades is confusing --- client/mysql_upgrade.c | 14 +++++++++----- mysql-test/main/mysql_upgrade.result | 10 +++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index f81cff2797c..3afe24e2dd7 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -855,8 +855,7 @@ static int upgrade_already_done(int silent) s= strchr(version, '.'); s= strchr(s + 1, '.'); - if (strncmp(upgrade_from_version, version, - (size_t)(s - version + 1))) + if (strncmp(upgrade_from_version, version, (size_t)(s - version + 1))) { if (calc_server_version(upgrade_from_version) <= MYSQL_VERSION_ID) { @@ -870,9 +869,14 @@ static int upgrade_already_done(int silent) } if (!silent) { - verbose("This installation of MariaDB is already upgraded to %s.\n" - "There is no need to run mysql_upgrade again for %s.", - upgrade_from_version, version); + if (strcmp(upgrade_from_version, version)) + verbose("This installation of MariaDB is already upgraded to %s.\n" + "There is no need to run mysql_upgrade again for %s, because " + "they're both %.*s.", + upgrade_from_version, version, (int)(s - version), version); + else + verbose("This installation of MariaDB is already upgraded to %s.\n" + "There is no need to run mysql_upgrade again.", version); if (!opt_check_upgrade) verbose("You can use --force if you still want to run mysql_upgrade"); } diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index 8c3d7354604..33f1df35feb 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -48,7 +48,7 @@ Phase 7/7: Running 'FLUSH PRIVILEGES' OK Run it again - should say already completed This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. -There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again. You can use --force if you still want to run mysql_upgrade Force should run it regardless of whether it has been run before Phase 1/7: Checking and upgrading mysql database @@ -778,10 +778,10 @@ FLUSH PRIVILEGES; # MDEV-27279: mariadb_upgrade add --check-if-upgrade-is-needed # This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. -There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again. Looking for 'mariadb' as: mariadb This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. -There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again. # # MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it # @@ -792,9 +792,9 @@ Empty or non existent ...mysql_upgrade_info. Assuming mysql_upgrade has to be ru # Looking for 'mariadb' as: mariadb This installation of MariaDB is already upgraded to X.Y.0-MariaDB. -There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again for X.Y.Z-MariaDB, because they're both X.Y. This installation of MariaDB is already upgraded to X.Y.0-MariaDB. -There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. +There is no need to run mysql_upgrade again for X.Y.Z-MariaDB, because they're both X.Y. You can use --force if you still want to run mysql_upgrade # # MDEV-27279: mariadb_upgrade check-if-upgrade with major version change From bc13c8e4ae3cf8335f569dc0cff11d655e136f86 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 26 Mar 2025 12:32:34 +0100 Subject: [PATCH 06/15] MDEV-36078 PCRE2 10.45 breaks main.func_regexp_pcre due to change in PCRE 10.45 is correct, update test results to match. allow builds with <10.45 too (for old distros) but remove the buggy test --- cmake/pcre.cmake | 4 ++-- mysql-test/main/func_regexp_pcre.result | 28 +------------------------ mysql-test/main/func_regexp_pcre.test | 2 +- 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index db685c3572d..3d84fd145f6 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -54,8 +54,8 @@ MACRO(BUNDLE_PCRE2) ExternalProject_Add( pcre2 PREFIX "${dir}" - URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.zip" - URL_MD5 dfab8313154b3377a6959c3b6377841e + URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.zip" + URL_MD5 873da56c6469ec207ca5c5ae9688b83a INSTALL_COMMAND "" CMAKE_ARGS "-DCMAKE_WARN_DEPRECATED=FALSE" diff --git a/mysql-test/main/func_regexp_pcre.result b/mysql-test/main/func_regexp_pcre.result index 57490009be3..d9254008378 100644 --- a/mysql-test/main/func_regexp_pcre.result +++ b/mysql-test/main/func_regexp_pcre.result @@ -60,7 +60,7 @@ INSERT INTO t1 VALUES ('1'),('௨'); INSERT INTO t2 VALUES ('\\p{Cyrillic}'),('\\p{Greek}'),('\\p{Latin}'); INSERT INTO t2 VALUES ('\\p{Han}'),('\\p{Hangul}'); INSERT INTO t2 VALUES ('\\p{Sinhala}'), ('\\p{Tamil}'); -INSERT INTO t2 VALUES ('\\p{L}'),('\\p{Ll}'),('\\p{Lu}'),('\\p{L&}'); +INSERT INTO t2 VALUES ('\\p{L}'), /* buggy before v10.45 ('\\p{Ll}'),('\\p{Lu}'),*/ ('\\p{L&}'); INSERT INTO t2 VALUES ('[[:alpha:]]'),('[[:digit:]]'); SELECT class, ch, ch RLIKE class FROM t1, t2 ORDER BY class, BINARY ch; class ch ch RLIKE class @@ -168,32 +168,6 @@ class ch ch RLIKE class \p{Latin} ප 0 \p{Latin} 㐗 0 \p{Latin} 갷 0 -\p{Ll} 1 0 -\p{Ll} A 0 -\p{Ll} a 1 -\p{Ll} À 0 -\p{Ll} à 1 -\p{Ll} Σ 0 -\p{Ll} σ 1 -\p{Ll} Я 0 -\p{Ll} я 1 -\p{Ll} ௨ 0 -\p{Ll} ප 0 -\p{Ll} 㐗 0 -\p{Ll} 갷 0 -\p{Lu} 1 0 -\p{Lu} A 1 -\p{Lu} a 0 -\p{Lu} À 1 -\p{Lu} à 0 -\p{Lu} Σ 1 -\p{Lu} σ 0 -\p{Lu} Я 1 -\p{Lu} я 0 -\p{Lu} ௨ 0 -\p{Lu} ප 0 -\p{Lu} 㐗 0 -\p{Lu} 갷 0 \p{L} 1 0 \p{L} A 1 \p{L} a 1 diff --git a/mysql-test/main/func_regexp_pcre.test b/mysql-test/main/func_regexp_pcre.test index c194e9aefd0..88baee071d1 100644 --- a/mysql-test/main/func_regexp_pcre.test +++ b/mysql-test/main/func_regexp_pcre.test @@ -41,7 +41,7 @@ INSERT INTO t1 VALUES ('1'),('௨'); INSERT INTO t2 VALUES ('\\p{Cyrillic}'),('\\p{Greek}'),('\\p{Latin}'); INSERT INTO t2 VALUES ('\\p{Han}'),('\\p{Hangul}'); INSERT INTO t2 VALUES ('\\p{Sinhala}'), ('\\p{Tamil}'); -INSERT INTO t2 VALUES ('\\p{L}'),('\\p{Ll}'),('\\p{Lu}'),('\\p{L&}'); +INSERT INTO t2 VALUES ('\\p{L}'), /* buggy before v10.45 ('\\p{Ll}'),('\\p{Lu}'),*/ ('\\p{L&}'); INSERT INTO t2 VALUES ('[[:alpha:]]'),('[[:digit:]]'); SELECT class, ch, ch RLIKE class FROM t1, t2 ORDER BY class, BINARY ch; DROP TABLE t1, t2; From da20e4d8a57f0fd957edcaa50299173ccc8cac86 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 26 Mar 2025 22:44:42 +0100 Subject: [PATCH 07/15] Fix PCRE2 10.45 build on Windows as an external project PCRE2 10.45 sets cmake_minimum_required to version 3.15. With that, on MSVC, compile flags for choosing C runtime (/MT, /MD, etc.) are ignored. Instead, CMAKE_MSVC_RUNTIME_LIBRARY must be passed when building an external project for consistent linkage, if it creates a static library. --- cmake/os/Windows.cmake | 19 +++++++++++++++++++ cmake/pcre.cmake | 8 ++++++++ 2 files changed, 27 insertions(+) diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index 1a853349ae5..5edc214d613 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -129,6 +129,25 @@ IF(MSVC) MESSAGE(FATAL_ERROR "Invalid value ${MSVC_CRT_TYPE} for MSVC_CRT_TYPE, choose one of /MT,/MTd,/MD,/MDd ") ENDIF() + # CMake version 3.15 and later uses CMAKE_MSVC_RUNTIME_LIBRARY + # variable for our MSVC_CRT_TYPE. + # Set CMAKE_MSVC_RUNTIME_LIBRARY and pass to external projects + # it is important to keep the same CRT type when linking + # + # Translation rules MSVC_CRT_TYPE -> CMAKE_MSVC_RUNTIME_LIBRARY + # /MT -> MultiThreaded + # /MTd -> MultiThreadedDebug + # /MD -> MultiThreadedDLL + # /MDd -> MultiThreadedDebugDLL + + SET(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded) + IF(MSVC_CRT_TYPE MATCHES "d$") + STRING(APPEND CMAKE_MSVC_RUNTIME_LIBRARY Debug) + ENDIF() + IF(MSVC_CRT_TYPE MATCHES "D") + STRING(APPEND CMAKE_MSVC_RUNTIME_LIBRARY DLL) + ENDIF() + IF(MSVC_CRT_TYPE MATCHES "/MD") # Dynamic runtime (DLLs), need to install CRT libraries. SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT VCCRT) diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 3d84fd145f6..c203444ee04 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -51,6 +51,13 @@ MACRO(BUNDLE_PCRE2) ENDIF() ENDFOREACH() + IF(CMAKE_MSVC_RUNTIME_LIBRARY) + SET(CMAKE_MSVC_RUNTIME_LIBRARY_ARG + "-DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY}") + ELSE() + SET(CMAKE_MSVC_RUNTIME_LIBRARY_ARG) + ENDIF() + ExternalProject_Add( pcre2 PREFIX "${dir}" @@ -69,6 +76,7 @@ MACRO(BUNDLE_PCRE2) "-DCMAKE_C_FLAGS_RELEASE=${pcre2_flags_RELEASE}" "-DCMAKE_C_FLAGS_MINSIZEREL=${pcre2_flags_MINSIZEREL}" "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" + ${CMAKE_MSVC_RUNTIME_LIBRARY_ARG} ${stdlibs} ${byproducts} ) From 402595f138db92a3bf7e67f30e24f682e6c3ca82 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 31 Mar 2025 11:10:12 +0200 Subject: [PATCH 08/15] fix main.timezone test for DST --- mysql-test/main/timezone.result | 1 - mysql-test/main/timezone.test | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/mysql-test/main/timezone.result b/mysql-test/main/timezone.result index 67252038e72..3c3df8755c3 100644 --- a/mysql-test/main/timezone.result +++ b/mysql-test/main/timezone.result @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1; show variables like "system_time_zone"; Variable_name Value system_time_zone CET diff --git a/mysql-test/main/timezone.test b/mysql-test/main/timezone.test index cdc538540ba..91b4c83033e 100644 --- a/mysql-test/main/timezone.test +++ b/mysql-test/main/timezone.test @@ -7,13 +7,8 @@ disable_query_log; select FROM_UNIXTIME(24*3600); enable_query_log; -# Initialization ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - # The following is because of daylight saving time ---replace_result MEST CET MET CET +--replace_result MEST CET MET CET CEST CET show variables like "system_time_zone"; # From da9d575516e978e7df6a5bd16343f6ee33ee1a6e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 21 Mar 2025 19:31:47 +0100 Subject: [PATCH 09/15] MDEV-35653 Assertion `commit_trx' failed in int innobase_commit(handlerton*, THD*, bool) cherry-pick adc1beb8680f from 11.7 --- storage/innobase/handler/ha_innodb.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index d9919c5ed77..6dc1b6cdc1f 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -4653,10 +4653,9 @@ innobase_commit( ut_ad("invalid state" == 0); /* fall through */ case TRX_STATE_PREPARED: - ut_ad(commit_trx || trx->is_wsrep()); - ut_ad(thd_test_options(thd, OPTION_NOT_AUTOCOMMIT - | OPTION_BEGIN) - || trx->is_wsrep()); + ut_ad(commit_trx || + !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT + | OPTION_BEGIN)); /* fall through */ case TRX_STATE_ACTIVE: /* Transaction is deregistered only in a commit or a From 0b37c2e7a8d62d1879b91c8eadf72329f9afbdd7 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 14 Feb 2025 14:58:31 +0100 Subject: [PATCH 10/15] MDEV-36084 mariadb-hotcopy requires '--port' set for operation since 10.11 --- scripts/mysqlhotcopy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index d0821e663c4..601866c40c7 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -208,7 +208,7 @@ if ($opt{socket} and -S $opt{socket}) else { $dsn .= "host=" . $opt{host}; - if ($opt{host} ne "localhost") + if ($opt{host} ne "localhost" and $opt{port}) { $dsn .= ";port=". $opt{port}; } From 56b19ac03012be0d2dd0b612fcbeb13ef6fc5220 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 22 Mar 2025 21:40:06 +0100 Subject: [PATCH 11/15] MDEV-35953 mysql_stmt_errno() returns 0 after an error in mysql_stmt_execute() The goal of the fix for MDEV-34718 was to avoid Diagnostics_area::reset_diagnostics_area() changing DA_OK_BULK to DA_EMPTY for bulk operations. But it was too indiscriminative and also didn't reset DA_ERROR if the bulk operation was in progress. This was leaving Diagnostics_area in the inconsistent state: the status was DA_ERROR, but sql_errno was 0. Fix it to reset the DA_ERROR status as reset_diagnostics_area() is supposed to do. --- sql/sql_error.cc | 22 ++++++++--------- tests/mysql_client_test.c | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 6a47e4b9cac..a9edbac9fd6 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -318,18 +318,16 @@ Diagnostics_area::reset_diagnostics_area() #endif get_warning_info()->clear_error_condition(); set_is_sent(false); - /** Tiny reset in debug mode to see garbage right away */ - if (!is_bulk_op()) - /* - For BULK DML operations (e.g. UPDATE) the data member m_status - has the value DA_OK_BULK. Keep this value in order to handle - m_affected_rows, m_statement_warn_count in correct way. Else, - the number of rows and the number of warnings affected by - the last statement executed as part of a trigger fired by the dml - (e.g. UPDATE statement fires a trigger on AFTER UPDATE) would counts - rows modified by trigger's statement. - */ - m_status= DA_EMPTY; + /* + For BULK DML operations (e.g. UPDATE) the data member m_status + has the value DA_OK_BULK. Keep this value in order to handle + m_affected_rows, m_statement_warn_count in correct way. Else, + the number of rows and the number of warnings affected by + the last statement executed as part of a trigger fired by the dml + (e.g. UPDATE statement fires a trigger on AFTER UPDATE) would counts + rows modified by trigger's statement. + */ + m_status= is_bulk_op() ? DA_OK_BULK : DA_EMPTY; DBUG_VOID_RETURN; } diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 5e8ec0701ff..a8c163eff2a 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -22886,8 +22886,58 @@ void test_mdev_10075() DIE_UNLESS(rc == 1); mysql_free_result(result); + mysql_query(mysql, "drop table t1"); } + +static void test_mdev35953() +{ +#ifndef EMBEDDED_LIBRARY + int rc; + MYSQL_STMT *stmt; + MYSQL_BIND bind[1]; + int vals[]= {1, 2}, count= array_elements(vals); + MYSQL *con= mysql_client_init(NULL); + DIE_UNLESS(con); + if (!mysql_real_connect(con, opt_host, opt_user, opt_password, current_db, + opt_port, opt_unix_socket, 0)) + { + fprintf(stderr, "Failed to connect to database: Error: %s\n", + mysql_error(con)); + exit(1); + } + rc= mysql_query(mysql, "create table t1 (a int)"); + myquery(rc); + + stmt= mysql_stmt_init(con); + rc= mysql_stmt_prepare(stmt, "insert into t1 (a) values (?)", -1); + check_execute(stmt, rc); + + memset(bind, 0, sizeof(bind)); + bind[0].buffer_type = MYSQL_TYPE_LONG; + bind[0].buffer = vals; + + mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, &count); + rc= mysql_stmt_bind_param(stmt, bind); + check_execute(stmt, rc); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + rc= mysql_query(mysql, "alter table t1 add xx int"); + myquery(rc); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + mysql_stmt_close(stmt); + mysql_close(con); + + mysql_query(mysql, "drop table t1"); +#endif +} + + static struct my_tests_st my_tests[]= { { "test_mdev_20516", test_mdev_20516 }, { "test_mdev24827", test_mdev24827 }, @@ -23206,6 +23256,7 @@ static struct my_tests_st my_tests[]= { { "test_mdev_34958", test_mdev_34958 }, #endif { "test_mdev_10075", test_mdev_10075}, + { "test_mdev35953", test_mdev35953 }, { 0, 0 } }; From 8896de2baa953600bea9762ae54ecf06d3c72545 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 24 Mar 2025 20:21:45 +0100 Subject: [PATCH 12/15] MDEV-35746 support fmtlib-11.1.0 in 11.1.0 fmtlib removed support for FMT_STATIC_THOUSANDS_SEPARATOR https://github.com/fmtlib/fmt/commit/b3ccc2d210 to keep :L format working we need to use a proper std::locate now. use a custom our own locale which is the same as the default "C" one but uses comma as a thousand separator. Because any named locale, like "en_US.UTF-8" is not guaranteed to exist on the target system. Let's create a locale statically, this means there's no overhead for SFORMAT calls unless {:L} is used. For {:L} there's ~20% slowdown. --- cmake/libfmt.cmake | 5 ++--- sql/item_strfunc.cc | 10 ++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cmake/libfmt.cmake b/cmake/libfmt.cmake index a9dc6937b86..7fded49b916 100644 --- a/cmake/libfmt.cmake +++ b/cmake/libfmt.cmake @@ -28,15 +28,14 @@ MACRO (CHECK_LIBFMT) IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto") SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR}) CHECK_CXX_SOURCE_RUNS( - "#define FMT_STATIC_THOUSANDS_SEPARATOR ',' - #define FMT_HEADER_ONLY 1 + "#define FMT_HEADER_ONLY 1 #include int main() { using ArgStore= fmt::dynamic_format_arg_store; ArgStore arg_store; int answer= 4321; arg_store.push_back(answer); - return fmt::vformat(\"{:L}\", arg_store).compare(\"4,321\"); + return fmt::vformat(\"{}\", arg_store).compare(\"4321\"); }" HAVE_SYSTEM_LIBFMT) SET(CMAKE_REQUIRED_INCLUDES) ENDIF() diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 04f471f9a5f..bea950d3cdf 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -56,7 +56,6 @@ C_MODE_END #include "sql_statistics.h" /* fmtlib include (https://fmt.dev/). */ -#define FMT_STATIC_THOUSANDS_SEPARATOR ',' #define FMT_HEADER_ONLY 1 #include "fmt/args.h" @@ -1403,6 +1402,13 @@ namespace fmt { }; }; +struct fmt_locale_comma : std::numpunct +{ + char do_thousands_sep() const override { return ','; } + std::string do_grouping() const override { return "\3"; } +}; +static std::locale fmt_locale(std::locale(), new fmt_locale_comma); + /* SFORMAT(format_string, ...) This function receives a formatting specification string and N parameters @@ -1455,7 +1461,7 @@ String *Item_func_sformat::val_str(String *res) /* Create the string output */ try { - auto text = fmt::vformat(fmt_arg->c_ptr_safe(), arg_store); + auto text = fmt::vformat(fmt_locale, fmt_arg->c_ptr_safe(), arg_store); res->length(0); res->set_charset(collation.collation); res->append(text.c_str(), text.size(), fmt_arg->charset()); From 8363d05f4df8b5c78723be0341f9229c52f14d0b Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 25 Mar 2025 18:49:03 +0100 Subject: [PATCH 13/15] Fix Windows build to use dynamic DLL runtime (MD) by default This change partially reverts commit b60aee58c7fda4c062f Previously, we compiled with the flags: /MT /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib, which resulted in a non-standard setup where the Universal C Runtime (UCRT) was dynamically linked, but the compiler runtime was statically linked. Goal was to reduce runtime dependency, while still using dynamic CRT However, now now causes subtle static initialization issues (and also some problems with MSVC ASAN) To fix, we now use standard /MD, so both C runtime and compiler runtime dynamically linked. MSVC redistributable DLL (vcruntime140.dll) is required on the system, similar to version 10.4. Our packaging, both zip and MSI, is already prepared for it. --- cmake/os/Windows.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index ac8779f3ad8..dfa90a4afea 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -121,7 +121,7 @@ IF(MSVC) # Disable mingw based pkg-config found in Strawberry perl SET(PKG_CONFIG_EXECUTABLE 0 CACHE INTERNAL "") - SET(MSVC_CRT_TYPE /MT CACHE STRING + SET(MSVC_CRT_TYPE /MD CACHE STRING "Runtime library - specify runtime library for linking (/MT,/MTd,/MD,/MDd)" ) SET(VALID_CRT_TYPES /MTd /MDd /MD /MT) From 7d17ee97c2d07a1497c11aa475505d0a993563d0 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 30 Mar 2025 12:43:35 +0200 Subject: [PATCH 14/15] MDEV-36437 mariabackup - confusing error message when running out of file handles with partitioned MyISAM --- extra/mariabackup/common_engine.cc | 6 +++-- .../suite/mariabackup/partition_notwin.result | 11 ++++++++ .../suite/mariabackup/partition_notwin.test | 25 +++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 mysql-test/suite/mariabackup/partition_notwin.result create mode 100644 mysql-test/suite/mariabackup/partition_notwin.test diff --git a/extra/mariabackup/common_engine.cc b/extra/mariabackup/common_engine.cc index a4a8706243a..a360f63d84f 100644 --- a/extra/mariabackup/common_engine.cc +++ b/extra/mariabackup/common_engine.cc @@ -64,8 +64,10 @@ Table::copy(ds_ctxt_t *ds, MYSQL *con, bool no_lock, bool, unsigned thread_num) for (const auto &fname : m_fnames) { File file = mysql_file_open(0, fname.c_str(),O_RDONLY | O_SHARE, MYF(0)); if (file < 0) { - msg(thread_num, "Error on file %s open during %s table copy", - fname.c_str(), full_tname.c_str()); + char buf[MYSYS_STRERROR_SIZE]; + msg(thread_num, "Error %i on file %s open during %s table copy: %s", + errno, fname.c_str(), full_tname.c_str(), + my_strerror(buf, sizeof(buf), errno)); goto exit; } files.push_back(file); diff --git a/mysql-test/suite/mariabackup/partition_notwin.result b/mysql-test/suite/mariabackup/partition_notwin.result new file mode 100644 index 00000000000..6f2e1778ad9 --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_notwin.result @@ -0,0 +1,11 @@ +# +# MDEV-36437 mariabackup - confusing error message when running out of file handles with partitioned MyISAM +# +create table t1 ( +id bigint(20) not null auto_increment, +primary key (id) +) engine=myisam +partition by hash (id) +partitions 600; +FOUND 1 /Error 24 on file ./test/t1#P#p\d+\.MY[DI] open during `test`.`t1` table copy: Too many open files/ in backup.log +drop table t1; diff --git a/mysql-test/suite/mariabackup/partition_notwin.test b/mysql-test/suite/mariabackup/partition_notwin.test new file mode 100644 index 00000000000..10687e19935 --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_notwin.test @@ -0,0 +1,25 @@ +source include/not_windows.inc; +source include/have_partition.inc; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +let $log=$MYSQL_TMP_DIR/backup.log; + +--echo # +--echo # MDEV-36437 mariabackup - confusing error message when running out of file handles with partitioned MyISAM +--echo # + +create table t1 ( + id bigint(20) not null auto_increment, + primary key (id) +) engine=myisam + partition by hash (id) + partitions 600; + +error 1; +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $log 2>&1; +let SEARCH_FILE=$log; +let SEARCH_PATTERN=Error 24 on file ./test/t1#P#p\d+\.MY[DI] open during `test`.`t1` table copy: Too many open files; +source include/search_pattern_in_file.inc; + +rmdir $targetdir; +#remove_file $log; +drop table t1; From 6e339baad5fb4c4ed9200036733cfdf675278d80 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 30 Mar 2025 14:22:45 +0200 Subject: [PATCH 15/15] MDEV-28908 Confusing documentation and help output for --ssl-verify-server-cert use the same generic help text as in 11.4+ --- include/sslopt-longopts.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h index be3fedd923d..9760ac39c33 100644 --- a/include/sslopt-longopts.h +++ b/include/sslopt-longopts.h @@ -51,8 +51,7 @@ #ifdef MYSQL_CLIENT {"ssl-verify-server-cert", 0, - "Verify server's \"Common Name\" in its cert against hostname used " - "when connecting. This option is disabled by default.", + "Verify server's certificate to prevent man-in-the-middle attacks", &opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif