From a2fee2da0b4351dd34929eb4871be59a0c70da01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 18 Apr 2024 15:41:30 +0300 Subject: [PATCH 01/74] MDEV-33928 : Assertion failure on wsrep_thd_is_aborting Problem was assertion assuming we always hold THD::LOCK_thd_data mutex that is not true. In most cases this is true but function is also used from InnoDB lock manager and there we can't take THD::LOCK_thd_data to obey mutex ordering. Removed assertion as wsrep transaction state can't change even that case. Signed-off-by: Julius Goryavsky --- sql/service_wsrep.cc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index 6a2ee1dd3db..976578b1dbf 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -1,4 +1,4 @@ -/* Copyright 2018-2023 Codership Oy +/* Copyright 2018-2024 Codership Oy 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 @@ -283,10 +283,28 @@ extern "C" my_bool wsrep_thd_order_before(const THD *left, const THD *right) return FALSE; } +/** Check if wsrep transaction is aborting state. + +Calling function should make sure that wsrep transaction state +can't change during this function. + +This function is called from +wsrep_abort_thd where we hold THD::LOCK_thd_data +wsrep_handle_mdl_conflict we hold THD::LOCK_thd_data +wsrep_assert_no_bf_bf_wait we hold lock_sys.latch +innobase_kill_query we hold THD::LOCK_thd_data (THD::awake_no_mutex) + +@param thd thread handle + +@return true if wsrep transaction is aborting +@return false if not + +*/ extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_THD thd) { const wsrep::client_state& cs(thd->wsrep_cs()); const enum wsrep::transaction::state tx_state(cs.transaction().state()); + switch (tx_state) { case wsrep::transaction::s_must_abort: @@ -296,8 +314,10 @@ extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_THD thd) case wsrep::transaction::s_aborted: return true; default: - return false; + break; } + + return false; } static inline enum wsrep::key::type From 0c55d854fe96a2ef3bced360e7d0c10623442400 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 24 Apr 2024 13:13:57 +0530 Subject: [PATCH 02/74] MDEV-33334 mariadb-backup fails to preserve innodb_encrypt_tables Problem: ======== mariabackup --prepare fails to write the pages in encrypted format. This issue happens only for default encrypted table when innodb_encrypt_tables variable is enabled. Fix: ==== backup process should write the value of innodb_encrypt_tables variable in configuration file. prepare should enable the variable based on configuration file. --- extra/mariabackup/encryption_plugin.cc | 22 +++++++++++++- .../suite/mariabackup/encrypted_export.opt | 6 ++++ .../suite/mariabackup/encrypted_export.result | 14 +++++++++ .../suite/mariabackup/encrypted_export.test | 29 +++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/mariabackup/encrypted_export.opt create mode 100644 mysql-test/suite/mariabackup/encrypted_export.result create mode 100644 mysql-test/suite/mariabackup/encrypted_export.test diff --git a/extra/mariabackup/encryption_plugin.cc b/extra/mariabackup/encryption_plugin.cc index dbaa67e1324..ab87ce0b7bd 100644 --- a/extra/mariabackup/encryption_plugin.cc +++ b/extra/mariabackup/encryption_plugin.cc @@ -71,7 +71,16 @@ static std::string get_encryption_plugin_from_cnf() plugin_load = line + 12; // remote \n at the end of string plugin_load.resize(plugin_load.size() - 1); - break; + } + + if (strncmp(line, "innodb_encrypt_tables=", 22) == 0) + { + if (!strncmp(line + 22, "ON", 2) || + !strncmp(line + 22, "1", 1)) + srv_encrypt_tables= 1; + else if (!strncmp(line + 22, "FORCE", 5) || + !strncmp(line + 22, "2", 1)) + srv_encrypt_tables= 2; } } fclose(f); @@ -154,6 +163,17 @@ void encryption_plugin_backup_init(MYSQL *mysql) mysql_free_result(result); + result = xb_mysql_query(mysql, "select @@innodb_encrypt_tables", true, true); + row = mysql_fetch_row(result); + if (!row); + else if (const char *r= row[0]) + { + if (!strcmp(r, "ON")) srv_encrypt_tables= 1; + else if (!strcmp(r, "FORCE")) srv_encrypt_tables= 2; + oss << "innodb_encrypt_tables=" << r << std::endl; + } + + mysql_free_result(result); encryption_plugin_config = oss.str(); argc = 0; diff --git a/mysql-test/suite/mariabackup/encrypted_export.opt b/mysql-test/suite/mariabackup/encrypted_export.opt new file mode 100644 index 00000000000..227c2e03f2f --- /dev/null +++ b/mysql-test/suite/mariabackup/encrypted_export.opt @@ -0,0 +1,6 @@ +--innodb_encrypt_tables=1 +--plugin-load-add=$FILE_KEY_MANAGEMENT_SO +--loose-file-key-management +--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key +--loose-file-key-management-filename=$MTR_SUITE_DIR/filekeys-data.enc +--loose-file-key-management-encryption-algorithm=aes_cbc diff --git a/mysql-test/suite/mariabackup/encrypted_export.result b/mysql-test/suite/mariabackup/encrypted_export.result new file mode 100644 index 00000000000..b2add8e6136 --- /dev/null +++ b/mysql-test/suite/mariabackup/encrypted_export.result @@ -0,0 +1,14 @@ +CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB; +insert into t1 values(repeat('a',100)); +select @@innodb_encrypt_tables; +@@innodb_encrypt_tables +ON +# xtrabackup backup +# xtrabackup prepare export +# restart +ALTER TABLE t1 DISCARD TABLESPACE; +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/suite/mariabackup/encrypted_export.test b/mysql-test/suite/mariabackup/encrypted_export.test new file mode 100644 index 00000000000..d1802118a09 --- /dev/null +++ b/mysql-test/suite/mariabackup/encrypted_export.test @@ -0,0 +1,29 @@ +--source include/have_file_key_management.inc +--source include/have_innodb.inc + +CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB; +insert into t1 values(repeat('a',100)); + +select @@innodb_encrypt_tables; +echo # xtrabackup backup; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; + +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir; +--enable_result_log +--source include/shutdown_mysqld.inc + +echo # xtrabackup prepare export; +--disable_result_log +exec $XTRABACKUP --prepare --export --target-dir=$targetdir; +--enable_result_log + +--source include/start_mysqld.inc +let MYSQLD_DATADIR=`select @@datadir`; +ALTER TABLE t1 DISCARD TABLESPACE; +copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd; +copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg; +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +DROP TABLE t1; +rmdir $targetdir; From 77d5104feed6f2d549d28f05828038862593ba74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 25 Apr 2024 12:58:32 +0300 Subject: [PATCH 03/74] Remove a bogus workaround for old GCC At least starting with ca83115b3e77ffa696527d82640d5f16810294a2 the source code cannot be compiled with anything older than GCC 4.8.5. Furthermore, 64-bit atomic read-modify-write operations on IA-32 would depend on the LOCK CMPXCHG8B instruction, which was introduced in the Intel Pentium. Our IA-32 builds ought to be -march=i686 starting with commit 9cabc9fd8ac4d249d95ff7140371533070dedd4e. Approved by Sergei Golubchik --- configure.cmake | 9 --------- 1 file changed, 9 deletions(-) diff --git a/configure.cmake b/configure.cmake index 55affd756d3..0fa35f8e89a 100644 --- a/configure.cmake +++ b/configure.cmake @@ -60,15 +60,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND (NOT MSVC)) ENDIF() ENDIF() -# workaround for old gcc on x86, gcc atomic ops only work under -march=i686 -IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND - CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.0") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686") - # query_response_time.cc causes "error: unable to find a register to spill" - SET(PLUGIN_QUERY_RESPONSE_TIME NO CACHE BOOL "Disabled, gcc is too old") -ENDIF() - # use runtime atomic-support detection in aarch64 IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics") From 62287320d43fffda20f11d8672ef35fc5d9f6d82 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Tue, 23 Apr 2024 11:37:11 +0200 Subject: [PATCH 04/74] MDEV-33790 Incorrect DEFAULT expression evaluated in UPDATE The problem was that Item_default_value::associate_with_target_field assigned passed as argument field as an argument which changed argument in case of default() call with certain field (i.e. deault(field)). There is no way to get wrong field in constructor so we will not reassign parameter. --- mysql-test/main/function_defaults.result | 25 ++++++++++++++++++++++++ mysql-test/main/function_defaults.test | 23 ++++++++++++++++++++++ sql/item.cc | 10 +++++++--- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/mysql-test/main/function_defaults.result b/mysql-test/main/function_defaults.result index 697e2e0d063..41bd0140a23 100644 --- a/mysql-test/main/function_defaults.result +++ b/mysql-test/main/function_defaults.result @@ -3145,3 +3145,28 @@ a b c 2 2010-10-10 10:10:10 x drop table t1; set timestamp=default; +# +# MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE +# +create table t1 ( +a int, +b timestamp default '2010-10-10 10:10:10' on update now(), +c varchar(100) default 'x'); +create table t2 (a int primary key); +insert t1 (a) values (1),(2); +insert t2 (a) values (1),(2); +select * from t1; +a b c +1 2010-10-10 10:10:10 x +2 2010-10-10 10:10:10 x +set timestamp=unix_timestamp('2011-11-11 11-11-11'); +update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a; +select * from t1; +a b c +1 2010-10-10 10:10:10 2010-10-10 10:10:10 +2 2010-10-10 10:10:10 x +drop table t1, t2; +set timestamp=default; +# +# End of 10.4 tests +# diff --git a/mysql-test/main/function_defaults.test b/mysql-test/main/function_defaults.test index dd3ba109b2a..59776118e56 100644 --- a/mysql-test/main/function_defaults.test +++ b/mysql-test/main/function_defaults.test @@ -67,3 +67,26 @@ update t1 set b=default, c=default(b) where a=1; select * from t1; drop table t1; set timestamp=default; + +--echo # +--echo # MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE +--echo # + +create table t1 ( + a int, + b timestamp default '2010-10-10 10:10:10' on update now(), + c varchar(100) default 'x'); +create table t2 (a int primary key); +insert t1 (a) values (1),(2); +insert t2 (a) values (1),(2); + +select * from t1; +set timestamp=unix_timestamp('2011-11-11 11-11-11'); +update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a; +select * from t1; +drop table t1, t2; +set timestamp=default; + +--echo # +--echo # End of 10.4 tests +--echo # diff --git a/sql/item.cc b/sql/item.cc index f70775b86e8..c951a94b226 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -9748,11 +9748,15 @@ Item *Item_default_value::transform(THD *thd, Item_transformer transformer, } -bool Item_default_value::associate_with_target_field(THD *thd, - Item_field *field) +bool Item_default_value:: + associate_with_target_field(THD *thd, + Item_field *field __attribute__((unused))) { m_associated= true; - arg= field; + /* + arg set correctly in constructor (can also differ from field if + it is function with an argument) + */ return tie_field(thd); } From 45846bacb3386924a95f1ef8449a40e90e5c7145 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Fri, 26 Apr 2024 13:02:47 +0200 Subject: [PATCH 05/74] v5.7.0-stable --- extra/wolfssl/wolfssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl index 66596ad9e1d..8970ff4c340 160000 --- a/extra/wolfssl/wolfssl +++ b/extra/wolfssl/wolfssl @@ -1 +1 @@ -Subproject commit 66596ad9e1d7efa8479656872cf09c9c1870a02e +Subproject commit 8970ff4c34034dbb3594943d11f8c9d4c5512bd5 From 5aff13b65c16e05f31347ed1b039f22bd743374b Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Fri, 26 Apr 2024 13:18:51 +0200 Subject: [PATCH 06/74] zlib 1.3.1 --- zlib/CMakeLists.txt | 37 +- zlib/ChangeLog | 10 + zlib/FAQ | 3 +- zlib/Makefile.in | 16 +- zlib/README | 6 +- zlib/configure | 9 +- zlib/contrib/delphi/ZLib.pas | 2 +- zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs | 2 +- zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 2 +- zlib/contrib/infback9/inftree9.c | 6 +- zlib/contrib/infback9/inftree9.h | 4 +- zlib/contrib/iostream3/zfstream.h | 4 +- zlib/contrib/minizip/Makefile | 2 +- zlib/contrib/minizip/configure.ac | 2 +- zlib/contrib/minizip/ioapi.h | 2 +- zlib/contrib/minizip/miniunz.c | 18 +- zlib/contrib/minizip/unzip.c | 8 +- zlib/contrib/minizip/unzip.h | 2 +- zlib/contrib/minizip/zip.c | 21 +- zlib/contrib/minizip/zip.h | 4 +- zlib/contrib/nuget/nuget.csproj | 43 + zlib/contrib/nuget/nuget.sln | 22 + zlib/contrib/pascal/zlibpas.pas | 2 +- zlib/contrib/puff/puff.c | 8 +- zlib/contrib/vstudio/readme.txt | 156 ++-- zlib/contrib/vstudio/vc10/zlib.rc | 8 +- zlib/contrib/vstudio/vc10/zlibvc.def | 2 +- zlib/contrib/vstudio/vc11/zlib.rc | 8 +- zlib/contrib/vstudio/vc11/zlibvc.def | 2 +- zlib/contrib/vstudio/vc12/zlib.rc | 8 +- zlib/contrib/vstudio/vc12/zlibvc.def | 2 +- zlib/contrib/vstudio/vc14/zlib.rc | 8 +- zlib/contrib/vstudio/vc14/zlibvc.def | 2 +- zlib/contrib/vstudio/vc17/miniunz.vcxproj | 409 ++++++++ zlib/contrib/vstudio/vc17/minizip.vcxproj | 405 ++++++++ zlib/contrib/vstudio/vc17/testzlib.vcxproj | 473 ++++++++++ zlib/contrib/vstudio/vc17/testzlibdll.vcxproj | 409 ++++++++ zlib/contrib/vstudio/vc17/zlib.rc | 32 + zlib/contrib/vstudio/vc17/zlibstat.vcxproj | 602 ++++++++++++ zlib/contrib/vstudio/vc17/zlibvc.def | 158 ++++ zlib/contrib/vstudio/vc17/zlibvc.sln | 179 ++++ zlib/contrib/vstudio/vc17/zlibvc.vcxproj | 875 ++++++++++++++++++ zlib/contrib/vstudio/vc9/zlib.rc | 8 +- zlib/contrib/vstudio/vc9/zlibvc.def | 2 +- zlib/deflate.c | 47 +- zlib/deflate.h | 35 +- zlib/doc/algorithm.txt | 2 +- zlib/examples/gzlog.c | 4 +- zlib/examples/zran.c | 2 +- zlib/gzguts.h | 8 +- zlib/gzlib.c | 12 +- zlib/inflate.c | 2 +- zlib/inftrees.c | 6 +- zlib/inftrees.h | 4 +- zlib/old/visual-basic.txt | 2 +- zlib/os400/README400 | 2 +- zlib/os400/zlib.inc | 6 +- zlib/qnx/package.qpg | 10 +- zlib/test/example.c | 25 +- zlib/test/minigzip.c | 32 +- zlib/treebuild.xml | 4 +- zlib/trees.c | 20 +- zlib/win32/DLL_FAQ.txt | 20 +- zlib/win32/README-WIN32.txt | 8 +- zlib/zconf.h | 10 +- zlib/zconf.h.cmakein | 10 +- zlib/zconf.h.in | 10 +- zlib/zlib.3 | 6 +- zlib/zlib.3.pdf | Bin 19505 -> 25523 bytes zlib/zlib.h | 22 +- zlib/zlib.map | 200 ++-- zlib/zutil.h | 27 +- 72 files changed, 4089 insertions(+), 430 deletions(-) create mode 100644 zlib/contrib/nuget/nuget.csproj create mode 100644 zlib/contrib/nuget/nuget.sln create mode 100644 zlib/contrib/vstudio/vc17/miniunz.vcxproj create mode 100644 zlib/contrib/vstudio/vc17/minizip.vcxproj create mode 100644 zlib/contrib/vstudio/vc17/testzlib.vcxproj create mode 100644 zlib/contrib/vstudio/vc17/testzlibdll.vcxproj create mode 100644 zlib/contrib/vstudio/vc17/zlib.rc create mode 100644 zlib/contrib/vstudio/vc17/zlibstat.vcxproj create mode 100644 zlib/contrib/vstudio/vc17/zlibvc.def create mode 100644 zlib/contrib/vstudio/vc17/zlibvc.sln create mode 100644 zlib/contrib/vstudio/vc17/zlibvc.vcxproj diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index 7f1b69f4a37..15ceebe787e 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -3,7 +3,9 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) project(zlib C) -set(VERSION "1.3") +set(VERSION "1.3.1") + +option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON) set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") @@ -148,7 +150,9 @@ if(MINGW) endif(MINGW) add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) set_target_properties(zlib PROPERTIES SOVERSION 1) @@ -166,7 +170,7 @@ endif() if(UNIX) # On unix-like platforms the library is almost always called libz set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) - if(NOT APPLE) + if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") endif() elseif(BUILD_SHARED_LIBS AND WIN32) @@ -193,21 +197,22 @@ endif() #============================================================================ # Example binaries #============================================================================ +if(ZLIB_BUILD_EXAMPLES) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) -add_executable(example test/example.c) -target_link_libraries(example zlib) -add_test(example example) + add_executable(minigzip test/minigzip.c) + target_link_libraries(minigzip zlib) -add_executable(minigzip test/minigzip.c) -target_link_libraries(minigzip zlib) + if(HAVE_OFF64_T) + add_executable(example64 test/example.c) + target_link_libraries(example64 zlib) + set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + add_test(example64 example64) -if(HAVE_OFF64_T) - add_executable(example64 test/example.c) - target_link_libraries(example64 zlib) - set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") - add_test(example64 example64) - - add_executable(minigzip64 test/minigzip.c) - target_link_libraries(minigzip64 zlib) - set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + add_executable(minigzip64 test/minigzip.c) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() endif() diff --git a/zlib/ChangeLog b/zlib/ChangeLog index 8707988ac18..b801a1031ec 100644 --- a/zlib/ChangeLog +++ b/zlib/ChangeLog @@ -1,6 +1,16 @@ ChangeLog file for zlib +Changes in 1.3.1 (22 Jan 2024) +- Reject overflows of zip header fields in minizip +- Fix bug in inflateSync() for data held in bit buffer +- Add LIT_MEM define to use more memory for a small deflate speedup +- Fix decision on the emission of Zip64 end records in minizip +- Add bounds checking to ERR_MSG() macro, used by zError() +- Neutralize zip file traversal attacks in miniunz +- Fix a bug in ZLIB_DEBUG compiles in check_match() +- Various portability and appearance improvements + Changes in 1.3 (18 Aug 2023) - Remove K&R function definitions and zlib2ansi - Fix bug in deflateBound() for level 0 and memLevel 9 diff --git a/zlib/FAQ b/zlib/FAQ index 55f1cdc22f6..92f5d3e29fa 100644 --- a/zlib/FAQ +++ b/zlib/FAQ @@ -14,8 +14,7 @@ The latest zlib FAQ is at http://zlib.net/zlib_faq.html 2. Where can I get a Windows DLL version? The zlib sources can be compiled without change to produce a DLL. See the - file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the - precompiled DLL are found in the zlib web site at http://zlib.net/ . + file win32/DLL_FAQ.txt in the zlib distribution. 3. Where can I get a Visual Basic interface to zlib? diff --git a/zlib/Makefile.in b/zlib/Makefile.in index 34d3cd722f8..cb8b00a9b07 100644 --- a/zlib/Makefile.in +++ b/zlib/Makefile.in @@ -1,5 +1,5 @@ # Makefile for zlib -# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler +# Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler # For conditions of distribution and use, see copyright notice in zlib.h # To compile and test, type: @@ -22,13 +22,13 @@ CFLAGS=-O SFLAGS=-O LDFLAGS= -TEST_LDFLAGS=$(LDFLAGS) -L. libz.a +TEST_LIBS=-L. libz.a LDSHARED=$(CC) CPP=$(CC) -E STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.3 +SHAREDLIBV=libz.so.1.3.1 SHAREDLIBM=libz.so.1 LIBS=$(STATICLIB) $(SHAREDLIBV) @@ -282,10 +282,10 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a -@rmdir objs example$(EXE): example.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(TEST_LIBS) minigzip$(EXE): minigzip.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(TEST_LIBS) examplesh$(EXE): example.o $(SHAREDLIBV) $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV) @@ -294,10 +294,10 @@ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV) example64$(EXE): example64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ example64.o $(TEST_LIBS) minigzip64$(EXE): minigzip64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip64.o $(TEST_LIBS) install-libs: $(LIBS) -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi @@ -360,7 +360,7 @@ zconf: $(SRCDIR)zconf.h.in cp -p $(SRCDIR)zconf.h.in zconf.h minizip-test: static - cd contrib/minizip && { CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; } + cd contrib/minizip && { CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; } minizip-clean: cd contrib/minizip && { $(MAKE) clean ; cd ../.. ; } diff --git a/zlib/README b/zlib/README index e02fc5aa206..c5f917540b6 100644 --- a/zlib/README +++ b/zlib/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.3 is a general purpose data compression library. All the code is +zlib 1.3.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -31,7 +31,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at https://marknelson.us/posts/1997/01/01/zlib-engine.html . -The changes made in version 1.3 are documented in the file ChangeLog. +The changes made in version 1.3.1 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . @@ -83,7 +83,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2023 Jean-loup Gailly and Mark Adler + (C) 1995-2024 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/zlib/configure b/zlib/configure index cc867c94474..c55098afc4a 100755 --- a/zlib/configure +++ b/zlib/configure @@ -25,7 +25,7 @@ if test $SRCDIR = "."; then ZINCOUT="-I." SRCDIR="" else - ZINC='-include zconf.h' + ZINC='-I. -include zconf.h' ZINCOUT='-I. -I$(SRCDIR)' SRCDIR="$SRCDIR/" fi @@ -44,7 +44,8 @@ STATICLIB=libz.a # extract zlib version numbers from zlib.h VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` -VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` +VER3=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,2\}\).*/\1/p'` +VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'` # establish commands for library building if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then @@ -263,7 +264,7 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then SHAREDLIB=libz$shared_ext SHAREDLIBV=libz.$VER$shared_ext SHAREDLIBM=libz.$VER1$shared_ext - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"} + LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then AR="${CROSS_PREFIX}libtool" elif libtool -V 2>&1 | grep Apple > /dev/null; then @@ -441,7 +442,7 @@ EOF if test $shared -eq 1; then echo Checking for shared library support... | tee -a configure.log # we must test in two steps (cc then ld), required at least on SunOS 4.x - if try $CC -w -c $SFLAGS $test.c && + if try $CC -c $SFLAGS $test.c && try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log elif test -z "$old_cc" -a -z "$old_cflags"; then diff --git a/zlib/contrib/delphi/ZLib.pas b/zlib/contrib/delphi/ZLib.pas index 814ffa6706a..93fa4c9edb0 100644 --- a/zlib/contrib/delphi/ZLib.pas +++ b/zlib/contrib/delphi/ZLib.pas @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; const OutBuf: Pointer; BufSize: Integer); const - zlib_version = '1.3.0'; + zlib_version = '1.3.1'; type EZlibError = class(Exception); diff --git a/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs index c1230bf031f..de88dcf1162 100644 --- a/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ b/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -34,7 +34,7 @@ namespace DotZLib } /// - /// Initializes a new instance of the checksum generator basewith a specified value + /// Initializes a new instance of the checksum generator base with a specified value /// /// The value to set the current checksum to public ChecksumGeneratorBase(uint initialValue) diff --git a/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/zlib/contrib/dotzlib/DotZLib/UnitTests.cs index c5fce221a36..d4f0980237c 100644 --- a/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/zlib/contrib/dotzlib/DotZLib/UnitTests.cs @@ -156,7 +156,7 @@ namespace DotZLibTests public void Info_Version() { Info info = new Info(); - Assert.AreEqual("1.3.0", Info.Version); + Assert.AreEqual("1.3.1", Info.Version); Assert.AreEqual(32, info.SizeOfUInt); Assert.AreEqual(32, info.SizeOfULong); Assert.AreEqual(32, info.SizeOfPointer); diff --git a/zlib/contrib/infback9/inftree9.c b/zlib/contrib/infback9/inftree9.c index dc38f24de96..ac707ed3fbd 100644 --- a/zlib/contrib/infback9/inftree9.c +++ b/zlib/contrib/infback9/inftree9.c @@ -1,5 +1,5 @@ /* inftree9.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2023 Mark Adler + * Copyright (C) 1995-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate9_copyright[] = - " inflate9 1.3 Copyright 1995-2023 Mark Adler "; + " inflate9 1.3.1 Copyright 1995-2024 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -59,7 +59,7 @@ int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes, static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 198, 203}; + 133, 133, 133, 133, 144, 203, 77}; static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, diff --git a/zlib/contrib/infback9/inftree9.h b/zlib/contrib/infback9/inftree9.h index 2c1252f57de..ab2ea28b2ba 100644 --- a/zlib/contrib/infback9/inftree9.h +++ b/zlib/contrib/infback9/inftree9.h @@ -41,8 +41,8 @@ typedef struct { examples/enough.c found in the zlib distribution. The arguments to that program are the number of symbols, the initial root table size, and the maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns returns 852, and "enough 32 6 15" for distance codes returns 594. - The initial root table size (9 or 6) is found in the fifth argument of the + returns 852, and "enough 32 6 15" for distance codes returns 594. The + initial root table size (9 or 6) is found in the fifth argument of the inflate_table() calls in infback9.c. If the root table size is changed, then these maximum sizes would be need to be recalculated and updated. */ #define ENOUGH_LENS 852 diff --git a/zlib/contrib/iostream3/zfstream.h b/zlib/contrib/iostream3/zfstream.h index 8574479ae1e..3dabc0f97d5 100644 --- a/zlib/contrib/iostream3/zfstream.h +++ b/zlib/contrib/iostream3/zfstream.h @@ -413,7 +413,7 @@ template class gzomanip2 { public: - // Allows insertor to peek at internals + // Allows inserter to peek at internals template friend gzofstream& operator<<(gzofstream&, @@ -452,7 +452,7 @@ template : func(f), val1(v1), val2(v2) { } -// Insertor applies underlying manipulator function to stream +// Inserter applies underlying manipulator function to stream template inline gzofstream& operator<<(gzofstream& s, const gzomanip2& m) diff --git a/zlib/contrib/minizip/Makefile b/zlib/contrib/minizip/Makefile index aac76e07f6b..3d927ec149e 100644 --- a/zlib/contrib/minizip/Makefile +++ b/zlib/contrib/minizip/Makefile @@ -1,4 +1,4 @@ -CC=cc +CC?=cc CFLAGS := $(CFLAGS) -O -I../.. UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a diff --git a/zlib/contrib/minizip/configure.ac b/zlib/contrib/minizip/configure.ac index df80e5b7e13..15ec917189c 100644 --- a/zlib/contrib/minizip/configure.ac +++ b/zlib/contrib/minizip/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([minizip], [1.3.0], [bugzilla.redhat.com]) +AC_INIT([minizip], [1.3.1], [bugzilla.redhat.com]) AC_CONFIG_SRCDIR([minizip.c]) AM_INIT_AUTOMAKE([foreign]) LT_INIT diff --git a/zlib/contrib/minizip/ioapi.h b/zlib/contrib/minizip/ioapi.h index c588a18d034..a2d2e6e60d9 100644 --- a/zlib/contrib/minizip/ioapi.h +++ b/zlib/contrib/minizip/ioapi.h @@ -144,7 +144,7 @@ typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream) typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin); -/* here is the "old" 32 bits structure structure */ +/* here is the "old" 32 bits structure */ typedef struct zlib_filefunc_def_s { open_file_func zopen_file; diff --git a/zlib/contrib/minizip/miniunz.c b/zlib/contrib/minizip/miniunz.c index a12aec8bea2..d627c4226bc 100644 --- a/zlib/contrib/minizip/miniunz.c +++ b/zlib/contrib/minizip/miniunz.c @@ -79,7 +79,7 @@ /* change_file_date : change the date/time of a file filename : the filename of the file where date/time must be modified - dosdate : the new date at the MSDos format (4 bytes) + dosdate : the new date at the MSDOS format (4 bytes) tmu_date : the SAME new date at the tm_unz format */ static void change_file_date(const char *filename, uLong dosdate, tm_unz tmu_date) { #ifdef _WIN32 @@ -186,7 +186,7 @@ static int makedir(const char *newdir) { } static void do_banner(void) { - printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); + printf("MiniUnz 1.1, demo of zLib + Unz package written by Gilles Vollant\n"); printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); } @@ -356,6 +356,20 @@ static int do_extract_currentfile(unzFile uf, const int* popt_extract_without_pa else write_filename = filename_withoutpath; + if (write_filename[0]!='\0') + { + const char* relative_check = write_filename; + while (relative_check[1]!='\0') + { + if (relative_check[0]=='.' && relative_check[1]=='.') + write_filename = relative_check; + relative_check++; + } + } + + while (write_filename[0]=='/' || write_filename[0]=='.') + write_filename++; + err = unzOpenCurrentFilePassword(uf,password); if (err!=UNZ_OK) { diff --git a/zlib/contrib/minizip/unzip.c b/zlib/contrib/minizip/unzip.c index ed763f89f1f..ea05b7d62a0 100644 --- a/zlib/contrib/minizip/unzip.c +++ b/zlib/contrib/minizip/unzip.c @@ -117,7 +117,7 @@ const char unz_copyright[] = " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; -/* unz_file_info_interntal contain internal info about a file in zipfile*/ +/* unz_file_info64_internal contain internal info about a file in zipfile*/ typedef struct unz_file_info64_internal_s { ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ @@ -450,7 +450,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return CENTRALDIRINVALID; - /* number of the disk with the start of the zip64 end of central directory */ + /* number of the disk with the start of the zip64 end of central directory */ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return CENTRALDIRINVALID; if (uL != 0) @@ -497,9 +497,9 @@ local unzFile unzOpenInternal(const void *path, ZPOS64_T central_pos; uLong uL; - uLong number_disk; /* number of the current dist, used for + uLong number_disk; /* number of the current disk, used for spanning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number the the disk with central dir, used + uLong number_disk_with_CD; /* number the disk with central dir, used for spanning ZIP, unsupported, always 0*/ ZPOS64_T number_entry_CD; /* total number of entries in the central dir diff --git a/zlib/contrib/minizip/unzip.h b/zlib/contrib/minizip/unzip.h index 14105840f6d..5cfc9c6274e 100644 --- a/zlib/contrib/minizip/unzip.h +++ b/zlib/contrib/minizip/unzip.h @@ -306,7 +306,7 @@ extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, Get Info about the current file if pfile_info!=NULL, the *pfile_info structure will contain some info about the current file - if szFileName!=NULL, the filemane string will be copied in szFileName + if szFileName!=NULL, the filename string will be copied in szFileName (fileNameBufferSize is the size of the buffer) if extraField!=NULL, the extra field information will be copied in extraField (extraFieldBufferSize is the size of the buffer). diff --git a/zlib/contrib/minizip/zip.c b/zlib/contrib/minizip/zip.c index 3d3d4caddef..60bdffac348 100644 --- a/zlib/contrib/minizip/zip.c +++ b/zlib/contrib/minizip/zip.c @@ -575,7 +575,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; - /* number of the disk with the start of the zip64 end of central directory */ + /* number of the disk with the start of the zip64 end of central directory */ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; if (uL != 0) @@ -614,9 +614,9 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) { ZPOS64_T central_pos; uLong uL; - uLong number_disk; /* number of the current dist, used for + uLong number_disk; /* number of the current disk, used for spanning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number the the disk with central dir, used + uLong number_disk_with_CD; /* number of the disk with central dir, used for spanning ZIP, unsupported, always 0*/ ZPOS64_T number_entry; ZPOS64_T number_entry_CD; /* total number of entries in @@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c return ZIP_PARAMERROR; #endif + // The filename and comment length must fit in 16 bits. + if ((filename!=NULL) && (strlen(filename)>0xffff)) + return ZIP_PARAMERROR; + if ((comment!=NULL) && (strlen(comment)>0xffff)) + return ZIP_PARAMERROR; + // The extra field length must fit in 16 bits. If the member also requires + // a Zip64 extra block, that will also need to fit within that 16-bit + // length, but that will be checked for later. + if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff)) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 1) @@ -1597,7 +1608,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_si if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) { - // we can not write more data to the buffer that we have room for. + // we cannot write more data to the buffer that we have room for. return ZIP_BADZIPFILE; } @@ -1861,7 +1872,7 @@ extern int ZEXPORT zipClose(zipFile file, const char* global_comment) { free_linkedlist(&(zi->central_dir)); pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; - if(pos >= 0xffffffff || zi->number_entry > 0xFFFF) + if(pos >= 0xffffffff || zi->number_entry >= 0xFFFF) { ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream); Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); diff --git a/zlib/contrib/minizip/zip.h b/zlib/contrib/minizip/zip.h index 5fc08413241..3e230d3405f 100644 --- a/zlib/contrib/minizip/zip.h +++ b/zlib/contrib/minizip/zip.h @@ -177,9 +177,9 @@ extern int ZEXPORT zipOpenNewFileInZip64(zipFile file, filename : the filename in zip (if NULL, '-' without quote will be used *zipfi contain supplemental information if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local - contains the extrafield data the the local header + contains the extrafield data for the local header if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global - contains the extrafield data the the local header + contains the extrafield data for the global header if comment != NULL, comment contain the comment string method contain the compression method (0 for store, Z_DEFLATED for deflate) level contain the level of compression (can be Z_DEFAULT_COMPRESSION) diff --git a/zlib/contrib/nuget/nuget.csproj b/zlib/contrib/nuget/nuget.csproj new file mode 100644 index 00000000000..68627f034aa --- /dev/null +++ b/zlib/contrib/nuget/nuget.csproj @@ -0,0 +1,43 @@ + + + + net6.0 + madler.zlib.redist + $(PackageId).win + $(PackageId).linux + $(PackageId).osx + (C) 1995-2024 Jean-loup Gailly and Mark Adler + 1.3.1 + NuGet Package for consuming native builds of zlib into .NET without complexity. + + NU5128 + $(MSBuildProjectDirectory) + Jean-loup Gailly and Mark Adler + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/zlib/contrib/nuget/nuget.sln b/zlib/contrib/nuget/nuget.sln new file mode 100644 index 00000000000..46ee8deab8f --- /dev/null +++ b/zlib/contrib/nuget/nuget.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nuget", "nuget.csproj", "{B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/zlib/contrib/pascal/zlibpas.pas b/zlib/contrib/pascal/zlibpas.pas index a2b24a593fa..0cf0e7b82dc 100644 --- a/zlib/contrib/pascal/zlibpas.pas +++ b/zlib/contrib/pascal/zlibpas.pas @@ -10,7 +10,7 @@ unit zlibpas; interface const - ZLIB_VERSION = '1.3.0'; + ZLIB_VERSION = '1.3.1'; ZLIB_VERNUM = $12a0; type diff --git a/zlib/contrib/puff/puff.c b/zlib/contrib/puff/puff.c index 6737ff6153f..d759825ab1d 100644 --- a/zlib/contrib/puff/puff.c +++ b/zlib/contrib/puff/puff.c @@ -593,10 +593,10 @@ local int fixed(struct state *s) * provided for each of the literal/length symbols, and for each of the * distance symbols. * - * - If a symbol is not used in the block, this is represented by a zero as - * as the code length. This does not mean a zero-length code, but rather - * that no code should be created for this symbol. There is no way in the - * deflate format to represent a zero-length code. + * - If a symbol is not used in the block, this is represented by a zero as the + * code length. This does not mean a zero-length code, but rather that no + * code should be created for this symbol. There is no way in the deflate + * format to represent a zero-length code. * * - The maximum number of bits in a code is 15, so the possible lengths for * any code are 1..15. diff --git a/zlib/contrib/vstudio/readme.txt b/zlib/contrib/vstudio/readme.txt index 05ba487c941..061bbc0e2d7 100644 --- a/zlib/contrib/vstudio/readme.txt +++ b/zlib/contrib/vstudio/readme.txt @@ -1,75 +1,81 @@ -Building instructions for the DLL versions of Zlib 1.3.0 -======================================================== - -This directory contains projects that build zlib and minizip using -Microsoft Visual C++ 9.0/10.0. - -You don't need to build these projects yourself. You can download the -binaries from: - http://www.winimage.com/zLibDll - -More information can be found at this site. - - - - - -Build instructions for Visual Studio 2008 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008 -- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" - -Build instructions for Visual Studio 2010 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010 - -Build instructions for Visual Studio 2012 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc11\zlibvc.sln with Microsoft Visual C++ 2012 - -Build instructions for Visual Studio 2013 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc12\zlibvc.sln with Microsoft Visual C++ 2013 - -Build instructions for Visual Studio 2015 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc14\zlibvc.sln with Microsoft Visual C++ 2015 - - -Important ---------- -- To use zlibwapi.dll in your application, you must define the - macro ZLIB_WINAPI when compiling your application's source files. - - -Additional notes ----------------- -- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built - by Gilles Vollant from the zlib 1.1.x sources, and distributed at - http://www.winimage.com/zLibDll - It uses the WINAPI calling convention for the exported functions, and - includes the minizip functionality. If your application needs that - particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. - -- The new DLL was renamed because there exist several incompatible - versions of zlib.dll on the Internet. - -- There is also an official DLL build of zlib, named zlib1.dll. This one - is exporting the functions using the CDECL convention. See the file - win32\DLL_FAQ.txt found in this zlib distribution. - -- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol - has a slightly different effect. To avoid compatibility problems, do - not define it here. - - -Gilles Vollant -info@winimage.com - -Visual Studio 2013 and 2015 Projects from Sean Hunt -seandhunt_7@yahoo.com +Building instructions for the DLL versions of Zlib 1.3.1 +======================================================== + +This directory contains projects that build zlib and minizip using +Microsoft Visual C++ 9.0/10.0. + +You don't need to build these projects yourself. You can download the +binaries from: + http://www.winimage.com/zLibDll + +More information can be found at this site. + + + + + +Build instructions for Visual Studio 2008 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008 +- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" + +Build instructions for Visual Studio 2010 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010 + +Build instructions for Visual Studio 2012 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc11\zlibvc.sln with Microsoft Visual C++ 2012 + +Build instructions for Visual Studio 2013 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc12\zlibvc.sln with Microsoft Visual C++ 2013 + +Build instructions for Visual Studio 2015 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc14\zlibvc.sln with Microsoft Visual C++ 2015 + +Build instructions for Visual Studio 2022 (64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc143\zlibvc.sln with Microsoft Visual C++ 2022 + + + +Important +--------- +- To use zlibwapi.dll in your application, you must define the + macro ZLIB_WINAPI when compiling your application's source files. + + +Additional notes +---------------- +- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built + by Gilles Vollant from the zlib 1.1.x sources, and distributed at + http://www.winimage.com/zLibDll + It uses the WINAPI calling convention for the exported functions, and + includes the minizip functionality. If your application needs that + particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. + +- The new DLL was renamed because there exist several incompatible + versions of zlib.dll on the Internet. + +- There is also an official DLL build of zlib, named zlib1.dll. This one + is exporting the functions using the CDECL convention. See the file + win32\DLL_FAQ.txt found in this zlib distribution. + +- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol + has a slightly different effect. To avoid compatibility problems, do + not define it here. + + +Gilles Vollant +info@winimage.com + +Visual Studio 2013, 2015, and 2022 Projects from Sean Hunt +seandhunt_7@yahoo.com diff --git a/zlib/contrib/vstudio/vc10/zlib.rc b/zlib/contrib/vstudio/vc10/zlib.rc index 29af8e11acc..856bd11f08d 100644 --- a/zlib/contrib/vstudio/vc10/zlib.rc +++ b/zlib/contrib/vstudio/vc10/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 0, 0 - PRODUCTVERSION 1, 3, 0, 0 + FILEVERSION 1, 3, 1, 0 + PRODUCTVERSION 1, 3, 1, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.0\0" + VALUE "FileVersion", "1.3.1\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/zlib/contrib/vstudio/vc10/zlibvc.def b/zlib/contrib/vstudio/vc10/zlibvc.def index f28aa6c73bc..3234a02d953 100644 --- a/zlib/contrib/vstudio/vc10/zlibvc.def +++ b/zlib/contrib/vstudio/vc10/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.3 +VERSION 1.3.1 EXPORTS adler32 @1 diff --git a/zlib/contrib/vstudio/vc11/zlib.rc b/zlib/contrib/vstudio/vc11/zlib.rc index 29af8e11acc..856bd11f08d 100644 --- a/zlib/contrib/vstudio/vc11/zlib.rc +++ b/zlib/contrib/vstudio/vc11/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 0, 0 - PRODUCTVERSION 1, 3, 0, 0 + FILEVERSION 1, 3, 1, 0 + PRODUCTVERSION 1, 3, 1, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.0\0" + VALUE "FileVersion", "1.3.1\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/zlib/contrib/vstudio/vc11/zlibvc.def b/zlib/contrib/vstudio/vc11/zlibvc.def index f28aa6c73bc..3234a02d953 100644 --- a/zlib/contrib/vstudio/vc11/zlibvc.def +++ b/zlib/contrib/vstudio/vc11/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.3 +VERSION 1.3.1 EXPORTS adler32 @1 diff --git a/zlib/contrib/vstudio/vc12/zlib.rc b/zlib/contrib/vstudio/vc12/zlib.rc index 57fb31a3216..a55f341c74c 100644 --- a/zlib/contrib/vstudio/vc12/zlib.rc +++ b/zlib/contrib/vstudio/vc12/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 0, 0 - PRODUCTVERSION 1, 3, 0, 0 + FILEVERSION 1, 3, 1, 0 + PRODUCTVERSION 1, 3, 1, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.0\0" + VALUE "FileVersion", "1.3.1\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/zlib/contrib/vstudio/vc12/zlibvc.def b/zlib/contrib/vstudio/vc12/zlibvc.def index f28aa6c73bc..3234a02d953 100644 --- a/zlib/contrib/vstudio/vc12/zlibvc.def +++ b/zlib/contrib/vstudio/vc12/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.3 +VERSION 1.3.1 EXPORTS adler32 @1 diff --git a/zlib/contrib/vstudio/vc14/zlib.rc b/zlib/contrib/vstudio/vc14/zlib.rc index 57fb31a3216..a55f341c74c 100644 --- a/zlib/contrib/vstudio/vc14/zlib.rc +++ b/zlib/contrib/vstudio/vc14/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 0, 0 - PRODUCTVERSION 1, 3, 0, 0 + FILEVERSION 1, 3, 1, 0 + PRODUCTVERSION 1, 3, 1, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.0\0" + VALUE "FileVersion", "1.3.1\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/zlib/contrib/vstudio/vc14/zlibvc.def b/zlib/contrib/vstudio/vc14/zlibvc.def index f28aa6c73bc..3234a02d953 100644 --- a/zlib/contrib/vstudio/vc14/zlibvc.def +++ b/zlib/contrib/vstudio/vc14/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.3 +VERSION 1.3.1 EXPORTS adler32 @1 diff --git a/zlib/contrib/vstudio/vc17/miniunz.vcxproj b/zlib/contrib/vstudio/vc17/miniunz.vcxproj new file mode 100644 index 00000000000..68ef16588b2 --- /dev/null +++ b/zlib/contrib/vstudio/vc17/miniunz.vcxproj @@ -0,0 +1,409 @@ + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694382A} + Win32Proj + 10.0 + + + + Application + MultiByte + v143 + + + Application + Unicode + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + true + false + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + true + true + true + false + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + false + false + false + false + false + false + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + + + arm64\MiniUnzip$(Configuration)\ + arm64\MiniUnzip$(Configuration)\Tmp\ + + + arm64\MiniUnzip$(Configuration)\ + arm64\MiniUnzip$(Configuration)\Tmp\ + + + arm\MiniUnzip$(Configuration)\ + arm\MiniUnzip$(Configuration)\Tmp\ + + + arm\MiniUnzip$(Configuration)\ + arm\MiniUnzip$(Configuration)\Tmp\ + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineX64 + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineX64 + + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/zlib/contrib/vstudio/vc17/minizip.vcxproj b/zlib/contrib/vstudio/vc17/minizip.vcxproj new file mode 100644 index 00000000000..dd3c52e70c9 --- /dev/null +++ b/zlib/contrib/vstudio/vc17/minizip.vcxproj @@ -0,0 +1,405 @@ + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} + Win32Proj + 10.0 + + + + Application + MultiByte + v143 + + + Application + Unicode + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + true + false + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + false + x64\$(Configuration)\ + x64\$(Configuration)\ + true + true + true + false + false + false + x64\$(Configuration)\ + x64\$(Configuration)\ + false + false + false + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + + + arm64\MiniZip$(Configuration)\ + arm64\MiniZip$(Configuration)\Tmp\ + + + arm64\MiniZip$(Configuration)\ + arm64\MiniZip$(Configuration)\Tmp\ + + + arm\MiniZip$(Configuration)\ + arm\MiniZip$(Configuration)\Tmp\ + + + arm\MiniZip$(Configuration)\ + arm\MiniZip$(Configuration)\Tmp\ + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineX64 + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineX64 + + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/zlib/contrib/vstudio/vc17/testzlib.vcxproj b/zlib/contrib/vstudio/vc17/testzlib.vcxproj new file mode 100644 index 00000000000..4cc99b3ffe1 --- /dev/null +++ b/zlib/contrib/vstudio/vc17/testzlib.vcxproj @@ -0,0 +1,473 @@ + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + ARM + + + ReleaseWithoutAsm + ARM64 + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} + testzlib + Win32Proj + 10.0 + + + + Application + MultiByte + true + v143 + + + Application + MultiByte + true + v143 + + + Application + Unicode + v143 + + + Application + true + v143 + + + Application + true + v143 + + + Application + true + v143 + + + Application + true + v143 + + + Application + true + v143 + + + Application + true + v143 + + + Application + v143 + + + Application + v143 + + + Application + v143 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + true + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + false + false + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + + + arm64\TestZlib$(Configuration)\ + arm64\TestZlib$(Configuration)\Tmp\ + + + arm64\TestZlib$(Configuration)\ + arm64\TestZlib$(Configuration)\Tmp\ + + + arm64\TestZlib$(Configuration)\ + arm64\TestZlib$(Configuration)\Tmp\ + + + arm\TestZlib$(Configuration)\ + arm\TestZlib$(Configuration)\Tmp\ + + + arm\TestZlib$(Configuration)\ + arm\TestZlib$(Configuration)\Tmp\ + + + arm\TestZlib$(Configuration)\ + arm\TestZlib$(Configuration)\Tmp\ + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + %(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + %(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + false + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj b/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj new file mode 100644 index 00000000000..73bba55da80 --- /dev/null +++ b/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj @@ -0,0 +1,409 @@ + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694366A} + Win32Proj + 10.0 + + + + Application + MultiByte + v143 + + + Application + Unicode + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + Application + MultiByte + v143 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + true + false + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + true + true + true + false + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + false + false + false + false + false + false + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + + + arm64\TestZlibDll$(Configuration)\ + arm64\TestZlibDll$(Configuration)\Tmp\ + + + arm64\TestZlibDll$(Configuration)\ + arm64\TestZlibDll$(Configuration)\Tmp\ + + + arm\TestZlibDll$(Configuration)\ + arm\TestZlibDll$(Configuration)\Tmp\ + + + arm\TestZlibDll$(Configuration)\ + arm\TestZlibDll$(Configuration)\Tmp\ + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineX64 + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineX64 + + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/zlib/contrib/vstudio/vc17/zlib.rc b/zlib/contrib/vstudio/vc17/zlib.rc new file mode 100644 index 00000000000..a55f341c74c --- /dev/null +++ b/zlib/contrib/vstudio/vc17/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1, 3, 1, 0 + PRODUCTVERSION 1, 3, 1, 0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.3.1\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlibwapi.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/zlib/contrib/vstudio/vc17/zlibstat.vcxproj b/zlib/contrib/vstudio/vc17/zlibstat.vcxproj new file mode 100644 index 00000000000..b946ac2a90f --- /dev/null +++ b/zlib/contrib/vstudio/vc17/zlibstat.vcxproj @@ -0,0 +1,602 @@ + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + ARM + + + ReleaseWithoutAsm + ARM64 + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + 10.0 + + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + Unicode + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + StaticLibrary + false + v143 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + + + arm64\ZlibStat$(Configuration)\ + arm64\ZlibStat$(Configuration)\Tmp\ + + + arm64\ZlibStat$(Configuration)\ + arm64\ZlibStat$(Configuration)\Tmp\ + + + arm64\ZlibStat$(Configuration)\ + arm64\ZlibStat$(Configuration)\Tmp\ + + + arm\ZlibStat$(Configuration)\ + arm\ZlibStat$(Configuration)\Tmp\ + + + arm\ZlibStat$(Configuration)\ + arm\ZlibStat$(Configuration)\Tmp\ + + + arm\ZlibStat$(Configuration)\ + arm\ZlibStat$(Configuration)\Tmp\ + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + %(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + %(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions) + %(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions) + %(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zlib/contrib/vstudio/vc17/zlibvc.def b/zlib/contrib/vstudio/vc17/zlibvc.def new file mode 100644 index 00000000000..53947cc31b7 --- /dev/null +++ b/zlib/contrib/vstudio/vc17/zlibvc.def @@ -0,0 +1,158 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.3.1 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + deflatePending @52 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 + +; zlib1 v1.2.6 added: + gzgetc_ @161 + inflateResetKeep @163 + deflateResetKeep @164 + +; zlib1 v1.2.7 added: + gzopen_w @165 + +; zlib1 v1.2.8 added: + inflateGetDictionary @166 + gzvprintf @167 + +; zlib1 v1.2.9 added: + inflateCodesUsed @168 + inflateValidate @169 + uncompress2 @170 + gzfread @171 + gzfwrite @172 + deflateGetDictionary @173 + adler32_z @174 + crc32_z @175 + +; zlib1 v1.2.12 added: + crc32_combine_gen @176 + crc32_combine_gen64 @177 + crc32_combine_op @178 diff --git a/zlib/contrib/vstudio/vc17/zlibvc.sln b/zlib/contrib/vstudio/vc17/zlibvc.sln new file mode 100644 index 00000000000..67896b7470d --- /dev/null +++ b/zlib/contrib/vstudio/vc17/zlibvc.sln @@ -0,0 +1,179 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33015.44 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|ARM = ReleaseWithoutAsm|ARM + ReleaseWithoutAsm|ARM64 = ReleaseWithoutAsm|ARM64 + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM.ActiveCfg = Debug|ARM + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM.Build.0 = Debug|ARM + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM64.Build.0 = Debug|ARM64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM.ActiveCfg = Release|ARM + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM.Build.0 = Release|ARM + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM64.ActiveCfg = Release|ARM64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM64.Build.0 = Release|ARM64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM.ActiveCfg = Debug|ARM + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM.Build.0 = Debug|ARM + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM64.Build.0 = Debug|ARM64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM.ActiveCfg = Release|ARM + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM.Build.0 = Release|ARM + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM64.ActiveCfg = Release|ARM64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM64.Build.0 = Release|ARM64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.ActiveCfg = Debug|ARM + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.Build.0 = Debug|ARM + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.Build.0 = Debug|ARM64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.ActiveCfg = Release|ARM + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.Build.0 = Release|ARM + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.ActiveCfg = Release|ARM64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.Build.0 = Release|ARM64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM.ActiveCfg = Debug|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM.Build.0 = Debug|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM64.Build.0 = Debug|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM.ActiveCfg = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM.Build.0 = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM64.ActiveCfg = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM64.Build.0 = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.ActiveCfg = Debug|ARM + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.Build.0 = Debug|ARM + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.Build.0 = Debug|ARM64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.ActiveCfg = Release|ARM + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.Build.0 = Release|ARM + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.ActiveCfg = Release|ARM64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.Build.0 = Release|ARM64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM.ActiveCfg = Debug|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM.Build.0 = Debug|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM64.Build.0 = Debug|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM.ActiveCfg = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM.Build.0 = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM64.ActiveCfg = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM64.Build.0 = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EAA58685-56D9-43F2-8703-FD2CB020745E} + EndGlobalSection +EndGlobal diff --git a/zlib/contrib/vstudio/vc17/zlibvc.vcxproj b/zlib/contrib/vstudio/vc17/zlibvc.vcxproj new file mode 100644 index 00000000000..10a7a901efe --- /dev/null +++ b/zlib/contrib/vstudio/vc17/zlibvc.vcxproj @@ -0,0 +1,875 @@ + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + ARM + + + ReleaseWithoutAsm + ARM64 + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + 10.0 + + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + v143 + Unicode + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + true + v143 + + + DynamicLibrary + false + v143 + + + DynamicLibrary + false + v143 + + + DynamicLibrary + false + v143 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + true + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + true + true + true + false + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + false + false + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + false + false + false + false + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + AllRules.ruleset + + + AllRules.ruleset + AllRules.ruleset + AllRules.ruleset + + + + + + + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + + + arm64\ZlibDll$(Configuration)\ + arm64\ZlibDll$(Configuration)\Tmp\ + + + arm\ZlibDll$(Configuration)\ + arm\ZlibDll$(Configuration)\Tmp\ + + + arm64\ZlibDll$(Configuration)\ + arm64\ZlibDll$(Configuration)\Tmp\ + + + arm64\ZlibDll$(Configuration)\ + arm64\ZlibDll$(Configuration)\Tmp\ + + + arm\ZlibDll$(Configuration)\ + arm\ZlibDll$(Configuration)\Tmp\ + + + arm\ZlibDll$(Configuration)\ + arm\ZlibDll$(Configuration)\Tmp\ + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN32;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + %(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + + + + + + + + + + + + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zlib/contrib/vstudio/vc9/zlib.rc b/zlib/contrib/vstudio/vc9/zlib.rc index 29af8e11acc..856bd11f08d 100644 --- a/zlib/contrib/vstudio/vc9/zlib.rc +++ b/zlib/contrib/vstudio/vc9/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 0, 0 - PRODUCTVERSION 1, 3, 0, 0 + FILEVERSION 1, 3, 1, 0 + PRODUCTVERSION 1, 3, 1, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.0\0" + VALUE "FileVersion", "1.3.1\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/zlib/contrib/vstudio/vc9/zlibvc.def b/zlib/contrib/vstudio/vc9/zlibvc.def index f28aa6c73bc..3234a02d953 100644 --- a/zlib/contrib/vstudio/vc9/zlibvc.def +++ b/zlib/contrib/vstudio/vc9/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.3 +VERSION 1.3.1 EXPORTS adler32 @1 diff --git a/zlib/deflate.c b/zlib/deflate.c index bd011751920..012ea8148e8 100644 --- a/zlib/deflate.c +++ b/zlib/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.3 Copyright 1995-2023 Jean-loup Gailly and Mark Adler "; + " deflate 1.3.1 Copyright 1995-2024 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -493,7 +493,7 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, * symbols from which it is being constructed. */ - s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4); + s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS); s->pending_buf_size = (ulg)s->lit_bufsize * 4; if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || @@ -503,8 +503,14 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, deflateEnd (strm); return Z_MEM_ERROR; } +#ifdef LIT_MEM + s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1)); + s->l_buf = s->pending_buf + (s->lit_bufsize << 2); + s->sym_end = s->lit_bufsize - 1; +#else s->sym_buf = s->pending_buf + s->lit_bufsize; s->sym_end = (s->lit_bufsize - 1) * 3; +#endif /* We avoid equality with lit_bufsize*3 because of wraparound at 64K * on 16 bit machines and because stored blocks are restricted to * 64K-1 bytes. @@ -720,9 +726,15 @@ int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) { if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; +#ifdef LIT_MEM + if (bits < 0 || bits > 16 || + (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3)) + return Z_BUF_ERROR; +#else if (bits < 0 || bits > 16 || s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) return Z_BUF_ERROR; +#endif do { put = Buf_size - s->bi_valid; if (put > bits) @@ -1294,7 +1306,7 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) { ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); - ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4); + ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, LIT_BUFS); if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || ds->pending_buf == Z_NULL) { @@ -1305,10 +1317,15 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) { zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); - zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + zmemcpy(ds->pending_buf, ss->pending_buf, ds->lit_bufsize * LIT_BUFS); ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); +#ifdef LIT_MEM + ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1)); + ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2); +#else ds->sym_buf = ds->pending_buf + ds->lit_bufsize; +#endif ds->l_desc.dyn_tree = ds->dyn_ltree; ds->d_desc.dyn_tree = ds->dyn_dtree; @@ -1539,13 +1556,21 @@ local uInt longest_match(deflate_state *s, IPos cur_match) { */ local void check_match(deflate_state *s, IPos start, IPos match, int length) { /* check that the match is indeed a match */ - if (zmemcmp(s->window + match, - s->window + start, length) != EQUAL) { - fprintf(stderr, " start %u, match %u, length %d\n", - start, match, length); + Bytef *back = s->window + (int)match, *here = s->window + start; + IPos len = length; + if (match == (IPos)-1) { + /* match starts one byte before the current window -- just compare the + subsequent length-1 bytes */ + back++; + here++; + len--; + } + if (zmemcmp(back, here, len) != EQUAL) { + fprintf(stderr, " start %u, match %d, length %d\n", + start, (int)match, length); do { - fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); - } while (--length != 0); + fprintf(stderr, "(%02x %02x)", *back++, *here++); + } while (--len != 0); z_error("invalid match"); } if (z_verbose > 1) { diff --git a/zlib/deflate.h b/zlib/deflate.h index 8696791429f..300c6ada62b 100644 --- a/zlib/deflate.h +++ b/zlib/deflate.h @@ -1,5 +1,5 @@ /* deflate.h -- internal compression state - * Copyright (C) 1995-2018 Jean-loup Gailly + * Copyright (C) 1995-2024 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -23,6 +23,10 @@ # define GZIP #endif +/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at + the cost of a larger memory footprint */ +/* #define LIT_MEM */ + /* =========================================================================== * Internal compression state. */ @@ -217,7 +221,14 @@ typedef struct internal_state { /* Depth of each subtree used as tie breaker for trees of equal frequency */ +#ifdef LIT_MEM +# define LIT_BUFS 5 + ushf *d_buf; /* buffer for distances */ + uchf *l_buf; /* buffer for literals/lengths */ +#else +# define LIT_BUFS 4 uchf *sym_buf; /* buffer for distances and literals/lengths */ +#endif uInt lit_bufsize; /* Size of match buffer for literals/lengths. There are 4 reasons for @@ -239,7 +250,7 @@ typedef struct internal_state { * - I can't count above 4 */ - uInt sym_next; /* running index in sym_buf */ + uInt sym_next; /* running index in symbol buffer */ uInt sym_end; /* symbol table full when sym_next reaches this */ ulg opt_len; /* bit length of current block with optimal trees */ @@ -318,6 +329,25 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, extern const uch ZLIB_INTERNAL _dist_code[]; #endif +#ifdef LIT_MEM +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->sym_next] = 0; \ + s->l_buf[s->sym_next++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (uch)(length); \ + ush dist = (ush)(distance); \ + s->d_buf[s->sym_next] = dist; \ + s->l_buf[s->sym_next++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +#else # define _tr_tally_lit(s, c, flush) \ { uch cc = (c); \ s->sym_buf[s->sym_next++] = 0; \ @@ -337,6 +367,7 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, s->dyn_dtree[d_code(dist)].Freq++; \ flush = (s->sym_next == s->sym_end); \ } +#endif #else # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) # define _tr_tally_dist(s, distance, length, flush) \ diff --git a/zlib/doc/algorithm.txt b/zlib/doc/algorithm.txt index c97f495020b..029e5a31349 100644 --- a/zlib/doc/algorithm.txt +++ b/zlib/doc/algorithm.txt @@ -77,7 +77,7 @@ table took no time (and if you had infinite memory), then there would only be a first level table to cover all the way to the longest code. However, building the table ends up taking a lot longer for more bits since short codes are replicated many times in such a table. What inflate() does is -simply to make the number of bits in the first table a variable, and then +simply to make the number of bits in the first table a variable, and then to set that variable for the maximum speed. For inflate, which has 286 possible codes for the literal/length tree, the size diff --git a/zlib/examples/gzlog.c b/zlib/examples/gzlog.c index b977802dd6e..da1b02e7337 100644 --- a/zlib/examples/gzlog.c +++ b/zlib/examples/gzlog.c @@ -212,8 +212,8 @@ to the appropriate recovery below. If there is no foo.add file, provide a zero data length to the recovery. In that case, the append recovery restores the foo.gz to the previous compressed + uncompressed data state. - For the the compress recovery, a missing foo.add file results in foo.gz - being restored to the previous compressed-only data state. + For the compress recovery, a missing foo.add file results in foo.gz being + restored to the previous compressed-only data state. - Append recovery: - Pick up append at + step above - Compress recovery: diff --git a/zlib/examples/zran.c b/zlib/examples/zran.c index 32c93686c60..d3135955b02 100644 --- a/zlib/examples/zran.c +++ b/zlib/examples/zran.c @@ -267,7 +267,7 @@ static inline void append_bits(unsigned value, int bits, } } -// Insert enough bits in the form of empty deflate blocks in front of the the +// Insert enough bits in the form of empty deflate blocks in front of the // low bits bits of value, in order to bring the sequence to a byte boundary. // Then feed that to inflate(). This does what inflatePrime() does, except that // a negative value of bits is not supported. bits must be in 0..16. If the diff --git a/zlib/gzguts.h b/zlib/gzguts.h index f9375047e8c..eba72085bb7 100644 --- a/zlib/gzguts.h +++ b/zlib/gzguts.h @@ -1,5 +1,5 @@ /* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004-2019 Mark Adler + * Copyright (C) 2004-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -210,9 +210,5 @@ char ZLIB_INTERNAL *gz_strwinerror(DWORD error); /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t value -- needed when comparing unsigned to z_off64_t, which is signed (possible z_off64_t types off_t, off64_t, and long are all signed) */ -#ifdef INT_MAX -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) -#else unsigned ZLIB_INTERNAL gz_intmax(void); -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) -#endif +#define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) diff --git a/zlib/gzlib.c b/zlib/gzlib.c index 29fc4486fba..983153cc8e4 100644 --- a/zlib/gzlib.c +++ b/zlib/gzlib.c @@ -1,5 +1,5 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004-2019 Mark Adler + * Copyright (C) 2004-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -563,20 +563,20 @@ void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) { #endif } -#ifndef INT_MAX /* portably return maximum value for an int (when limits.h presumed not available) -- we need to do this to cover cases where 2's complement not used, since C standard permits 1's complement and sign-bit representations, otherwise we could just use ((unsigned)-1) >> 1 */ unsigned ZLIB_INTERNAL gz_intmax(void) { - unsigned p, q; - - p = 1; +#ifdef INT_MAX + return INT_MAX; +#else + unsigned p = 1, q; do { q = p; p <<= 1; p++; } while (p > q); return q >> 1; -} #endif +} diff --git a/zlib/inflate.c b/zlib/inflate.c index b0757a9b249..94ecff015a9 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -1387,7 +1387,7 @@ int ZEXPORT inflateSync(z_streamp strm) { /* if first time, start search in bit buffer */ if (state->mode != SYNC) { state->mode = SYNC; - state->hold <<= state->bits & 7; + state->hold >>= state->bits & 7; state->bits -= state->bits & 7; len = 0; while (state->bits >= 8) { diff --git a/zlib/inftrees.c b/zlib/inftrees.c index 8a208c2daa8..98cfe164458 100644 --- a/zlib/inftrees.c +++ b/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2023 Mark Adler + * Copyright (C) 1995-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.3 Copyright 1995-2023 Mark Adler "; + " inflate 1.3.1 Copyright 1995-2024 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -57,7 +57,7 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 203, 77}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/zlib/inftrees.h b/zlib/inftrees.h index a10712d8cb5..396f74b5da7 100644 --- a/zlib/inftrees.h +++ b/zlib/inftrees.h @@ -41,8 +41,8 @@ typedef struct { examples/enough.c found in the zlib distribution. The arguments to that program are the number of symbols, the initial root table size, and the maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns returns 852, and "enough 30 6 15" for distance codes returns 592. - The initial root table size (9 or 6) is found in the fifth argument of the + returns 852, and "enough 30 6 15" for distance codes returns 592. The + initial root table size (9 or 6) is found in the fifth argument of the inflate_table() calls in inflate.c and infback.c. If the root table size is changed, then these maximum sizes would be need to be recalculated and updated. */ diff --git a/zlib/old/visual-basic.txt b/zlib/old/visual-basic.txt index 57efe58124e..3c8d2a42dfc 100644 --- a/zlib/old/visual-basic.txt +++ b/zlib/old/visual-basic.txt @@ -115,7 +115,7 @@ SUCCESS Then ReDim Preserve bytaryCpr(lngCprSiz - 1) Open strCprPth For Binary Access Write As #1 Put #1, , bytaryCpr() - Put #1, , lngOriSiz 'Add the the original size value to the end + Put #1, , lngOriSiz 'Add the original size value to the end (last 4 bytes) Close #1 Else diff --git a/zlib/os400/README400 b/zlib/os400/README400 index 6dd41aa6510..30ed5a12c68 100644 --- a/zlib/os400/README400 +++ b/zlib/os400/README400 @@ -1,4 +1,4 @@ - ZLIB version 1.3.0 for OS/400 installation instructions + ZLIB version 1.3.1 for OS/400 installation instructions 1) Download and unpack the zlib tarball to some IFS directory. (i.e.: /path/to/the/zlib/ifs/source/directory) diff --git a/zlib/os400/zlib.inc b/zlib/os400/zlib.inc index 0d9e2f2090b..744729ab9dd 100644 --- a/zlib/os400/zlib.inc +++ b/zlib/os400/zlib.inc @@ -1,7 +1,7 @@ * ZLIB.INC - Interface to the general purpose compression library * * ILE RPG400 version by Patrick Monnerat, DATASPHERE. - * Version 1.3.0 + * Version 1.3.1 * * * WARNING: @@ -22,12 +22,12 @@ * * Versioning information. * - D ZLIB_VERSION C '1.3.0' + D ZLIB_VERSION C '1.3.1' D ZLIB_VERNUM C X'12a0' D ZLIB_VER_MAJOR C 1 D ZLIB_VER_MINOR C 3 D ZLIB_VER_REVISION... - D C 0 + D C 1 D ZLIB_VER_SUBREVISION... D C 0 * diff --git a/zlib/qnx/package.qpg b/zlib/qnx/package.qpg index d882af2bfb3..4877e0ef013 100644 --- a/zlib/qnx/package.qpg +++ b/zlib/qnx/package.qpg @@ -25,10 +25,10 @@ - - - - + + + + @@ -63,7 +63,7 @@ - 1.3.0 + 1.3.1 Medium Stable diff --git a/zlib/test/example.c b/zlib/test/example.c index 582a17a3ce9..c3521dd5934 100644 --- a/zlib/test/example.c +++ b/zlib/test/example.c @@ -36,12 +36,12 @@ static uLong dictId; /* Adler32 value of the dictionary */ #ifdef Z_SOLO -void *myalloc(void *q, unsigned n, unsigned m) { +static void *myalloc(void *q, unsigned n, unsigned m) { (void)q; return calloc(n, m); } -void myfree(void *q, void *p) { +static void myfree(void *q, void *p) { (void)q; free(p); } @@ -57,7 +57,7 @@ static free_func zfree = (free_func)0; /* =========================================================================== * Test compress() and uncompress() */ -void test_compress(Byte *compr, uLong comprLen, Byte *uncompr, +static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { int err; uLong len = (uLong)strlen(hello)+1; @@ -81,7 +81,7 @@ void test_compress(Byte *compr, uLong comprLen, Byte *uncompr, /* =========================================================================== * Test read/write of .gz files */ -void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) { +static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) { #ifdef NO_GZCOMPRESS fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); #else @@ -163,7 +163,7 @@ void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) { /* =========================================================================== * Test deflate() with small buffers */ -void test_deflate(Byte *compr, uLong comprLen) { +static void test_deflate(Byte *compr, uLong comprLen) { z_stream c_stream; /* compression stream */ int err; uLong len = (uLong)strlen(hello)+1; @@ -198,7 +198,7 @@ void test_deflate(Byte *compr, uLong comprLen) { /* =========================================================================== * Test inflate() with small buffers */ -void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr, +static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ @@ -237,7 +237,7 @@ void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr, /* =========================================================================== * Test deflate() with large buffers and dynamic change of compression level */ -void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr, +static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { z_stream c_stream; /* compression stream */ int err; @@ -290,7 +290,7 @@ void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr, /* =========================================================================== * Test inflate() with large buffers */ -void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, +static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ @@ -329,7 +329,7 @@ void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, /* =========================================================================== * Test deflate() with full flush */ -void test_flush(Byte *compr, uLong *comprLen) { +static void test_flush(Byte *compr, uLong *comprLen) { z_stream c_stream; /* compression stream */ int err; uInt len = (uInt)strlen(hello)+1; @@ -364,7 +364,8 @@ void test_flush(Byte *compr, uLong *comprLen) { /* =========================================================================== * Test inflateSync() */ -void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { +static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, + uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ @@ -404,7 +405,7 @@ void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { /* =========================================================================== * Test deflate() with preset dictionary */ -void test_dict_deflate(Byte *compr, uLong comprLen) { +static void test_dict_deflate(Byte *compr, uLong comprLen) { z_stream c_stream; /* compression stream */ int err; @@ -438,7 +439,7 @@ void test_dict_deflate(Byte *compr, uLong comprLen) { /* =========================================================================== * Test inflate() with a preset dictionary */ -void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr, +static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ diff --git a/zlib/test/minigzip.c b/zlib/test/minigzip.c index 8a21ddfb57e..134e10e6c3e 100644 --- a/zlib/test/minigzip.c +++ b/zlib/test/minigzip.c @@ -149,12 +149,12 @@ static void pwinerror (s) # include /* for unlink() */ #endif -void *myalloc(void *q, unsigned n, unsigned m) { +static void *myalloc(void *q, unsigned n, unsigned m) { (void)q; return calloc(n, m); } -void myfree(void *q, void *p) { +static void myfree(void *q, void *p) { (void)q; free(p); } @@ -167,7 +167,7 @@ typedef struct gzFile_s { z_stream strm; } *gzFile; -gzFile gz_open(const char *path, int fd, const char *mode) { +static gzFile gz_open(const char *path, int fd, const char *mode) { gzFile gz; int ret; @@ -201,15 +201,15 @@ gzFile gz_open(const char *path, int fd, const char *mode) { return gz; } -gzFile gzopen(const char *path, const char *mode) { +static gzFile gzopen(const char *path, const char *mode) { return gz_open(path, -1, mode); } -gzFile gzdopen(int fd, const char *mode) { +static gzFile gzdopen(int fd, const char *mode) { return gz_open(NULL, fd, mode); } -int gzwrite(gzFile gz, const void *buf, unsigned len) { +static int gzwrite(gzFile gz, const void *buf, unsigned len) { z_stream *strm; unsigned char out[BUFLEN]; @@ -227,7 +227,7 @@ int gzwrite(gzFile gz, const void *buf, unsigned len) { return len; } -int gzread(gzFile gz, void *buf, unsigned len) { +static int gzread(gzFile gz, void *buf, unsigned len) { int ret; unsigned got; unsigned char in[1]; @@ -258,7 +258,7 @@ int gzread(gzFile gz, void *buf, unsigned len) { return len - strm->avail_out; } -int gzclose(gzFile gz) { +static int gzclose(gzFile gz) { z_stream *strm; unsigned char out[BUFLEN]; @@ -283,7 +283,7 @@ int gzclose(gzFile gz) { return Z_OK; } -const char *gzerror(gzFile gz, int *err) { +static const char *gzerror(gzFile gz, int *err) { *err = gz->err; return gz->msg; } @@ -295,7 +295,7 @@ static char *prog; /* =========================================================================== * Display error message and exit */ -void error(const char *msg) { +static void error(const char *msg) { fprintf(stderr, "%s: %s\n", prog, msg); exit(1); } @@ -303,9 +303,9 @@ void error(const char *msg) { #ifdef USE_MMAP /* MMAP version, Miguel Albrecht */ /* Try compressing the input file at once using mmap. Return Z_OK if - * if success, Z_ERRNO otherwise. + * success, Z_ERRNO otherwise. */ -int gz_compress_mmap(FILE *in, gzFile out) { +static int gz_compress_mmap(FILE *in, gzFile out) { int len; int err; int ifd = fileno(in); @@ -338,7 +338,7 @@ int gz_compress_mmap(FILE *in, gzFile out) { * Compress input to output then close both files. */ -void gz_compress(FILE *in, gzFile out) { +static void gz_compress(FILE *in, gzFile out) { local char buf[BUFLEN]; int len; int err; @@ -366,7 +366,7 @@ void gz_compress(FILE *in, gzFile out) { /* =========================================================================== * Uncompress input to output then close both files. */ -void gz_uncompress(gzFile in, FILE *out) { +static void gz_uncompress(gzFile in, FILE *out) { local char buf[BUFLEN]; int len; int err; @@ -390,7 +390,7 @@ void gz_uncompress(gzFile in, FILE *out) { * Compress the given file: create a corresponding .gz file and remove the * original. */ -void file_compress(char *file, char *mode) { +static void file_compress(char *file, char *mode) { local char outfile[MAX_NAME_LEN]; FILE *in; gzFile out; @@ -426,7 +426,7 @@ void file_compress(char *file, char *mode) { /* =========================================================================== * Uncompress the given file and remove the original. */ -void file_uncompress(char *file) { +static void file_uncompress(char *file) { local char buf[MAX_NAME_LEN]; char *infile, *outfile; FILE *out; diff --git a/zlib/treebuild.xml b/zlib/treebuild.xml index 1d1b007707c..930b00be4a8 100644 --- a/zlib/treebuild.xml +++ b/zlib/treebuild.xml @@ -1,6 +1,6 @@ - - + + zip compression library diff --git a/zlib/trees.c b/zlib/trees.c index 8dbdc40bacc..6a523ef34e3 100644 --- a/zlib/trees.c +++ b/zlib/trees.c @@ -1,5 +1,5 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2021 Jean-loup Gailly + * Copyright (C) 1995-2024 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -899,14 +899,19 @@ local void compress_block(deflate_state *s, const ct_data *ltree, const ct_data *dtree) { unsigned dist; /* distance of matched string */ int lc; /* match length or unmatched char (if dist == 0) */ - unsigned sx = 0; /* running index in sym_buf */ + unsigned sx = 0; /* running index in symbol buffers */ unsigned code; /* the code to send */ int extra; /* number of extra bits to send */ if (s->sym_next != 0) do { +#ifdef LIT_MEM + dist = s->d_buf[sx]; + lc = s->l_buf[sx++]; +#else dist = s->sym_buf[sx++] & 0xff; dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; lc = s->sym_buf[sx++]; +#endif if (dist == 0) { send_code(s, lc, ltree); /* send a literal byte */ Tracecv(isgraph(lc), (stderr," '%c' ", lc)); @@ -931,8 +936,12 @@ local void compress_block(deflate_state *s, const ct_data *ltree, } } /* literal or match pair ? */ - /* Check that the overlay between pending_buf and sym_buf is ok: */ + /* Check for no overlay of pending_buf on needed symbols */ +#ifdef LIT_MEM + Assert(s->pending < 2 * (s->lit_bufsize + sx), "pendingBuf overflow"); +#else Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); +#endif } while (sx < s->sym_next); @@ -1082,9 +1091,14 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, * the current block must be flushed. */ int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) { +#ifdef LIT_MEM + s->d_buf[s->sym_next] = (ush)dist; + s->l_buf[s->sym_next++] = (uch)lc; +#else s->sym_buf[s->sym_next++] = (uch)dist; s->sym_buf[s->sym_next++] = (uch)(dist >> 8); s->sym_buf[s->sym_next++] = (uch)lc; +#endif if (dist == 0) { /* lc is the unmatched char */ s->dyn_ltree[lc].Freq++; diff --git a/zlib/win32/DLL_FAQ.txt b/zlib/win32/DLL_FAQ.txt index 12c009018c3..d8cf5f31e3d 100644 --- a/zlib/win32/DLL_FAQ.txt +++ b/zlib/win32/DLL_FAQ.txt @@ -3,7 +3,7 @@ This document describes the design, the rationale, and the usage -of the official DLL build of zlib, named ZLIB1.DLL. If you have +of the common DLL build of zlib, named ZLIB1.DLL. If you have general questions about zlib, you should see the file "FAQ" found in the zlib distribution, or at the following location: http://www.gzip.org/zlib/zlib_faq.html @@ -11,13 +11,9 @@ in the zlib distribution, or at the following location: 1. What is ZLIB1.DLL, and how can I get it? - - ZLIB1.DLL is the official build of zlib as a DLL. + - ZLIB1.DLL is the common build of zlib as a DLL. (Please remark the character '1' in the name.) - Pointers to a precompiled ZLIB1.DLL can be found in the zlib - web site at: - http://www.zlib.net/ - Applications that link to ZLIB1.DLL can rely on the following specification: @@ -379,18 +375,6 @@ in the zlib distribution, or at the following location: code. But you can make your own private DLL build, under a different file name, as suggested in the previous answer. - -17. I made my own ZLIB1.DLL build. Can I test it for compliance? - - - We prefer that you download the official DLL from the zlib - web site. If you need something peculiar from this DLL, you - can send your suggestion to the zlib mailing list. - - However, in case you do rebuild the DLL yourself, you can run - it with the test programs found in the DLL distribution. - Running these test programs is not a guarantee of compliance, - but a failure can imply a detected problem. - ** This document is written and maintained by diff --git a/zlib/win32/README-WIN32.txt b/zlib/win32/README-WIN32.txt index 384c988fa84..14e6398ef3a 100644 --- a/zlib/win32/README-WIN32.txt +++ b/zlib/win32/README-WIN32.txt @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.3.0 is a general purpose data compression library. All the code is +zlib 1.3.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -16,13 +16,13 @@ is http://zlib.net/ . Before reporting a problem, please check this site to verify that you have the latest version of zlib; otherwise get the latest version and check whether the problem still exists or not. -PLEASE read DLL_FAQ.txt, and the the zlib FAQ http://zlib.net/zlib_faq.html -before asking for help. +PLEASE read DLL_FAQ.txt, and the zlib FAQ http://zlib.net/zlib_faq.html before +asking for help. Manifest: -The package zlib-1.3.0-win32-x86.zip will contain the following files: +The package zlib-1.3.1-win32-x86.zip will contain the following files: README-WIN32.txt This document ChangeLog Changes since previous zlib packages diff --git a/zlib/zconf.h b/zlib/zconf.h index fb76ffe312a..62adc8d8431 100644 --- a/zlib/zconf.h +++ b/zlib/zconf.h @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -300,14 +300,6 @@ # endif #endif -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have diff --git a/zlib/zconf.h.cmakein b/zlib/zconf.h.cmakein index 310c43928a2..0abe3bc9d8f 100644 --- a/zlib/zconf.h.cmakein +++ b/zlib/zconf.h.cmakein @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -302,14 +302,6 @@ # endif #endif -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have diff --git a/zlib/zconf.h.in b/zlib/zconf.h.in index fb76ffe312a..62adc8d8431 100644 --- a/zlib/zconf.h.in +++ b/zlib/zconf.h.in @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -300,14 +300,6 @@ # endif #endif -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have diff --git a/zlib/zlib.3 b/zlib/zlib.3 index 4dd28967534..c716020ea9c 100644 --- a/zlib/zlib.3 +++ b/zlib/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "18 Aug 2023" +.TH ZLIB 3 "22 Jan 2024" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -105,9 +105,9 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS AND LICENSE -Version 1.3 +Version 1.3.1 .LP -Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler +Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler .LP This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/zlib/zlib.3.pdf b/zlib/zlib.3.pdf index da12d37183a7371513c0991fd14a7d932fd42e84..b224532bdd8eed1939b7dd04a7a0dd46be649c00 100644 GIT binary patch literal 25523 zcmcG01yoh*_Af0dQi8My(rh{eq`SMDO?P*9cejL;N=i4<-6JNhxU_1vvpwOI{v%K4C&? zTYdpW5k3J4roIN5H!=V1M&m)EcJo!-^1J5*#LFS;hoarRpxBwx>4Mx zl=|m<$gTZa@#+CPp}W&0bE?7d^19}E+*ZOwFyPpjeWxtMnK7RITeV<>Br|IXMK)({WgquWOfxbG8iHLJ`Y2SUeovx1a5$&c!Z_V>gaYC3?o&9`6pVy~58Ml#nxevW>}MPN-U>HI>{&CS{Q zW@UZgY-J$uLaM%Y`u$2C=3ECkL8R78I;ogphO8yJCB7s&Z#{uN`s(O-v+|g|8w0Jc zF{R}+dQyID<8O}{q@Xy^9SobW7{aVzxoxNEq}eS<#6J=5O`GE+mnx^0uCevaR)5Es zfXOt#Ybt~sY$StH+^Yqzkk)J5D>sQ}qTE5{H3wh(YSURRh@WbC;}*&}ExB((HPl-^ z$l&75Wd9u_-i*zB^O=v3hgtf0oBY&JYQ$cu3(R;O5mGt;y1X~U};mY3|1G< zZ`>E`ta2!jFW*LjRm3h-YnHJak~|dWAfd{2pUOrCetR}csEBilSFF>(=?ZUoP3?NL_uj(iRxWE3iB8_ z6n=~MogF6}#YS@&=^wdgl|w7z^yT+evh}{C-TBmo@&v=&-KB7d*QC~1=t4FmNE9C` z8w`jqWm~x$zDX|G_NV}61#fBgL7M*1Tw$ej(@codNPjtmR0}I;*I70w`js=HwllV^ zf-vXk8&Q~^?}n%$-42_%lSOf}q`KO6@D3`DYF{ z>GDj)9960K1+YLtzye!!)ciDQER-W~oXY4z7-gCN)0SLvwiP+*JJarjokCl{TeAM% zYW!?rpp;_ajzI!g)iOHevF*UAKr=Er44-5_3TY)5&q%A*Nk?!Gq{{;c?oym zpiSY=Mm*di-pR3C_T_bfsO$pUGp7&@aP%*qCaIK)&j=&pZhBq-qUMS|DqMTbFnU^PXc%Q)kh4O<23t%lOk8R3k@zj z7S`95ws@aj9EwIRuT`GWQJe2Hsh5djI}^!&7IlAdI-K1syqe?E(MT)-aq_XJi=ke% zBKet0J+MoV(^FntD)n|#zOx@e*!fD5iL(NM8HZ5NP>>F_Z{2?E)O7`1!5khr3J&FB zOopZgHfcX-$ji434m-gk*O`(+b%Kqedi2|b=y+Ff&Y>;=t#HOLXZ9j17b>?8sh(4$ zb!p2xT zbw_rhBvI%y>N(?OWwIz*Yvy{Y>!TQ8OBmrGH;T*OSrH9M0kxr8E)|X0$Ue)R(D~@t zM^`^zkb7}+czf&TMZ`ad)ag_%9ZMe9-UAt)goYnJ(9eImBA=8)_xhe$yErG>S*V;09&cdwgmzgc$7B*hDRUM2(hxEd z;|)cyE<0ph{-~H#&V--4SFxCA&vn*rQO0L8jqKH$!F5IjvaS(pAsL$lxdDBJ*G!ql z;>WSLgN;!!bkTcK!uzacwpgU7GKSyi5+T#Bb9ToIO~~-lnKMJ>;}yk)Lw2L=$O_Wp zz6E1Z<0u3%T)gs+eW%qJn55MBnbRxEQRv!cg}XpiBzTe^Jb=KGLCrbiEvxQ!H^jAA zzFqm5jL`7$`qf$GjFXO;o~zgMlEGJ=o`uTb-jM;2tSOU_fVE{Z_Vk@*O{s45)>A=? zX_ zjNh7w=ApCWU_Mek_;E}t@%jme!)-3EwZ*qXh z>8K4j0YYD_2zViU4B-~i?3;@c(IUI<<6zUwr}jJ>YigRCl`@Ft+w%Fm7%Qh&+5JFH=8+^T8NANpj$bvus1 zOHUn5;JiKGM*?L|x_4Rr$+g#Ou%fMdX;3Kj2M@n|c|9#BMM{FAmuQ8Jk_H!6d})A- z*R_r=T?3CN$@jB&xK%vbpI*PkB)Il5C}gQ|K7)XN5cJp|Niuc}D2(c@^ZyYjZ(aED zXe_nGjK(d?Vbrj&R{<;Hd4ZfM(a41T%rUQnsiq!PmH=OuW2Z5%L-Kpz8hc&IlR6Psou+b zHLMN0-Hq)!vssNAZCTrNrQmY0HZ5l~UAD8ccAU7%qPsbr9X9)QOc6coy*C7H*4?*F zcneQ`uoD#{a@iqSlq6P8yu7w8c^#iT5lW;iaUZ=&PvL|2&zD`ex(-f9`7FM_c8~AH zKbS)ZIq;|4Bp@-MDVC5Cp`?i17i=UCoLATMtVzCNC2Wh*X8=^UBGrVfa5Xf*YG!b)XlM~Fo-ZGdfoJ!1aWk<*DEAAha_ zW1?u%(`;q=W5a>k`SCWq3Q1|e3jxU4%o^eMt)j&M@8#(%DgQ)lkzV}x48_A-z7#TE zGkoNc03Y|z0lEj;Fz;5g{o3y6H{+p+p%q+*XPyh?E}K9L{a-3IDD|j@KPumkPkL5X zHuzs!IJF zjoq+s0rkbB!xjJJi-Hlvmy zYRvHDNo4dYegYE1&-BMXBxpyr*P0Tq5mCHBIHfhYHg38e%}` z54F7F947ttE>jcox&@{aqK9=RYa?wGEH+US zm?4k)$S^)d0hpDNR~MwM z%mke2&y!k2XJhZhW&GwpS>sV@6a==8f!|^U#gc(3PT|W@^1_=UPGg*OiRc|%El&N) zp$O|)L4y-!;AyFF><-UM)X0^Jv>Y7I}=fG zNs12rQP`MR7AuEZdczD_13Pm)0w%E@?&J46gJ8&F6_HhYnz)yPpX9IVcxTatMUb+o zEXy-8aNueCcmW}o-9`BT+u~Lzn|RVnZmAZ+(iW1Ht9Etbm(zsQE43CL-wS_Nal{8%h{p@*ufFd#SO zS9MJ2rkmoMlrg=Y9t#P?Es;BEjK-)z$8&Qv$}js$`W7xvDt0wX$yOynEi8o!PpqkxIbwE<+k3x_SI9^tppv-0oE64Pvi$XxlJs z1R9KIAl_b-fmb@hs_3b@06>RXM?Kx$*PNFQp4T*x?R zDicQBf!&^DoWfCTmtn&2*3^e4oFlV=9-D_Pv5M?iX=tv!MU#})J2Oz*ebeEkW_Lw~ zxBM1MsO0%VCDQoSt1X;jP%1!w;CUjRoMBFk|eLUxMe^ zXJMK@_JvG!27FF6R&s90Jn=SP?Ttj$1*fNW1LK0l_g#ix^kVWJDH3-P3VJh8@Hw&K z`_T!3T|)4i{~?>6gwCUIqGP6|{Vkjr|CUYi&Q?Hxw2mPVAOX}j*5S2uB2;^nQ_OVq zge+|I8t?#FOFNJ^iI5i5$_8j*N67Ff#X!YCTT6QzJ)kYf2_RK}EksB`c`lmpkkK^K$6ve$V~)a-Jmh zpX+(t;LqiN_5y;3@ChGVLV%dDzAd2|{3Cj@@N|!>mW9_K1dU`5+9~~?JNj#cUjy*z z*y)&A8vY*X7laZ(I~{#c4I%x{vHpPM5w>5D$g;pcfe4VLV}hr90uPjAfTw#J1(c+N zr+eBKK$Z>uQR|TXdz`2J{y!M!kLB>{*a9Dq79g$2ry$5fDGW4o0NNSr=}=4Qni*T$ z1D_6_A84y*V{Bz-X+!w5w)RRGs)33h z=llDQp5<{2T0$nKM@ofQ%h~JNJ<|H) ziPHUz&=a7)5c+Ft0%E+10y32H#^yj{T z|JoNl)8lF%@1Pz1$36VLo8NoH6L3cW+Sn{|(N6a~0q(oF!z0B_t$%;Vf%uu4C~(V18n@|4cm$ z^nbw2!tfhr_@6NU4FdxM1L(#6^Li|Otbfe^K8W9N{QL7Ka6j*lAp8vkEj$~DvmPOP zJf6qvDGg%7$D?^nKVDCBfK^dCeV^WQ-Fvj1n2Wo7%X6#EOeM{Ixo{R4!bsO%Rd{!Y_Ao&O^ZJTmj+SdSF< zo5Dcl@Q;)SYV~;fk97E}|Ib-LrGK2wKYgM8VfX&U=L&LCV#*4Ci;DjN+2e%&05Upy zy1y|4?dlggzn)KY{lqbUl|OOXZ%Y0B{HylQ{{MpTPgEY;J@N$T4#I}@=g9xk?mvtK zs{cLD&%VFg(EsA;pU+=yo<{r4zfb)5lcRpl{C|P|BPM@x$fIcbTNXdzE~#S<()j*& z!kZVQ1wJW(EFj&8g`Q30F`x*FgEE6w%?c0TvDJIj13?uarB26682HFaKeLZhJ=W2} z1AdB49t%S=knRW%kh24tD-zPtvcLl*jBRZ}68cHnKS@HsqcQ-}AISi`01<#VK$ZMy zp^q_9&|CV6o&ILZr~I!i{)~728SVs4^rxKX`yC%;WTbun{;xo&p1!t@uC~5D`myi; zxfpeixa9bmRBsOzl>~IK$!(Ou?d$eazJ%KP8^hxv^+^I74#WkH{sj)I6AyV6-lN>Ihp89-xeYi(s%%w0CweuWTNKykILy6)OX$6c182 znb<%Npj%>q@~E$0f`VERRO>@rgJUD0uMu*k~tYRgzYWOlr<}B3|30BDBE{Nu8KQ9t2F?*?&!BDACJ;oaq; z`$bnzeHfRR=X%J!O1C1g=bA5cZ|I(@i*i846IVOcHt{SHb1o8+E284qU2B5#pMiT#Yn&cguEz31D-D)+@g<}UYgJ?t`p3}Jfn!`oCx$ zRQe~aGcz;81Af!`W7q#m?o9tq?o1$FQ2xa-jEtZe{-S*ltpaoax&S?Zo~60D4gd%+ z1Q-E~0cHSmfCa!3UZ#RM?&sJyn$0Cw4^AH}Sv#H&@Ascy3??(23^)!t zH($7CUN~p)@vQs5Mu!LL$kHTItGi}xB9gM`S*%jKu|aF01Uw{Ti{%cz9oWxWE`f$s z=7vUCzfx>)vx93mhPR{gS?TQNfL}|mS&c7_#A7=$5bsY}fWFn`v2c)-IsNvP#VkS+ z5OIGHyUA&$W5En?!Ki&v!3OO{ld6QC*(ZSs_aPG9YUnV>lj}ZG?E&HZ!C&ZwKKW;D z7A-=mcW)%Pl3wc>Zv3#RF`XRrEdsSu(r&n7zr-y)oStud!#!JYlYn0XAzmD zZinVOwkHSUG~6)7*E(fj_n7q;d0k5C(L4?vMH5Y+>zaAv#;ue^MYrELxSNL8C@Z8d zgFI_Efo`t1xP6@waK(ZMw;{j+pY48g-B3bLuOv0oallLD^dR_ynlc652huoueZ%|h z$dxZ8t7bgd+;XgV?T#tUL$(b9mWJ$YiZqM9|+MUcD&!;`ZFF*29#H@#B zAP`<51tY$lL1CG^{P^8x%Tcc2bh*i-ZE$#{R(mVOk9PgA1F(~1G0Em(`4 z@~%NbykrU5h&Gc-bzb!gT<{wwwbAG4BEst#U`F1#MW60C)Mq)onHI5euoz?6=)4I$ z7o@xq5;gtV-4@*C_TGe3zn6wddz+ZAu4r)zSy@|`U!{UgMz)f8h){M~8OHA%K*YX{ z{Uc?sK2Eid21D+p=7!yDFSzQ)2s$NL)IobSN+TnE)2J41%hb5oofzTTPE!vM6d$e$ zdHtGsq-e_`b4&$}f+xI3>N$*%mKN}wI`dWYduN&XSo(mnn>A`eziQ~)jnB-6cU3+L z5|Qf5fmjkeQxu5#s9BJz_2U8_Dm2p5z&^+P+`S>>T#a`D8XQ}F;2fuXG^A%_UvFI5 zC?TppK3h6bgvV{sdo{O}UBJvv2rww@)S*o(eFsT-GM*iKrRptd31*@V{WA4cBj0xk zKPuJYo)SHi<5S!$o=$LQJuS7(9;Afw-BX@g_2)^de92ufUIW3LUKhp;r)*izV(uqwejIUVl+qZ^&xBI==||JW$5Qf(Q3CE9nJsBOkI@6ASG=1{M85EL?%I?3qqrF z?~DZY$G2G6!+OYEco!{hop3T`q1Oyptg5&tcOpqQf2EKnEk?~Z016#+j<<)XnQ#%% zhH^LUM@?&kw-{L`@N1NiRVaAbX36hJ7!kb`Feh0LtsT{6(#H1smQAjZV2rEkC5lcG z)28Yy)~9lDNjN#JI5p2XFHRM7oOT#j>4QKxO?!UGQa8RD`i#tJoRb1ERpT4h*P4EA zsLGdBP2IX*HcNlt36wbLWGAo(@v0-?21c-q=nc zef&7AzLKn;7$U5%wPE#{qyQ;yTluuHt}H4mN&MOB0GE173ysv7W(}_>ga?w{(!;6T zA&Y^Q-U}YKyMWeWNDgV;gw4y29Lyt`&R~~z86=7>vG%T|_aerF79Ji&LCJ5#Sj-@d zO0qbV_Yvb@Xlr1lK4Qa9MzAN_651^(dyTpgm^9_I6%1jC1TqK|fV&W1j4E9Wa^b#e zPf4jasRL6zm?#W;`9UOfEB&GvmBQK7pn9mEUyU;9AMmi`~_L!z(GsM+RGp_x{ zh1RRV@YyB3GZEzu+N56Hdl&V-r!2&@Tlt1CURrwYq(0&G3aYf%W09~xVg_oswGU6j z9{#g(j>n}G6UAC3%;!VRVOMTRIiOfsjfY4?fnb) zhjk&Yb`k~xPscZTq;I=LOQ}j=6pR$yhxNWf7W=MM%d1j?V_)^Hk~$W+8)Rlb$H^6X zPnsVjgox7v7lSbgZ(DUVHUIqmt9@nNZ?1E4G;Wj9+r^)N&Zc#0A|s)0FiNX^uhOg9 z;>;9M7%|cEZ24=!fT6s1kwVRPxHlg%9XwZ)GGd|5(=zv!3O!E7jzfC4rQDUu@=2@E zmT+e~E&Idf(1c1mi_$7*6%PRyB%XZgXQ3uY%6Rwbbe(iOsY9AjFH zD%3B%lX9IRRcfw1+j1UN;H1dwDPim>BPQZ=PC=)|U>KF#j17btV)0fXh&z-{5XiYj%Rw07|*!MgeKFlpl0KV|&)iJu;K-@b9i(PVSthh~)$4 zdM0JYee(c`OboEEBS7nIZ~TvbJGMbe!Y}yQ#ckF^?0h_+ElTQ!J?u~KyW01_&f<*M zL}`v>VUDo#SCi3u$2M_gEpGw?ERg518^mSHMoUSyKGBJO;pffoVeIn?;1Ah}e|7`- zx={PgCVqq{t6hK=>*Cr~s0DVG#HeRAnAm?*R-!aaAtANl%vnevr~2)y37eLWz>BStlM#s z8}IYB5_c#uskoyaz+gw6TK=S-_|au&7T$k9Vqvo4PFM2k^HX)@1q6qm(tGzGI{v``~U%fAV3Hp3^IR30b(FS zKms5MkOs&AK)x`5JU{`U2v7njgUkaRJCKE-YonuQ3bZo=8h~;?(@*ZKC)2^q(&Co^ zp${@444&Lu#txvA8NdJ(uz4~njGV2EfEFOz!USOYWM4dazCc!ng|P(?WNKJ~?jUpH zG2Zhu$y4g*6u)c`>p#3`KMfL~xv`$*kWeQ|7(8Ye4hk1`qEfpB+OY+C-ZhcBC&o;qx{_EW0XUOjUVEYWg|6`e zm6sGMFbzG%D&~@y#q@?M^P-WY-M#i;@uZR9pu%%{)^(_HGEFanZXGogiz`CAOgZ*k z=v%;Bz)?^nQbfhW!|T-!-SsfN_42RTHJ+dFte0thM4*y7U}C>14WJ~j(Y_yBzAB_O z$EM5ZRIQjRxO4{~XCl9(R&8K<|N0F%JqHnRv3HG9aR8ww>0-T?BXRgg_hF4Q!Xbfi zHr)|iS++H~>l-~j+1QQnM#l^xBPSDat5MIp-Ool3o=0##mu9wU2ML#@a5TYlG1a68 z!ZXQrlzSDYOA9$Kro!4?=_7ZMkZchgBM*a4!)6KgFjnz)R&RUi{13i*ej(@ns_bdi zGui^|Q!2SNn%H(Wgcw0Tu){(3S((qYNC~k63IR$cN^#Iahe=!fWzsZX$?J1e z)8H9DG`hg7U^sqAx@f0VWvLF-*kD#&NIL%{Q8S`^lrgwxZP7_QR>8?op-U+B*3iL6 z{A5Q_7+iza>Pt2CX2|EYN0i@KtiIXmvU$ePAHS`NE-DDv+^e*1^MO+$t&?&)nymgB z7Mm{>l6Go$+~2d_<0*NRGRknaQ0OTxCxMerlX73nSKj^|FCFi5zg0#w{pwpKj@Yzh zjtcWhKNU5DwLyyHGmOu%7h#$G2kCoE?5@>7hlgFticEHMJ5=_C^i`Guqy6#P=e8`| z?Qzkx(s1rKNna^d-YhcjzxK@`TLB+sU~%3een(F+7yh!l101^v_ImE4*Xc^WE?;38 zKPxP$RaX42ntYnJD3t7b;oknE$x$L@;c$aiBAQ(7H@Pxz4B=y+QM}rBo=oH$1_o)+ zp$RIBaQW6i*^Pcle`j4%SA#T6YO3b|CqtHZCI0q&=mW`NQ2a4VZ)g>%aT3oRmXpp& zYf}FLJCqc8-l7mX`9<_019@y~Nd;Kl2-OiL5ni5stl`z#h#ouktH7_T?~Y$%0zElJ=C;+O@q0eJyup?A z;yB?h$N;utrIs%dGrKm3qtbRP`pfJhqt5NCBaK7oyRoGzSBM6!EwGbF&6h9`u728X zH8ZsFv4TaT9p!dWNW?I~BhB-l55cTpO!dxpzgLsmz2aUqLWjCCdXDIoru8gS14Uon z%zEZk{mVlQZ$qH;#eFQ@cW~B>fO<_{?7?QIw|l~$vzTVFEpPgpT+k8pFiQL5D4!z- zYHx?CM34xg_xW$b+r&yL<~H)QW5j(RE2}Z#-9x{wa-;?}4vS%cp@1I+$?AheC5z2rK|ccLYuEgOv=YjPFNmy7oD>UV=tkgo_BRy>SaGiM%JBlrtxS_bw_$J+KT37}(s^NzNfi+3z zCK|wemU0sK7RB_vmsX3X_R`6<{e?0Q+jpdbE4@`EwQj9;&zw z;oDG3_u=`0YhcpAEiBjCw^(pX0#V)rlP#!Y4PV7)E=I6RvL?cEM3mO~rdh=PaqdL% zr6a>eV8PU3ke%}KdK^%b}?)KIR9>tt!DWxi-rL~noTRHhH zm`U7|iskr7W#J6jqoVucp<+yl#z~@8_?#2U+KQA^5XHI58W5YRrp|h5sz7}!w{1nP zW#l;3gJf))v;LMfs!lT*#LagVtkOYdUY~uC0)9#w9;}AR58}vn+-pg%=C31M0 z^}z6bhzPK~ClFf{H0Dz5W+}2hsGj*44r5$+{vK&{$!(j`Jh}1`?Utx1M^&+>Hgk!&lcC$+iG#y3I}C23ccXTPHpr=bwcP~4exNeRl8K<-@oH_A}@N=$nmP< z5c0#S`&S`5ro}7AC*$xd z!}MAdK#&=JhLlQE17~UOi2>i`Z3&h(IWou7&MoRWA?rq$nE|1OZkQxeT2hZy=O4!6 z2%g(R6wX6!rG5W5__nHM8N}s?u%Ne7l{|%%aCmel#I>;9jm&Geke9-Rt0}UDG+u&&CUyV>WehTri&XX*?#=pE3%}aw{}di=4H!YVUPKj%*<{zmub!ooP{& z%e>W!HPp(ij8W0*(M7ekiI(QAURS~3hC;^{__X3K-=B&+P&C>gtG(_EA6nSXtrq>+ zZ+kKc-S?nXTQ};4)Gea;U+#&$@+*B%8>M-DP|EbVkgD0!Ge)3`_kd>h;KNE zp2sdyN(K846}DckN#@mjND+Y@7JrE`j{Z%;dSn%~z1Y6y5Vz?8k%gw>;w6h5g`5~z zdJYxd3tj^FG#M5V6FGKYGYc=x@|o{Uoe7$1Y6>dppP5V~c*9lHV8!kDOzjVP0$2g9 zn()*!snK}oDJeAJP%<@v8qXj;KR;DSucfe}I$~DLyU;Xz{`h_c%CWO!Q_Sa*= zk4Hp86PkHtjh1+jHyt(%RF?7Hd=JzOMfKr2rPlB8O{cb;rOIk1}E zQp3>wJ=EC4w*WE0_iIIGuSflMy{J6Yp9_g&Y$9g87;aqO)m}Dwg~5P+hIkyX%z8nba7K4Smp;0g0sw)8) zYFkyrk$1>9?nkDaMKM5K#aG{EvOTqW>L*-yJ#XWz^OiU|K`AY33>zcd1E|9d(LwIY zphqlXOhj%lVn#*vDnHDPE-O|bC--AQ?mfHj#`5h6ubJV?#7fl=6C^kG@dLWFw~7mT z%qP#)2a%>qz+DUQ|&Khfxm7KiLulqhgaz5-fj6`-OhvPkJ)R&YiFFk=~S!W}n0w1c|oN*Tk zDL(LEvkwGT#Qpm0L1k0}7WzyLURz0%z{DCARgCUV^F;Gk==3aK3RyuvTRSLs?chyE zNdjL0D*C~W*ick5wd%5HjmvTvHuxHFC_~R+)=@@&MR1h6a<*E2^<34?A0bXOnKvUj z<6{uyDfVZ;G9&B#4_~1TN!-JiE1C&P26M4%+ESB3kQKNBZ{DBV_3-~l+>Q}%pJTj^ zz+R&#dOk}=bi-pTc>wNWH`F{Zi`y%y$ZEMJj%0k55qM-Pg}vo|`%lOLg{o%uLQ}XygPHzlbAw zN!eSbRQ&Pd7GlZwjqO+~GMOYNGE(*W2#1J!koL@!if)5>gQcvSmxg46;3V8WX9a&Y zTdHu@CZ|!N6_`D3QAW4G*-dA-vpAeg@A~1GiDFVOxpHjAP`)u=T@5+Ir$XSaN=cRd zvya-+$4d6>t;3e0ZzMJ9Ytx%GRygAMFq?LJpx0{M)oTikqOk(lZ>q;c4VuqBxP*n5 ze5;qft;voa;HTrT7=ocd5=Pp}ALrH7m1#f`n;RXV=~Lg~vlN0uiya#U9yh3as1}Jv z2vAKBaiug(kkY~XjVwk&dU{;u-fzC*aTIf=+=Q8Weri4_G!K!H_s`$ngY=)5|$neWW6zP4k?;@W!0VBKCBK0Pmg~S8V)uqQ`y1kVRtvWPS z78Lr{CIqTGi%swxGK>Ho-3EjzCU^(6ZED4Kp&7!}|=2HZfjPsk(-a;y!+fsSgva;DpV!K{A^0h=7U}D{E3#g1W5I zV+i#dH5*ji?f!t*9Iz^sV2dUzyRup&hm%@doSGtAw0g+uq&S!hm4hRXzIUOB-2%_KT!f7?>!rD2Q$?b>LF0i+hXF z41qhm11jGbqxcVw*=vBE87EdDnS}mkf+%Swqazdflr&ZERJff#Nd&(Usk^apNh7@b zTF~rS^#HT7fYxM7=LD8kFhsCd=dk;ctbuPBRU<`tJ)rAtgFX7xbB(U*hxX}nEndJn zp_2J@EN;r0@rL||!J@CTUp4dwJF3z}y~CYFj_u-kQ{Hrz=hFfef#bph%0065^l~3u zWe1T@6DFBp+0}{-BkS7UO2FzHwWkD~>F_%myE6uaGPl%`q^Q(n~jI7KF(=b~O^TAY$46WT=~e!7=&_e2ZsbkgaH9Lr+!rmB~SjBiF>b?yJqRMau{}YNm18Jz?O}$^UenQ zY@;J**1-b`_3z#zJ}|Z5AC(vT^Ygz~R2w@x82K0g!7iVjTm}bTug46Ixulh9#qmL5 z2Kv+3;r(>bNuGPh7P^eocSJ50^2)1ZhIud*WcK}2Sd++dr2<*|Y!ayJk{iGaNs$d#@>Se_kJ?bKo=W4S>=Z=%C z-h(}(r)BUZh$B-i8|;X?L_Df9$Nz&FzA996q)U_>Qi+?iiiyPpj<*#lyI?0V&+oR324)GVbfM3PKL^WfUM%XDUb6QeG+$j-O%d906g?z%$LdH z_DpwccwYD)BU-{|2(yKHm(*fHUX(T z-R@GvBQcnpON_9&Vp9l=3z*9|+|)4}E^>@}FY3J|r?lzwh8_~ggDyBZqQ*wCS2Z8l zRE201oZCxQ?Je;w7M!v!`GH`>q`Val#Ymq}fYMk{~Hu!^HH!1V=CV6%J~b5hMt z>gj2RAqhDg95C3o48@4nSY-ol!z;J%4iS7J)OS4y&pV9WkrDWkbo7uOciHE3-ptv7 zSM(zz?l2A{e%n`?1dYNX%mk%Ll@zeMfwBps#usmdBEFaUnoTlv8?>{D6S6RqlfU~! zQ&^bSR9#C__Fge)`10ZCm4~zf`8}S=>p5^P@}1FwM%riSlf9RsL%}d(Pv^p#&emhBrN{4m%EUj9!nGb_L>@L#} zt!Ar>7VHifT^txAwq!(XB=mKvgnj>cu!!pmY`4!(G&gF+6&g~Q5Ob600 zXqF+={o%eUizA3HEn-jXoSMz7n6C||3ok;uGbS&F4lD?GgW9f+Ha$4!C*>RcSd)cbt5^_S3dbW!1 zr?0UxuGnPW82edHN|u=5jOepsSh&wzjdhB(#gbYwaey&`K1j(a-1LS16zV`?prR&T z2azu0gqFfOCn8{ElG%X@e#t|~i;J?g8ZH84*sB??>U#LmaulGq2ho+?;`6BnO|sc7 zTx`I9a8rX7a*xM*Q?C;7D(lV)!-W99*0o%JDgK3fFRLvM(nQlFwS<$4 zx`~gRvgpo?Ek?m?y?=NqUVN3qjGK4DRCv;kvZrfDfT3W%?T++iGfn$p-GqFuq)BJR zcsGUUlu23TmS*M-o#ofoH})l30ZUD<9S|x~T%U0gG1a4&->J?Iz}2iBEqVFFdz|^W zKqF$OW1joOIn+}aMqYDSO2-*ljt+}@>uOKT*cm$22DJBXHoRyNqP!L{SMrD~E6HvC zdWB^Kg;8DytHv9=Ft4c6XL5aq&1_~Tb&8DnEugzyerIz}`2o=Zi@jwHtA%HX&g%hZ z8Y)6z#1ou#vl;U8toloR#vS+A(&5|-yLR~NlK88n8@4(D6J|1uoBP;-uuoo@W}Kt*a8{iosQ~h)G;4z)5f`VqOgp+AQLWYe25Et zm$Yqeqo)Zwqvs=yFj4PW(Q2b-8D_tm3_b_*U?LkV6wboaTQMh@VUqN3$zphUn@G_r zMNl?3LS=!9NKhNr7ON?}H!B-VlXgEvA&NttC}h0H!gsJ!g8vbC(L(fza$K`(lSMm3 zd!cHq{Z#9Llzp0-?EpQrM}T9$P$r(hBTGP)ji?1_EY#JCG?@OrD&01)lE8B!l6Abo z#4~_|t0EgtYaZFBQ)hWUBRdFtXV}_2=>7f-hSR$%R92+xK6ZAR^n(CKuUKQO2Hd7_ z1Gr<yh~CJh&Pd~)&M^}8f|@S4@=_xhhPSs*!X!cdg@uU^ZE77 zk-;_GlI=-Vw2T+U{V_(b@zt0e`b!o5+ZGc zYw+vbZpt@MoZ24FV!ICZFGM(T-v&j*@f+637dkh39vC$uY<>nfm8f`H&7{QhR^rv# z>i3(~1EL-1ziU~0X>lMm2Bwp!LuA?le6b}Y&d=g3q`suzPupIsU)sr;CxJyC=8NxU z6OUE~-H+EtW=vkBzra5zu7|SlWmsvwOsF)Gv5rEjA7Jm=sT&-)?>)PfZEoq`wBj*q zASO4@WJ;X6SyJAy=l+fjJBvpXEG&xtZAFYdM$6Tu<`CwDJVQ5!r2pG)We4gS1E0i_`pdS@Z7e+U1)?Yfg9#hDa_O&J?N3D z!gX}+E-|1;wr@{l#&=UzcU7ldr8mu!;d^@#k5#RmuqbC{ddo(zFFi5 zii{#rQw?p^n^V?it+p$pUPU(jm?zfh=w?qNAC>)94~tJhQcwEcvv`iycy#PmBo=PP z6EbnvIPyP)i61{B{wHDL|NMRbQ?Gme2UbQs7O{B36AA1ljG!M<{%<6jAW3TA|;FO^Xo15-0fyRR2H) zSAj&7ajHQb&*9bxvCW^TQ=k^!OB)QUDwt$j#VxHqX>>a2YS1=(=Q)^sa_`jVesJUd z-Lf_k*wBcT0CZfcWQfshxBZHH} zVi6L&&_EKTlh4qspFq!$l-y7CHYvHiVZe{JS$CZQA;~exG1lkH6u>`%uC}Hg?XXo7Zoia8BXAkw#r)(B!ItpJ%k5A|;Ufsxk6VE3xdioS{ zJDQ+13!HhCyb?aVyNG(1J6%~p^}kxX@_4A)_TM68SGG`1wh?AIGh-QM>|6Goio%R# zvNi^jHA)EC)gwZRvXhW4p+}_bNhM1{S*u63=yyiTQ|f)6=lA)%=dUyOxt9A}_jS)) z=X|d3cZ?V$_PG^2@({ycTd-XmQ7T_xP*$7>C>D(wOAPQjoO-?cL`7ZPa-FvmsfGqjh}hM;r^8CN1nF{@kjtifKFZofpLsour|)K8SR+A`NG(0jg`Ss8 z@3Ea|7(nFUGCl)=hAPExsygx%Vk!!s7HXxqX?m&eILE(a9h8=c4+XZkh3m0l^2I@1MwX?8j zU-slq)~&s~(S6<)m#@P+d(Hb)kIau$oV&$Tui4h)L3u!W)1}aDhY#dXb`pNrmeB3+ zdbGgsRQa?mDbayNjVsius_RMLz;ppKm+=Cxb@4(O?*Wt1)SVy3F3S+dXF6TZqb176 z0(bT0?s;M@6KHV7PP=;Rv0?x9G!^^}J|o{;tfl?Fc5E7OyP*7Z5~rzKkg49{h4FN{ z9vcc9Yt~N8PRFi4;#ekq_G@2>VIP3jdX^d5a$;1fn%Bi%j6j$jPj5?r#7k%x$LOp? zUZ^=XKq?pr8@#TaoVY)KOVm8{)Wz)AXX17D3hgqfLVEf7eR^Cs#rV?A zeXoh18ScR8#J~dyPiIZqH1t0XRK&QH^_kV?ZJRo)lpUmsfun(Nz-@F;#+LUwtlRAXUwdv*A{sdT^Q3;vScsMI>wD_u9-U-RAdlXESY%` z&l-hXW>iF+@2X%;P;3{k7-8c*puV>PYZen0txXWPAXag!q>rEDXw<5@KdpXge3 zW~auodB2c9eQL!j+}%n4mr>DI^0Z!(H|*5V2(I^FAVY}94X)d+p5RqOCsi~TFI z%O~jx)ay&{yfE;1-M6;E^O!02Ff!}K(psb>3=N1rDM=f4j^$G2DI2V;RGc?kITr37 ziFy)kS>}#TR*zt1B0QLLXwH`jl7k9{Ehk(&P>U-!1_9bUSL0`{3@VyP1|18Zg!}Rg ziV_cz>MjV}oJMk%Ch;83eso_FxBHJ%<>dx*B`=#)=|klgh2LG`k z?&!_xB5Q4pZ1`)p`d!|}YZ&tutakW2RTdwYIPV_CTXJ2&FM6TXZ!+u!!z!&^#xP;@ zJp*PiF_KI=%uyW|rG=W#x`(_tYjFfUHtc=IAhQ(%q?U1+mT$E(QhDOtFrV6OxFues zA~sNBg>bMSDFUW6cIS1>ssL;esV;o!$g6_A(@Srght1!M(&OfMY;rOQR|;F)%L^N4 zor#0CZ9_KZ`Z_RC9u|uc-BXrYx^u_<%#$J|EGA~n$G9Dnv^YMUVE;faYlyU+I$$TazRoWc5BtIJ@CG`iP6xpMMGyhKea&v;1L+2rJ+`K39|SasNC zm@wby1&H?5%4=~AclwzP$F9{^%qRy2n)>fGocGOL)I08>_gKnkoag$*@FS%eo`=Uy zw(YEI3N{kCx-CHLVG5(4ie&h-Yq?VH)fbSQf+gj9DpEB=oEe8RaLEQo%R<|D*t9|n zqu<|Z_t;hK)%v8NPr*!5W@Z?X$BoU^uhRhEXeAJ=0}a*G6iARqec=xgJn8WLB7C74 zid#OH4icseB;HJSU0++q-Ql3ly!hj}+QeT6bGaUu`@|6Te&qXXe&Q|uCTa9_)Ct{G z*kWmCjIDj2X8^;(y%ssM62_Z32<@V(i<=H>uabI|iKNH1q0v8C1u)8X0^%FgLDqTb@kOB5&sWo5BwZ zJ2VpK=*}(kzUjf*{iZCU!PEXtS@c^7-?yrW);T9DL&LCQzm-KlfM@<2P>j}e_n(R) z0PMc|xhMhwi{HUB(zMRH?|pQdVBZ|AD*6JT*=Tg5A!lf~nT=+)-?g%B;Ano+pa%A% zZSF?f0DJ#XO3^-ljoSaCl#)fs{#Z(xeSy`qB&K=k0Lr7luxP6?FQ+&;-$=6HwTUYo z*I9`OcaIV>2{F%FEDdgCy7G(ADnl0%Gz5q z*BW5w%RV{1J`_AO6L@#x)XRy$L#pMWkVD<>{+h>5o`X-=zU_XTcwG1Wl*Rm%_}SY} zbn-RZiz}gV_^@e>n5j$72VZ!GX0v%V#Aj-w#0z?bfuIge1Y&OfQ`1UlT7heN+fYBk zC^^TnuGUzC$TdzRna?&}l@msME)i49k9yQ~jhj2qC-(&NXWpgH*M%4x4_`h$Z;(}_ zou0~5sKl3;I8oZw-=PFC(%?{tv}p!u72}mfcFl1fQ|IF}s5KDT&3TqROUypPl2M^C zGHw^jp8FoB$cT`$YQ)*8Tk42+XQQE<%eFgijrMReC++3dvdId{R4zB+Iv_8`&#@+D zz_A$hStGGiXrv}SK6Zbbj1GgADs<%2S!*A!xZ(-dg~ZOs4_4L(6yyenf{;f-KI8A@ zU)tkcT%$TJ5SoBlZL(q(Zl2Pl&T*D`(^or*SG84=p9(i{YYl5h3Aob5wshDD+!$Kg z;V&tvdMCFoiz@9C%{(}^TWK3AE)b2%O=>9LGJ4}(w6Q$oblk&w0czy1gz47qn!1Lh zTc*+NmEE3sqhrt1lTvCBXOn0A!~)nKFb2M|<%2p+h(FzGDkv5GY6o&Y@8o4WW3-m; z(tBPG1*c5PxzWDbvkHs4y_Hl^`%N!@;o`Ojhv^)*}5uE@e?_2(p$?|PW9p!O$c$XSLyElBKh(`o2=h+-3k zksvddPv=FtHIWC5>#5Sm_ea<84eU3o5#BzezxFmH)G5?$pPuc|YzB8(1ShfDo!_?U zlIVHI{QUR=e|jytJvoK^k1ZZ$R`rDIF#WZR75yV3MsF_7#K&*Wwj}+OfLw?xh3gtq z{j2*!wR4OEirX)WiLW#7w)CrDNmnWOXf-1(8qm_N;cW-UREXnsjj2o5#;5oBB-GDO z9DU^2yuL8?NyLHE3$7cC%j0?;cmweezt3O9L+QMI-Ky{Uv!TJKAE5VJBKs-$Nv3M6 z0ZPdIS&sWzpG-w}RHxOJ6Ivt8oysXgE^euH*8;3fE&C{uHmXDe zI;C4U?np07aK{6^(&OGP;ZH*Cd73%svo2>49F|@-)pRF!wx3ogni!w;xM#4`cL`R% z{*Exbg>5JrZvj6Q_@a%k6;Qca8Rn`O#ji*be4Zi|di&KAbIk-_p1gCxgb#nZP(4bO zSmP`Hd||7W^D-{Rnq@LuCy=`)=B8w!q>FOD@dqgD#o|DV=bm@=vRFiZ2u^<@^i+zM zr>aZ=>K@dY=5XGfZFlYX+b9h=mhkqx2JSS?a69wcs0bOlx(xo1r}{gah8f@Q`!GbW z(A}7qylX1))O-?eq(@ZM&t&gRDLtPF0D6y{Nr6}>Q_u1Fm*`WvLd5DZhdZp40jwVKrbqX^X zFggj8;P~@7KdL?byw#$Efc1}M+fqq__5I8H z7iT|3?8{yatGjtT=jAgm2Zi@)&%JsGOeh0EImu}GmD)G2##1{46xOMA0;Pn-SE{3I zq8d&IWku~{AI)i{H?G42_SL!CyhI7TPQEqQ-sZ5~lP>2@6h&ZdQGsDw;O<=kcvHQ* zS1g!>MT_LK;gv8lWEE;xP^EOcVFfy1bJ;`O!E~+P!-utSYYVK23iDZ=Il8n!4ht)q zyix5}dT+_QWnz)TWma$JKz@fV!kFhuJ1h#{0#6Lr&lZW^`Kbkx)-=My7_9iVZQ{lr zoa=MwN4w!!@o;8mu#JWB7%6^|e|hCdL~-j{QV>ygF>krHZcY96noj5v`$wC&!e1+i z4Gx;iid8f$b;v!VFVPiAwqG%L#_0UAQTS|R~HgU;LyaxVh0%izX+p?m_T&11S*>spFyE-Xx+tfRrW@0KgvR2*`p- z1~_72NbrE6?6D{Z85tDT!R}wL2$Ar89-iK0*Nx;O5)clq4m6iu;GzKFM2G}=M-Q@_ z9R*B(Pfw7`XoKD!0p? zDw?}*NE5%r&XuJ28ieD}j_@q*gNn>b?TR)G4k-tqewm*%O7<5Y7%cV| zIWz!17jLqM+2E4-*@rY5^NU|unP2B8_iOwB07Rp0@&RB0S&)h6Cm$$4T6(h_Qbt;K zvtJY%E&IcoQ^0a3{FC1PQ@{li(WMCBfy9?0xS!XW#qY zn~$}oS9NvQ-_^6|>gvC72(mr{GVugdqQC6EJd7DMuk&>|RBOwYwe7U0icNorb@97= zl@jfYHWCdbCJ4i-{13k)1MqcF! zA$5XH-elW73s6Mc;L_dA+YP+IhKFu*Z>5YSmJFbYJt0KrQyShnV7@*2www;S3F*p9 zs&sG9V|fn#(wI1kBCK0Axf>c$?$5Rk4)Z6PWuEwIQA+kSGhbQbc$n5T=@3Z&euL@D zFM$E=AY;r{(jFf-aL7B(*s0-mS@X;YOIC|V=G*hFr;^|iGH9}|?F83P+NlbcYz_7; zok7zrrhS7Q=g-oN0foFpZkH>dXgcjWg!P;OJ`Jm(6BFUUuAZQPhisNUBLkd!%Dvt4 z4NfoR4vmNjalEPVU13EvB52%UK>Rb zS&bV}zirn2%9yHH@8-O5KS@FbOVv{V_ovF7A(@>xja=(BJrk3)o(?}yK)3J1#X#eb zk>h*iv5$!p{$2~yLxLqhn|?tbv83}<*b&5R+LZPL0;>Xl{T3Sf1SzABwBqH48*7kr zjBF4S-a>7nmYfPwc*mJ76h~cSBbfYCOoAwOM1zxhSknmNh-mP!cNnxCu1On|f#8d1 z(!SESPv2o7i#o@9hUbex<65^65Q6>a9AZB>8%88c?&^5y@9KONixybPnw&nd9LY4t zgi9)6rDJELA6_|wed;X4mRM`&?}AUTD8c9IR6Reg6w&tTj)dACPnXS=E`u&s{Mv9h zlfQtoV-|ACeocDVgM*tX{S;aTThvPBGe6RXC=_x6S&`7%&pZ!6kTkO-8d~FwG8Q8} z2b~S9b6+;ZQ{CiXLRu~Y1ej?Vh@qCtsoz16^>M&ItQuR!AYH*4u?;F;;+Q>mIObvB z6xbjcqPjqp%fosxvIq|=D#TIeM%ci;L(a4nJ^+ZWsuR6VK6#5>tYBRO5;JA{qW5V?S2i z9WFg6mqG`55CokaqztaJ#<6VqKv9NqRFr(!hkTG~3WOG&SKpTm#-)#!PZnY^9S7t* zFk4$L^>gQF^^ai|6k6>&+Z%P{SnzX_jv$k-N;Oa%5}G8~{q5h}ykXnyP?t4RrC9k= z^))3JLgM5dy{}X|x1Fj(GJN(gwAS!C_$3r^OTsk~K+d!KU00U?MeK(Sv{|$nhNAb5ZQwJWTY)PU{2t|mO-fuZgW08MS*GYV0NhuHwxZO4e z;^`cjJy+t6H+sY8i%#L8b5tcEs012ri}vp`$77==Fr7=`9C+$4#64~*LWvnD=2p>Q z?xtUqfbPhcJeDzXQX2iD$PgOy9T2s#o3IwoMrcrz#TGYRUew+Mb76fsK+A=a#)^G6 zM#i$+KYo5QGZY=|i38=SeO-4kqC>^FHesOHafoosP$ zeG0!SKvp?AC{i0}HAGoxO-Jjs(k3c&^ZT~jYd{#k*JXExc*KInDk5ZzFsEQhoK(p9 z!3`>1Ih*eNw-jAyM~Dr05H_YEImIb1F0@WGoA}h?bRn5zLVG za%Jr!W+Yw>(VaG$f7+$rC#J@p=apDLl~-x)f{o1R_esK>*&!cV14lALbr4v?5MGYA z$_Bw71}7+1G_j*5otHXIlAf-7v@}@HTm{O)t<$MyQLmKvqLPV%_KOQ8&!ODh7Nb-s z^=Ie%di}{_S$K(Jts{rGdEZ@BBg3ctLY!?V2GzefHvEkFyj;3o>v>D_8LG{ZLClWi zz>_T%CQOkTXTFpYy=QlsRGp};VZM)0AxC#)aqlUEe`o(15pJj%d-5Hj5_njyqwoa8 z8u#WcwA1L<7@Q7v8i#HIXu}UmMG)#BB0Sv{1-E8?PKFY53p=YJd6!;ES79S^&6Xll zK_y2dDTQ2XTWVx*zUZkvYFX$h>JP{Ma(y@4noK=(hg!uBXB$BV_1$Dzh8{GG5J!?^ z<61A^K@@iC&@4msSWx{T5jInFjQKu@09W0Y(QDrNN-=K(_xzArx2j@*A_|g48bc(H z0o=f_Az?P6%NFoW@O^bceq}PW(ntT4T0q%V2Qw!*u_tw;g;&vRkZ77{hk{F>YsW8} z==p*yBqVr4{^zr?3XMIx{L}B!4TX{$Z~d0mrz z@I1wj0<$|7oLOGB@&=f&RR?R(r+nx3GBwqYQ%jD-4kE|inP9y=E`t2DHy$2MQcPXWL;E}u_FSH;(cTXk9yLmM{+=lknRIa3rJj}K#DMb zDwT(mk-htkZc`W%aK{tzq;d>7%LmVi8u6<#PV7!dms=ks&WKrc13NAZo`&y-NRlDN z0h;aBFOiD8@eW!$TrK2QPa8giByY*|^Eo+T0tDGGZG0&2&tw-&33PAa3BZl7nM z#;~{mm+1#@%2m&0`98^CoTXE7MJXY+rfUqVpGm`=;R{SUjHFYdanmDZJf_{u5FxEk zOGF2t_n}6Wn7`81=Mk_|-#!su zo$S#1xp_TYd?EpmOXR5JpBj(|;$lw_Yr55u`0%gU!ZxmarSUX~EOYcnX^={vx_^S{ zilgD`HZ=0Y_m=1GLb;W*m|rPRYC4q+*V)ZEZULR!P35XKnk54KHlT_8MobDVn4| z{S=>p#xUZ(z*x%(GBw{yVeO5#Ol8li(C86nR)=(>UI*shB|LcH`mlek0Oq7qgFK+` z;HG$@GVgJmHqA%o=iRQ_c{QlTd@Z?8uwZ7IE(@2RfMf?K<&*l zl)=L{U`%N&{5=x1!ZtoNFBZL0AG=2q6q(%2rf>oXF-XeVd7I8TLK4Nu;CKZ^Dog2! z#IG@VgP!d!T*jWa-;Z(GyeUfY5p(?RK;yCrlO;ttn%H%HcZ-Jv(} z*hhUJx0|=^MC5Xw%V|Q?fqN_VbtcA%CXr++w=a^=AEduoB!+iNpFRl&u<%;fksJ79W3evKz z>^)IqDh@9i0&c~M-d0Ys;@f=c&jUffS^dav277_g!Ec+F}FwJrT|d<{-)&M z<_7$i5XkknR8Wvj(aPDz)0P6r4R%JM0eR^zCoi}C-lcAgTc*CFg)nYp%l*Y4?PEh~ zQ>9eGJ^?M$Z)>Yj{B?}slE?9xuM85Zc)M*^j0nrtGfz0EqkxThD^%(yPmnWuWz>m| ziFUuB)$Gu9Z}3u8aNF2^->#b#K608|+8}V5M4Jjv&?0M=@pk@XIZqhw&|=sbR2j*- z5~v?dwOi2}G49-)CO9$P(O_Y7#l0h?uUJccbvS9!NLtZyu;^kX;V=W!No6+wRVLnQ z{L!t+ne-z3tIMVXq={crVyDB062XK;{Sr%xw!0iWnI>f#!%{|r+@8Cm^;6-xEFY1^ z<<{Euu7`8$2Ej!yg5f9|MlDAcP%-cxU5FT0PehUDhBV)IY?4SMq@zLuajl^w#34U3SH zV7L(u?9gHNTpF-Po{M#@1zG1%r+$`@L%BQI*y1t*>(t0i-){M#-nuXvs0@Qbn(9rW z`uO?zLi6*qNAs+}b>Z>6*2@;HfYyM90Gcb)Xxp>1S`xWJsQj&Y;w$yFVDNL zTG|y3B|B=5c6VJkP$s$edpj0O14zRMTI!Sz$+9$3uII2Zqbjk|^*)A{yO z$y1|%ta{Skg!*ha5+tq~8K`L~1CrEIoXP4v+hP;Dudy$hixf>6{`lLeqfAtl%+w!C zqLu8B!TwNEc-kAYzmCNk>5a~GjZ)DI;zIQsho;(46fv*E^HkoDz?sn9dMn(f?BQVW zr39>UOqs=7;`?F2YngBbTrV`k|5#pd_%6J4MAe$2eZRr#j?LQ@5e;(e`*Fj4i%8&` z!eYNs$Nat@I_%qwWz(Tj>c+y8rgJFX5HMZ%Z9Y?XDoGMPgB?5@1EA?^1uU)2QnsHJ z;>3xRv-%#?Or;&$yPi1WX|hitvzM#_oi7-<$mu_>+@b@v&@*UVju+}rP!;XB zOu0SIt+-@--YGX$50Qds?U%{WI+nFDdM*)mRTTUEW{{^_IG5U){b+sJ>3>+YD@I`8 zZz1zCr~JxSGY(TrR6eT+&ajo>)kH7Ipdf@-8Y2^^KDwf10>|M$PX!}_8s35eZ;M-@ zbL3F6ZOO{S4CbBoef`d)x2%=LGmMn;seG#@JN zBF?XU7!3`xZr$2_0C367WRm+h}flG}Fl$ZTi31Gc|4V~sL_R(PqZQHhQr?GO1wPb>-X zM-gXj42}(_Q+~#uACIcO$&63VKihlEpWIVpwW0q8Gj@GY@nd3^C2{SjKS+=hcRjh+C9iEQ{!7*Jfe{>| zpE*6XFn_lD$N`vGl3nOrlYBYoXTPZ`*|F2I@S1Ug`G>k;q#tQckqan%_o?3Y#96$- zV*6_(*!YsiXg|<$#FbohMx`dc(7M8G3Kih0vTetI{}|JDAE3#6D>{9h$w-L_kneAzMo0>ftFg^WNsiSk;DJC1sT|pv>~H z+5=hZ=Sx05pPq=QHGRkMg6L2qcazK57nKO4InGB2Iu9GXW5uBw$PL}6z?nnyp?>Da zVQ(-wvrgX7E^XlT692SZRF=to952DPHAo`3K2f5ZqSY&6=*-ksYw_&dPJb1^plJqj z&L0)?Je5KGTH2Nuc%y>|5b$X{a)beIxhN65Yt<^+V=_FBJtMohn1H*jC`a!q&%F)K zG_$}I1fe*IOU9Jy=7Yb;I``O)C591mykr)i60ROdtQ=qTfkiXNUAQYh{Wt@u#rZ~p ztI3IAfPB21;8QFQNDi<$HZ}MfD;NsM1%}1phU5eb;wZqezlH+pNMI9uJa9h_HX@rk z4-(IB5jY+PA3T7A#roe8Vd4LdAAtXgAH>Z(tfXC>J=vsnR8_?Ez+$*mU=1P$XdpW~ zxSp68oKFOgM#0X*``Y67{q+I^NvPogug^TMD#duhnq1rzT)!{CZ{hFKU-#c7cJ|-+ zUYovt^Kx+frN_mM^p_ULZ^>(`zqUlIL5HBE%W|62U7ez}3bKi2sDDj>JS@3tVEb%d6F4eAHLV=%C*N z`VIg0^=E*uzWH7L+ed!}_{S-KJLjK{`Qx0w{Q0+G01^=J8rc0o^or{5q5KQstMYHz zZv$Ka&>x_G-1*zBf8hTa7SG>m|30waWj;>MKV7}HdmZjyj`{2UiUjFj6ZU&L{tNdX zQ-9K8fpXp*}=lLJA`Mc4-&*z^`UOW2@?N6t_I|hKCi3z~0gs8B8J=Nn9{XK^; zf6pNrCKoTK5fYn}vxSSL-D?Vq9SBY$B!vWmYYAPzhjI*X|NT3~#}yZM@ikxpvQx0I z19>TUxn3uq69`t*z`^7MBC$!BxyoAE+1PsikqR)=L9&D0NO8dp8hGGX3XV4(u4Wci zY@TesZ2oW9e!l|Jc8*pY6t6wKzCQo>MpSRSiA7;Dp2> z4LeW8GL(4ga>7oVm3bmZpFwX?D>XK#aC}za)#B2fz@qQ{8EEq8iLtRNz zLjy+^9L#sx3QkSUl{u_gA8H;xMrwJ0zc+wXy8X3UPlaw)&Vu(k_oxwV=tF5n4unC4 zZJJ4nB!oQ_6jaLDDO3%U6IOz<)}`22Hp+NRgdh&qJ@!UJMAx0Sl^)-|${Ed0r;1Si z(4@(e<^>n0yQp5Qzy34N*CZjO#%49@vTO&4vp&{QtHJd zuu=kzX_D?@e^9F@zY`ds9T7Lt^UVhFUZQj4sXu{65JNL4<<6B;=*IeIsam8;V+$=l zyImmTBko~KLSV{%rE9?!h^C;*SdcxY?23l{OlMAB|KXf6Fq$Qtd{ae{wiJ`*f{?P; z5Od~AYJn&kFBE>9`xmwQ)r$b_na58swhlsfj{u64R@ zGu*gR4#!mw(Rj=|yi-Y8R7t=C{O3w5xZ+oM>1&%?D-CAW&wx8$93g@oKpqE6pf_0{ z7fw9#JU(KAsX3ZjJ(p514H z<&4!rVfdde=l3f)4|_{0CQiZPlLf^BI2Z1Az8f7MzhOXxD9No}TJON_!)*T|s+I=( zE2nbf=Y;r7HQw+lOp(8-o6U+m=(e#Oe6*QUnsZz=$XZD|38p#=Z$XmYFjF|IW_lX8 zI7f~*3?f6Cui|gxaKm!}x$SVA$|KFc9%XzY*4JR9RDWjfR zo@trSL$dD|_wgvoe__k+O+C&60CFFe)j5-Pl0C1vHYOG-w|L^MskVpN?ZT1RrvdfR57 z9pDAj8r7~=vw@+;If(s5`%|4!rF0Am7RC^PSaspj{z?TZez%KMTI1eag{|_!PzTpu z`QvbX+ZEY9N=Ilv8>rX3rdrUfkvqjx6hC_uKuSnVels4qmrJXT0I?A-X}_sQXt)Fl*dj<6}1dy2No9{rk+oK zIGl5s-Co`cZYm5C?1ur%!D?(3L4X~$Fb=U}jtrK@ohKd}9ks7=vO3XKv`NsGMfOP8 z+32+OZ12bpY^S(Um5*q>cd4jb*^gtHIj<{PzT#*mBv^faAGUgsW?16A3i zeGKZ(^EQPw??V4AdQr3P?VavzXOgX8?j)-}`DBo64v1j$lD}J}RW3sCelu8NujKiG zG%6J6O9HH`7PFRTRSZQy7>h|SW8!GsGIz=M?_>Jj{|SaA&luvUDTj7ma`9Up%mZbI zw41S3yj&erVeKRLOvJhpAe}}-)){b1Tq6Wj5XW4U*pQEt~jWo=mTBO9za@7_0U2wigH_Ap`?hOTn z?OQ}AQiC8;oL$sS45QRw{z~Z}tiw(3Uqz*$oTrw~0(AcZzHfoUi9w2pi@GK4{HbB< zV%D#zRl`24oD4bAU%Q2@_Wd6HNq4MM8vm$sN#mOXrxx5E+f$Yn$yQq@qwgnY_PUIZWK%$l0#tI4;Y1)Nf3)`L+4(gAt9zYcgD>L|1I(YGr9hCP58*x{r*95wdbaI4zfY|=SF<$Ze193%&jDcWZl&`Gzyt_Zcxs0X*=1-A5^w>uM0G z3$s~Ih-c5aA1nccnZ4U+UV6V|?A0CRXbU!w1;9`~3AMnKE7zy;RX z&LQ05Z2_N6PU>F5%y`J^TgBluJVK2;Ym`)6Ry zBJSd7`6mYY6H)LBahR(eWa&iFsI9IsXZ%{t;mzu}NC} zRrlH$>>^Kq1LQ_xQ?m2$cn#xp>?~iCl&=9LI7?m>0m%1Phy_+d!2uspFoJ*_JRJWX zU1>NdYUq%Nq+hRb*Wf9%^AAo}2*zrPV*0h+il0Lw?Q>hug)*rYXy#LSIWhtPLUjC* z@`1Q3Qz$w4Z*5J%N|wX}H=3#hAKK6x2rimm?3CraS-ITuZZ=C>_a2`U)_=Imo`&$g zzf$Df!Oe2q1)&laAXoY2$;$M7j-&<)4F|A0dXRZ7`E6B->(UM|-i?g(v$K7i@5Rqm zQX$0poA`xnJVr z6x?we4v3RV2{&Scgbg^>Yaa7R`_LSdlX#Ff6s z;xJ>jVlG)AU772JAMr)im#;B6Xh240*PQkQw^x*lN)oa4u)0#m%HW3=r+hvU9}U8i z&ZoRFqg=~Tqx>So&?P=-f$R&k_v7rtvN+ion;?zkiCNx|!+jwllp9|nCeilToE(U- zP$xTRwg&R9c0BFPz`WPvMWZ~PU9OTM#cE++M|~t|y*2zqvHb&8hYgFx8Z+P@FHk!zu^a1R}*itNo|5<2JP$oUpec zlc0c1e-EX-Etikk&1N@n^L4|cfjGS;(M3s~+WI6rURc$w`tInu0(Apkn7LsQ!jZP@ zc$_u0GR(yvo(?mRhMYD~8wtDKVmhQnRnvl{{FCe{q(2U?sI|3I2nbbEq@rrc^jH%| ztdm2Xjj@#6*?4}t4l}4!l+U1ApbW3bn*vFpq)L@d6M7=EnBqzIXO_)RT$@ajB5%H6 ztw7$zkKfO1dWALHn`^-V6sLsg0?b5$cOx`q9T$5$Pa7OeDWnk-WjdrXHV$|7SfYxve7q9Sm_gdA zE;{Hz=|9isc2AjEn7+x!8Yfd-e!Ers*w?I)KW<5{5|5R5>_<(tI0WNp2@i?on>@>U z|AWCpeQV~H8T55atR3#t>7Wtf6S2uwdfSWQe0lZ!9N#zlc9Q+{$8UcLc7?Qf-5(POt`H z1Dm#d59((|#T~!!S!o9xe4msbowuN+HigD5hr{*3EbU9!pr>XVF?Qn#hj|oBZ~V!O z5>=}4X1yLMw5nszAUBm$_hK}9#7@ubxg6hrENHPzQ*Pk-1L}w_B9quPLa12MCC9Jw zZ)ye7COJCs%kJgrhJ+TSPei`PYiT`TtlAz_0sl98UKCWdZPF=7ZD+S2J^9{n?zeS+iN&z5aPy zu~|EUFPJ}K{!XX-+y0v!@Vfuz1aWe6@%;M|p@XQ2qw~F{<)8vfFI+h~%A1;jssWLK zLIGyc(nJeG(^AV$R1$+q&M=t)-OF4u9vIq|{{=Q$x+uR5CK-VWGilJ8-Yzv-dVJ-u zYd6miR@r)2WKYCq0<_UvS)tQ<`f%F4{!|k+LnIR|NpFw&^cJF;7qi4o}Xo9D$N=3Er$b$dv)&X%&BPcqO-eO^}k56<_Oum|5aFZ z9GcB#chFvncI}a)sDq!;6J&k}ZZK2QFD-}F+b*%Rv|>_c_mG%p&~{ldB}&a`-!x%+ zeo<7z!QD=62YnTAQ1i~7^j|0Wg!roaHQVO!c&nq=DQ%~H5jj0wS0jZGSGrw&SCf}3EGB>D;|EO| zD={gx#*en6$uR}i8VU?d_HVc%^`-qZzH2f!M>P~|F@VTN)AW_^)V)*4cT~nppcvro zfjhFW>dKlJTnR{}yBd@!9JuoBsvlD5OJoi-kjtY}AgyHO%6&e{r9@>a5^88LVB0ee zs{belr*L!SxR>Fiu;MC)O4+F)e-uAVwyj}M`DvMb)Q0;5E#X1Qk@-E=UhG42Xj6+r z&is9)Br~W!kw)%%Hq8_2iSQ|I+B`G^T9NvSn7H5BJZmU{oSgre-ihbrrs;tmfPJlK zn*k`csKTxUmo)0^m7F@R3a$oq*m%|+aUVPv?$xB{>y({Ud{TLN`^Qa?)%E;QEyZ(`-ybY=mm18KEtrr%t z(b&B%vDAP#{b7o}%`w9>n(6D4(B`Yd$L9@l7I0Z*?U+LMdNSvoFxjXpDI&b?>w(?{ z5HrKC_lhHA-yj)`DG0Wg`3PRn2m(o7sXtfP4qQ+q8 zJJF8At*LL~GU^6nXTD;7m)0$_mu{R~jfz~H#JDZMpG*)(5r|yF>$Do*Rg}^lCPD{o zZ7T|xQeyPqhd?&oFTeXxwnOiM_U2lqF|?AjOA9`FiiJ{~=RUqTzSWg(9-4li3CKm9 ziHWQMFAC$l!GZq8tliN5ER1TNHnJ`!Zf*&j#w~6JxKS8@a(qi4&RXXabqp0W^=X+) z))k_78>AX@i`E=EOX9WTWT%wB3m*+)0%?>ZTHZqRh>1_|wb-c+s%S;S)A#Wag^EG3 z4@U}C!LpN34ei-}i$WZFfj}nAxL81n+)DJRK1aFxbO$OVcTRqE-)zOa`S#AZC$8zq z+x^x~1e-Z4mUe+S;5sv;tNHr#sy(0ZfGKh_F^}&&sY1PScvg|oKK2xJ_gNn3k&0X) zcU7K2Jtjia93j;BeO}F+VkFg?arq)w;l@}Bk&8b1y{x|r<3romb4bWZ+56XXsrI1k zH;@BaK5rNMuG!TejHH(3TQWZ9e>+MGsGB*riF>O^$oV{kzfpqqiN*w=WgjDr!>FII z4os7pzc+LEl!3net8Gi?dELwigrz2QW6Cr?HUdziJX`o_q$Wis&-Fgu;HaBwXJcA$ z@gY)}|EC-7k?h$kj|vkI|Jl`D<;U3j)b$MV^iI-?7pg0U3ig`2UC*m0=FVx_X`75r<04F&FFWB1*hR5VTVr2-Z!fSn0zt zVK*6by*8V-1e&dyv*lypx-YZXLeyY80Cid7xRz8a2i*!+JJ~;U;lqmdT7}-+GD}1^ zOqCyC0Cw{H;ziCve#mgxQSg4J=9A{Aeg?XCpsr!mLK91gmV0kdTq14JTO&4XugY6Q zMj$B1G$KID{vC_+cg45XAOk3(pX}n&O<$1AfR4uzLaWHjam87;U2=i#$Te2QI!Z-> zIe7HJPepMyhMZ|}8WwXd?Byx~6?}SEZ+}@wMOvg>ZIu(GB{nq^stMwn1BvV~4YOeo z1KU4Gd`TlhcN`5!q=j)9r4?`EpR=|q9GEl}LbS_EyevV9xwUmN11XDr&+OOyd{1X` zlxot5W?tt#Bo2VEv!N##y=Af(!aly@p$j?r7~~QE3uR589h_TI&rORgKvXqilRLxa z*SXH+ojmPvd3{ni_T*Y;@D-#r;Iw*&cu!FO;f$1@GV+Wt6~wYDD8WNlHo|S`qIPUJ zdOa0zW+eD6WML@10c5^I{9&sp^yaD6{A3(9uPQ*qGe{ch(xy7AKiH+BvQ3Nafpb^# zl;tPw(x*yywpfgppiuY!KC>WAWYd?*n-xQuNd1K{B6s-L|Ku z*;pl#^j$9VxPl^Ze)9W{1iAkhXuK<%u@6=816Oc24(W%N2}UUPp`h?DZ{(=Aa~N%R zF;2tRdrvz7FyoxP9#`D0ntk4wmCIPTwxXT~z<&W4cNtekp<{m>{Y+dl(mB6-77`~7?wfr9mx zAjcSA>&?%hax~rW)jAh)ypY9#C2+jX&dhjl0)gQ$y}LxXF6z!qqwdXm`!AbC+frm> z5wZ;{X!Bnn9P>G~qCzgXE_riGUw+Z6j!ejrtZ9l?2~iH-=Ga?x-#iH;a-(&_?$XJV zUB^p5WMbwo#tRO^D9mDIorL@DP}(&nf%*{oq1q&49myd7hl8!G;~Hz{GuNjCp{SE; z6Gv+DYS-KhE<0RQ45B5Kx320ldkKMh-99{w!c+mEUdN>?Gek4;$?#O<9kiZjmdsmc z;U19U`(7*BV~v<#?Y@n=49*I2UWWX$!pg|XNt3(#VJ^?ScXr527bt{1v~|2Lg|H8% zh#b1DE8|Wh?(mdDuGYu|2zH_!-|vEX*PUr{Mh&od)~t#LMCj-=S-JbvWvb#=Nyox! zSd(->^mDr_;v$8WsXCbpj&NCYY+N^T)s72vSt=mwZ)8ZE_A)o`^Ew~B#tWoj?wNu3 z!?GOb5g5+--;s$e4%pes{OX;0`vjU39=3}D*=%ED8J{sWAASvHD?Nk_?P((DS_}_a zn}%t)5#_#ja)n%jnXP9jZvGB(>oLCmA{UAc+61Iy{9>@wT3b3{N&>cIiOm^9z;sc) z9QU1aeeZkz&KGMgzVm|fmL@@xWmWPe+CbW&DeI$%*n?K?LQA`%cU3+od`W`^kt@aR zwPG!9yO`E)NOed2pQ86Jud8A1U83F^CYJT-gb=nR4GYN{9CwZ3Ls+@mJ;MfFm6z9O2R zTk&QZ3CMEZxVlNMZMLJGb_WX0;$w?dGKncLP3feCc(`m-Pcnn#8>%PoC)Wki=Qv)F zzSF-susn#N7ch+V&!vtW9Md9ZEh&_>0HtK7r_=*E*vu4o-6a&>7n@8xABJ7g>c|DK zBJ#FfYN}V8sPIRriQJbTFTKk=v|v~pgI!CPG0J{XA*->b#15gO`=^tJw%cPztP!W6Xfxc zumnMv{`i`w84-RtB@@1;F6gu5FPq4)MD}T)V#ZSBK~@-h+^1sXK)2Lw-1zx^4=QSW z1x35;Fb|p{EG-r$>|YhWPNA~#QIT7Mk4OMxIH!*oVSUpJ98W;VQ>%_sx%*gVkfz8e~0 zKcykNlBt?o!yl|QA^a+A{`2{q&_lG_4=Wr4{;Qp!6h{>PdDv%2!93=&q!JJxs@doC zbz9fnys*yQc1x52HR}-;j^i^plVte;)q4}{xSxQ&z0VA%p_=^%=-=?kV|wch3`1u5 z5S|8*BU$~q+}$E5gv=f!rd#W@P_(9oH>+b!E6>sVSq?!g5g+HX+wUAg#Oqb6qg)0e zXynZA%*+&mKk%phT!w<;U1J9|NV#W4upF|uzz(vJ7P>^_+smS)9&$PZku-|G(8BCY zi1{ML`goe5RrSfsMOiXsI0q7~(m#@?twx zeExMEFJp_r<=6(+&GB_RNQbm#MWQH@Q67zC@=k_KS~I#jD2ERvJ8Td30MCa&;Lf-|k8HeF!EC~;3Sb*1b zs?v1CvteqG%}9QHH;FzN2wha9H&Rl?TJTBaP6K z2$4`#d`?`U@o0v;*|#5ro%;%PGA9?F9#SNbcB@s~N;h0wi&v$LOZRfj|%*p!{iKKPma5(@g| z13whO8Fluy)O&i6vhCK;5WZ%`tmr!J80*V^OANC~rCizHW0wJt2 zIu(|C@QVcZ`NY$bMQiP7tea>`2`rLWWe=;p*(PZ)b=f1RZ}K}O^Jlx~CcXv+d4*NRBEz{+Te68zE# z!4pCV!Y-97LPW2g>1XL#=!Gu0PU_?EIt!9(*Uz7)$Pu!d!;BR+g!a4PtxqEM{LOYT zKBe25+ccwo0x!4m?sb0Fm@d{*>AUx3&$V0Is;PL`1=*goy4y`Q1Zf?eeP}9((BL6* zUKf~s$FHaR&Z3tTe-m*5Ffp#iy-bOsLP&bxZVG!Hrb6yT#=poo)^V0h+|3n}p)@c7 zKrW=vvPDmXo8FMz+I_Ew&-@`T$H3chJ(o?SG7-H`50O=Wa8)c_`z&gWFzX~6JSv}~ zV^iWR3*w44_G?6JS^^y3D9c_W zKJI*?(?f6$US5o0RpZ0SOBjd7V}q*38xu=o0r>~ z?~fU}#vbEBNZD7bZ(a{uUTNW;b}r76W}a3IlKkudb`Ah9kQV^t1pYBi4*<}=swufx z{@*mfA5AInUO~JO7XEvHzV24mujHTC^O`kNVo`1m?pI>i?+=AD1=61ake7#p^B*z* zH#^@e0sTMp0NeloADGXK7R2{T$N5LyD+TEFz~?{oU)g1^grxtJ0l4{que_}P)B|v_ z|4%(G_E(PCf9L^t_}E|bhJaUM)W5(3xH{2 diff --git a/zlib/zlib.h b/zlib/zlib.h index 6b7244f9943..8d4b932eaf6 100644 --- a/zlib/zlib.h +++ b/zlib/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.3, August 18th, 2023 + version 1.3.1, January 22nd, 2024 - Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.3" -#define ZLIB_VERNUM 0x1300 +#define ZLIB_VERSION "1.3.1" +#define ZLIB_VERNUM 0x1310 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 3 -#define ZLIB_VER_REVISION 0 +#define ZLIB_VER_REVISION 1 #define ZLIB_VER_SUBREVISION 0 /* @@ -936,10 +936,10 @@ ZEXTERN int ZEXPORT inflateSync(z_streamp strm); inflateSync returns Z_OK if a possible full flush point has been found, Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. + In the success case, the application may save the current value of total_in + which indicates where valid compressed data was found. In the error case, + the application may repeatedly call inflateSync, providing more input each + time, until success or end of the input data. */ ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, @@ -1758,14 +1758,14 @@ ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); seq1 and seq2 with lengths len1 and len2, CRC-32 check values were calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. + len2. len2 must be non-negative. */ /* ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); Return the operator corresponding to length len2, to be used with - crc32_combine_op(). + crc32_combine_op(). len2 must be non-negative. */ ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); diff --git a/zlib/zlib.map b/zlib/zlib.map index b330b606feb..31544f2e93d 100644 --- a/zlib/zlib.map +++ b/zlib/zlib.map @@ -1,100 +1,100 @@ -ZLIB_1.2.0 { - global: - compressBound; - deflateBound; - inflateBack; - inflateBackEnd; - inflateBackInit_; - inflateCopy; - local: - deflate_copyright; - inflate_copyright; - inflate_fast; - inflate_table; - zcalloc; - zcfree; - z_errmsg; - gz_error; - gz_intmax; - _*; -}; - -ZLIB_1.2.0.2 { - gzclearerr; - gzungetc; - zlibCompileFlags; -} ZLIB_1.2.0; - -ZLIB_1.2.0.8 { - deflatePrime; -} ZLIB_1.2.0.2; - -ZLIB_1.2.2 { - adler32_combine; - crc32_combine; - deflateSetHeader; - inflateGetHeader; -} ZLIB_1.2.0.8; - -ZLIB_1.2.2.3 { - deflateTune; - gzdirect; -} ZLIB_1.2.2; - -ZLIB_1.2.2.4 { - inflatePrime; -} ZLIB_1.2.2.3; - -ZLIB_1.2.3.3 { - adler32_combine64; - crc32_combine64; - gzopen64; - gzseek64; - gztell64; - inflateUndermine; -} ZLIB_1.2.2.4; - -ZLIB_1.2.3.4 { - inflateReset2; - inflateMark; -} ZLIB_1.2.3.3; - -ZLIB_1.2.3.5 { - gzbuffer; - gzoffset; - gzoffset64; - gzclose_r; - gzclose_w; -} ZLIB_1.2.3.4; - -ZLIB_1.2.5.1 { - deflatePending; -} ZLIB_1.2.3.5; - -ZLIB_1.2.5.2 { - deflateResetKeep; - gzgetc_; - inflateResetKeep; -} ZLIB_1.2.5.1; - -ZLIB_1.2.7.1 { - inflateGetDictionary; - gzvprintf; -} ZLIB_1.2.5.2; - -ZLIB_1.2.9 { - inflateCodesUsed; - inflateValidate; - uncompress2; - gzfread; - gzfwrite; - deflateGetDictionary; - adler32_z; - crc32_z; -} ZLIB_1.2.7.1; - -ZLIB_1.2.12 { - crc32_combine_gen; - crc32_combine_gen64; - crc32_combine_op; -} ZLIB_1.2.9; +ZLIB_1.2.0 { + global: + compressBound; + deflateBound; + inflateBack; + inflateBackEnd; + inflateBackInit_; + inflateCopy; + local: + deflate_copyright; + inflate_copyright; + inflate_fast; + inflate_table; + zcalloc; + zcfree; + z_errmsg; + gz_error; + gz_intmax; + _*; +}; + +ZLIB_1.2.0.2 { + gzclearerr; + gzungetc; + zlibCompileFlags; +} ZLIB_1.2.0; + +ZLIB_1.2.0.8 { + deflatePrime; +} ZLIB_1.2.0.2; + +ZLIB_1.2.2 { + adler32_combine; + crc32_combine; + deflateSetHeader; + inflateGetHeader; +} ZLIB_1.2.0.8; + +ZLIB_1.2.2.3 { + deflateTune; + gzdirect; +} ZLIB_1.2.2; + +ZLIB_1.2.2.4 { + inflatePrime; +} ZLIB_1.2.2.3; + +ZLIB_1.2.3.3 { + adler32_combine64; + crc32_combine64; + gzopen64; + gzseek64; + gztell64; + inflateUndermine; +} ZLIB_1.2.2.4; + +ZLIB_1.2.3.4 { + inflateReset2; + inflateMark; +} ZLIB_1.2.3.3; + +ZLIB_1.2.3.5 { + gzbuffer; + gzoffset; + gzoffset64; + gzclose_r; + gzclose_w; +} ZLIB_1.2.3.4; + +ZLIB_1.2.5.1 { + deflatePending; +} ZLIB_1.2.3.5; + +ZLIB_1.2.5.2 { + deflateResetKeep; + gzgetc_; + inflateResetKeep; +} ZLIB_1.2.5.1; + +ZLIB_1.2.7.1 { + inflateGetDictionary; + gzvprintf; +} ZLIB_1.2.5.2; + +ZLIB_1.2.9 { + inflateCodesUsed; + inflateValidate; + uncompress2; + gzfread; + gzfwrite; + deflateGetDictionary; + adler32_z; + crc32_z; +} ZLIB_1.2.7.1; + +ZLIB_1.2.12 { + crc32_combine_gen; + crc32_combine_gen64; + crc32_combine_op; +} ZLIB_1.2.9; diff --git a/zlib/zutil.h b/zlib/zutil.h index 902a304cc2d..48dd7febae6 100644 --- a/zlib/zutil.h +++ b/zlib/zutil.h @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -56,7 +56,7 @@ typedef unsigned long ulg; extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] +#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)] #define ERR_RETURN(strm,err) \ return (strm->msg = ERR_MSG(err), (err)) @@ -137,17 +137,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # endif #endif -#if defined(MACOS) || defined(TARGET_OS_MAC) +#if defined(MACOS) # define OS_CODE 7 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif #endif #ifdef __acorn @@ -170,18 +161,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define OS_CODE 19 #endif -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#endif - #if defined(__BORLANDC__) && !defined(MSDOS) #pragma warn -8004 #pragma warn -8008 From 288ea9e146a238872998d7089070e82f39272728 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Thu, 25 Apr 2024 00:13:02 +0200 Subject: [PATCH 07/74] galera SST scripts: parsing CN in certificates This commit contains a fix for the code that extracts and parses the CN (common name, domain name) record from certificates using the openssl utility. This code is also made common to the rsync and mariabackup scripts. There is also some systematization of the use of 'printf' and 'echo' builtins/utilities. --- mysql-test/suite/galera/disabled.def | 1 - scripts/wsrep_sst_common.sh | 220 ++++++++++++++++++++++----- scripts/wsrep_sst_mariabackup.sh | 17 +-- scripts/wsrep_sst_rsync.sh | 23 +-- 4 files changed, 192 insertions(+), 69 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 1f41e521bd3..a5a1a6f18b1 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -18,7 +18,6 @@ galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the gal galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback() galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback() galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed -mdev-31285 : MDEV-25089 Assertion `error.len > 0' failed in galera::ReplicatorSMM::handle_apply_error() galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes MDEV-22232 : temporarily disabled at the request of Codership MW-402 : temporarily disabled at the request of Codership diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 63d2d4ef6d1..14e058cecee 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -23,6 +23,22 @@ trap 'exit 3' INT QUIT TERM # Setting the path for some utilities on CentOS export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" +commandex() +{ + if [ -n "$BASH_VERSION" ]; then + command -v "$1" || : + elif [ -x "$1" ]; then + echo "$1" + else + which "$1" || : + fi +} + +with_printf=1 +if [ -z "$BASH_VERSION" ]; then + [ -z "$(commandex printf)" ] && with_printf=0 +fi + trim_string() { if [ -n "$BASH_VERSION" ]; then @@ -35,9 +51,9 @@ trim_string() y=${#y} x=$(( z-x-1 )) y=$(( y-x+1 )) - printf '%s' "${1:$x:$y}" + echo "${1:$x:$y}" else - printf '' + echo '' fi else local pattern="[[:space:]${2:-}]" @@ -59,9 +75,9 @@ trim_dir() y=$(( y-x+1 )) x="${1:$x:$y}" [ -z "$x" ] && x='.' - printf '%s' "$x" + echo "$x" else - printf '' + echo '' fi else local pattern="[:space:]${2:-}" @@ -85,9 +101,9 @@ trim_right() y=${#y} if [ $y -ne $z ]; then y=$(( y+1 )) - printf '%s' "${1:0:$y}" + echo "${1:0:$y}" else - printf '' + echo '' fi else local pattern="[[:space:]${2:-}]" @@ -95,6 +111,25 @@ trim_right() fi } +trim_left() +{ + if [ -n "$BASH_VERSION" ]; then + local pattern="[![:space:]${2:-}]" + local x="${1#*$pattern}" + local z=${#1} + x=${#x} + if [ $x -ne $z ]; then + x=$(( z-x-1 )) + echo "${1:$x:$z}" + else + echo '' + fi + else + local pattern="[[:space:]${2:-}]" + echo "$1" | sed -E "s/^$pattern+//g" + fi +} + to_minuses() { local x="$1" @@ -105,11 +140,7 @@ to_minuses() x="$t" t="${t#*_}" done - if [ -n "$BASH_VERSION" ]; then - printf '%s' "$r$x" - else - echo "$r$x" - fi + echo "$r$x" } WSREP_SST_OPT_BYPASS=0 @@ -383,9 +414,11 @@ case "$1" in # option name: if [ -n "$BASH_VERSION" ]; then option="${options:0:1}" + elif [ $with_printf -ne 0 ]; then + option=$(printf '%.1s' "$options") else - # If it's not bash, then we need to use slow - # external utilities: + # If it's not bash and without printf, + # then we need to use slow external utilities: option=$(echo "$options" | cut -c1) fi # And the subsequent characters consider option value: @@ -788,17 +821,6 @@ WSREP_SST_OPT_ADDR="$WSREP_SST_OPT_HOST:$WSREP_SST_OPT_PORT$sst_path" readonly WSREP_SST_OPT_ADDR readonly WSREP_SST_OPT_ADDR_PORT -commandex() -{ - if [ -n "$BASH_VERSION" ]; then - command -v "$1" || : - elif [ -x "$1" ]; then - echo "$1" - else - which "$1" || : - fi -} - # try to use my_print_defaults, mysql and mysqldump that come # with the sources (for MTR suite): script_binary=$(dirname "$0") @@ -929,11 +951,7 @@ parse_cnf() # Truncate spaces: [ -n "$reval" ] && reval=$(trim_string "$reval") - if [ -n "$BASH_VERSION" ]; then - printf '%s' "$reval" - else - echo "$reval" - fi + echo "$reval" } # @@ -986,11 +1004,8 @@ in_config() break fi done - if [ -n "$BASH_VERSION" ]; then - printf '%s' $found - else - echo $found - fi + + echo $found } wsrep_auth_not_set() @@ -1128,9 +1143,7 @@ wsrep_gen_secret() printf '%04x%04x%04x%04x%04x%04x%04x%04x' \ $RANDOM $RANDOM $RANDOM $RANDOM \ $RANDOM $RANDOM $RANDOM $RANDOM - elif [ -n "$(commandex cksum)" -a \ - -n "$(commandex printf)" ] - then + elif [ $with_printf -ne 0 -a -n "$(commandex cksum)" ]; then printf '%08x%08x%08x%08x' \ $(head -8 /dev/urandom | cksum | cut -d ' ' -f1) \ $(head -8 /dev/urandom | cksum | cut -d ' ' -f1) \ @@ -1569,6 +1582,139 @@ check_server_ssl_config() fi } +# Get Common Name (CN) from the certificate: +openssl_getCN() +{ + get_openssl + if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_error \ + 'openssl not found but it is required for authentication' + exit 42 + fi + + local bug=0 + local CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$1" 2>&1) || bug=1 + + if [ $bug -ne 0 ]; then + wsrep_log_info "run: \"$OPENSSL_BINARY\" x509 -noout -subject -in \"$1\"" + wsrep_log_info "output: $CN" + wsrep_log_error "******** FATAL ERROR **********************************************" + wsrep_log_error "* Unable to parse the certificate file to obtain the common name. *" + wsrep_log_error "*******************************************************************" + exit 22 + fi + + CN=$(trim_string "$CN") + + if [ -n "$CN" ]; then + # If the string begins with the "subject" prefix + # then we need to remove it: + local saved="$CN" + local remain="${CN#subject}" + if [ "$remain" != "$saved" ]; then + remain=$(trim_left "$remain") + # Now let's check for the presence of "=" character + # after the "subject": + saved="$remain" + remain="${remain#=}" + if [ "$remain" != "$saved" ]; then + remain=$(trim_left "$remain") + else + remain="" + bug=1 + fi + fi + while [ -n "$remain" ]; do + local value="" + # Let's extract the option name - all characters + # up to the first '=' or ',' character (if present): + local option="${remain%%[=,]*}" + if [ "$option" != "$remain" ]; then + option=$(trim_right "$option") + # These variables will be needed to determine + # which separator comes first: + local x="${remain#*=}" + local y="${remain#*,}" + local z=${#remain} + x=${#x}; [ $x -eq $z ] && x=0 + y=${#y}; [ $y -eq $z ] && y=0 + # The remaining string is everything that follows + # the separator character: + remain=$(trim_left "${remain#*[=,]}") + # Let's check what we are dealing with - an equal + # sign or a comma? + if [ $x -gt $y ]; then + # If the remainder begins with a double quote, + # then there is a string containing commas and + # we need to parse it: + saved="$remain" + remain="${remain#\"}" + if [ "$remain" != "$saved" ]; then + while :; do + # We need to find the closing quote: + local prefix="$remain" + remain="${remain#*\"}" + # Let's check if there is a closing quote? + if [ "$remain" = "$prefix" ]; then + bug=1 + break + fi + # Everything up to the closing quote is + # the next part of the value: + value="$value${prefix%%\"*}" + # But if the last character of the value + # is a backslash, then it is a quoted quotation + # mark and we need to add it to the value: + if [ "${value%\\}" != "$value" ]; then + value="$value\"" + else + break + fi + done + [ $bug -ne 0 ] && break + # Now we have to remove "," if it is present + # in the string after the value: + saved=$(trim_left "$remain") + remain="${saved#,}" + if [ "$remain" != "$saved" ]; then + remain=$(trim_left "$remain") + elif [ -n "$remain" ]; then + bug=1 + break + fi + else + # We are dealing with a simple unquoted string value, + # therefore we need to take everything up to the end + # of the string, or up to the next comma character: + value="${remain%%,*}" + if [ "$value" != "$remain" ]; then + remain=$(trim_left "${remain#*,}") + else + remain="" + fi + value=$(trim_right "$value") + fi + if [ "$option" = 'CN' -a -n "$value" ]; then + echo "$value" + return + fi + fi + else + remain="" + fi + done + fi + + if [ $bug -ne 0 ]; then + wsrep_log_error "******** FATAL ERROR **********************************************" + wsrep_log_error "* Unable to parse the certificate options: '$CN'" + wsrep_log_error "*******************************************************************" + exit 22 + fi + + echo '' +} + simple_cleanup() { # Since this is invoked just after exit NNN diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 4e21270feb2..118fd6964c5 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -1205,11 +1205,11 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then else # BYPASS FOR IST wsrep_log_info "Bypassing the SST for IST" - echo "continue" # now server can resume updating data + echo 'continue' # now server can resume updating data send_magic - echo "1" > "$DATA/$IST_FILE" + echo '1' > "$DATA/$IST_FILE" if [ -n "$scomp" ]; then tcmd="$scomp | $tcmd" @@ -1320,7 +1320,7 @@ else # joiner check_round=0 while check_pid "$SST_PID" 0; do wsrep_log_info "previous SST is not completed, waiting for it to exit" - check_round=$(( check_round + 1 )) + check_round=$(( check_round+1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "previous SST script still running." exit 114 # EALREADY @@ -1347,16 +1347,7 @@ else # joiner # backward-incompatible behavior: CN="" if [ -n "$tpem" ]; then - # find out my Common Name - get_openssl - if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error \ - 'openssl not found but it is required for authentication' - exit 42 - fi - CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \ - tr ',' '\n' | grep -F 'CN =' | cut -d '=' -f2 | sed s/^\ // | \ - sed s/\ %//) + CN=$(openssl_getCN "$tpem") fi MY_SECRET="$(wsrep_gen_secret)" # Add authentication data to address diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 3dc5da7a48e..e386930c5b7 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -354,7 +354,7 @@ SST_PID="$DATA/wsrep_sst.pid" check_round=0 while check_pid "$SST_PID" 0; do wsrep_log_info "Previous SST is not completed, waiting for it to exit" - check_round=$(( check_round + 1 )) + check_round=$(( check_round+1 )) if [ $check_round -eq 20 ]; then wsrep_log_error "previous SST script still running." exit 114 # EALREADY @@ -370,7 +370,7 @@ check_round=0 while check_pid "$STUNNEL_PID" 1 "$STUNNEL_CONF"; do wsrep_log_info "Lingering stunnel daemon found at startup," \ "waiting for it to exit" - check_round=$(( check_round + 1 )) + check_round=$(( check_round+1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "stunnel daemon still running." exit 114 # EALREADY @@ -388,7 +388,7 @@ check_round=0 while check_pid "$RSYNC_PID" 1 "$RSYNC_CONF"; do wsrep_log_info "Lingering rsync daemon found at startup," \ "waiting for it to exit" - check_round=$(( check_round + 1 )) + check_round=$(( check_round+1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "rsync daemon still running." exit 114 # EALREADY @@ -481,11 +481,7 @@ EOF tar_type=2 fi if [ $tar_type -eq 2 ]; then - if [ -n "$BASH_VERSION" ]; then - printf '%s' "$binlog_files" >&2 - else - echo "$binlog_files" >&2 - fi + echo "$binlog_files" >&2 fi if [ $tar_type -ne 0 ]; then # Preparing list of the binlog file names: @@ -854,16 +850,7 @@ EOF # backward-incompatible behavior: CN="" if [ -n "$SSTCERT" ]; then - # find out my Common Name - get_openssl - if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error \ - 'openssl not found but it is required for authentication' - exit 42 - fi - CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$SSTCERT" | \ - tr ',' '\n' | grep -F 'CN =' | cut -d '=' -f2 | sed s/^\ // | \ - sed s/\ %//) + CN=$(openssl_getCN "$SSTCERT") fi MY_SECRET="$(wsrep_gen_secret)" # Add authentication data to address From 1532f1205832c8a7278cea695f074aae0fc61eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 12 Apr 2024 15:40:11 +0300 Subject: [PATCH 08/74] MDEV-33898 : Galera test failure on galera.MW-369 Tests using MW-369.inc sometimes hanged after signaling two debug sync points inside a Galera library. Replaced Galera library sync point with server code sync point when possible and added more wait_conditions to make sure we are in correct state. Tests effected: MW-369, MW-402, MDEV-27276, and mysql-wsrep#332. Signed-off-by: Julius Goryavsky --- mysql-test/suite/galera/disabled.def | 2 - mysql-test/suite/galera/galera_4nodes.cnf | 4 + mysql-test/suite/galera/r/MDEV-27276.result | 6 +- mysql-test/suite/galera/r/MW-369.result | 126 ++++++++---------- mysql-test/suite/galera/r/MW-402.result | 108 +++++++-------- .../suite/galera/r/mysql-wsrep#332.result | 12 -- mysql-test/suite/galera/t/MDEV-27276.test | 43 +++++- mysql-test/suite/galera/t/MW-369.inc | 40 +++--- mysql-test/suite/galera/t/MW-369.test | 1 - .../suite/galera/t/mysql-wsrep#332.test | 113 +++++++++++++++- 10 files changed, 283 insertions(+), 172 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index a5a1a6f18b1..d6d70c7c43e 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -19,6 +19,4 @@ galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsr galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback() galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes -MDEV-22232 : temporarily disabled at the request of Codership -MW-402 : temporarily disabled at the request of Codership galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf index 66238a8e4c2..3ad1a66b9e6 100644 --- a/mysql-test/suite/galera/galera_4nodes.cnf +++ b/mysql-test/suite/galera/galera_4nodes.cnf @@ -21,6 +21,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#gale wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port' wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' +auto-increment-offset=1 [mysqld.2] wsrep-on=1 @@ -32,6 +33,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#gale wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port' wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' +auto-increment-offset=2 [mysqld.3] wsrep-on=1 @@ -43,6 +45,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#gale wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port' wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port' +auto-increment-offset=3 [mysqld.4] wsrep-on=1 @@ -54,6 +57,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#gale wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port' wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port' +auto-increment-offset=4 [ENV] NODE_MYPORT_1= @mysqld.1.port diff --git a/mysql-test/suite/galera/r/MDEV-27276.result b/mysql-test/suite/galera/r/MDEV-27276.result index 7e5b29fad7e..38e217a9ea8 100644 --- a/mysql-test/suite/galera/r/MDEV-27276.result +++ b/mysql-test/suite/galera/r/MDEV-27276.result @@ -16,17 +16,15 @@ connection node_1a; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; connection node_1; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1a; +SET SESSION DEBUG_SYNC = "RESET"; connection node_2; SELECT * FROM p; id f2 diff --git a/mysql-test/suite/galera/r/MW-369.result b/mysql-test/suite/galera/r/MW-369.result index 9f0a77edbbc..b4fb8668e74 100644 --- a/mysql-test/suite/galera/r/MW-369.result +++ b/mysql-test/suite/galera/r/MW-369.result @@ -12,22 +12,20 @@ START TRANSACTION; DELETE FROM p WHERE f1 = 1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; INSERT INTO c VALUES (1, 1); connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; @@ -54,22 +52,20 @@ START TRANSACTION; UPDATE p SET f2 = 1 WHERE f1 = 1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; UPDATE c SET f2 = 1 WHERE f1 = 1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; connection node_2; SELECT * FROM p; @@ -94,22 +90,20 @@ START TRANSACTION; UPDATE p SET f2 = 1 WHERE f1 = 1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; DELETE FROM c WHERE f1 = 1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; connection node_2; SELECT * FROM p; @@ -130,22 +124,20 @@ START TRANSACTION; UPDATE p SET f2 = 1 WHERE f1 = 1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; INSERT INTO c VALUES (1, 0);; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; @@ -170,22 +162,20 @@ START TRANSACTION; DELETE FROM p WHERE f1 = 1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; UPDATE c SET f2 = 1 WHERE f1 = 1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; @@ -215,22 +205,20 @@ START TRANSACTION; INSERT INTO cf (f1, p_id) VALUES (10, 1); connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; INSERT INTO cf (f1, p_id) VALUES (20, 1); connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; connection node_2; SELECT * FROM pf; @@ -255,22 +243,20 @@ START TRANSACTION; UPDATE pg SET f2 = 1 WHERE f1 = 1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; INSERT INTO cg VALUES (1, 1, 0); connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; connection node_2; SELECT * FROM pg; diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result index f692c90d611..e936b83553d 100644 --- a/mysql-test/suite/galera/r/MW-402.result +++ b/mysql-test/suite/galera/r/MW-402.result @@ -15,22 +15,20 @@ START TRANSACTION; UPDATE c SET f2=1 where f1=1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; DELETE FROM p WHERE f1 = 1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; @@ -55,22 +53,20 @@ START TRANSACTION; UPDATE c SET f2=2 where f1=1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; UPDATE p set f1=11 WHERE f1 = 1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; @@ -97,22 +93,20 @@ START TRANSACTION; UPDATE c SET p_id=2 where f1=1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; UPDATE p set f1=11 WHERE f1 = 1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; @@ -130,22 +124,20 @@ START TRANSACTION; UPDATE p set f1=21 WHERE f1 = 11; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; UPDATE c SET p_id=2 where f1=1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; @@ -176,22 +168,20 @@ START TRANSACTION; UPDATE p2 SET f2=2 where f1=1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; DELETE FROM p1 WHERE f1 = 1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; connection node_2; SELECT * FROM p1; @@ -223,22 +213,20 @@ START TRANSACTION; DELETE FROM p2 WHERE f1=1; connection node_1a; SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; connection node_2; DELETE FROM p1 WHERE f1=1; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; connection node_1; +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; -SET GLOBAL wsrep_provider_options = 'dbug='; +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_2; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#332.result b/mysql-test/suite/galera/r/mysql-wsrep#332.result index 565979a93ae..16b078175bb 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#332.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#332.result @@ -21,14 +21,10 @@ connection node_1a; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; connection node_1; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction @@ -64,14 +60,10 @@ connection node_1a; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; connection node_1; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction @@ -112,14 +104,10 @@ connection node_1a; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync'; connection node_1; COMMIT; connection node_1a; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction diff --git a/mysql-test/suite/galera/t/MDEV-27276.test b/mysql-test/suite/galera/t/MDEV-27276.test index 1c589c9e85b..bdce0d91373 100644 --- a/mysql-test/suite/galera/t/MDEV-27276.test +++ b/mysql-test/suite/galera/t/MDEV-27276.test @@ -17,7 +17,7 @@ # We use concurrency facility of test MW-369 to setup the conflict between DDL and DML # -# Open connection node_1a here, MW-369.inc will use it later +# Open connection node_1a here, we will use it later --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 # create FK parent table @@ -28,14 +28,51 @@ CREATE TABLE p (id INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; --let $mw_369_parent_query = INSERT INTO p VALUES(1,0) --let $mw_369_child_query = CREATE TABLE c(id INT NOT NULL PRIMARY KEY, p_id INT, FOREIGN KEY (p_id) REFERENCES p(id) ON DELETE CASCADE) ENGINE=InnoDB -# execute above queries through separate nodes ---source MW-369.inc +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; +--eval $mw_369_parent_query + +# +# Block the $mw_369_child_query from node_2 +# +# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_set_sync_point.inc + +# +# insert client row, which will make it impossible to replay the +# delete on parent +# +--connection node_2 +--eval $mw_369_child_query + +# +# Wait until $mw_369_child_query from node_2 reaches the sync point and +# block the 'COMMIT' from node_1 before it certifies. +# +--connection node_1a +--source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc + +--connection node_1 +--send COMMIT + +--connection node_1a +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc # Expect certification failure --connection node_1 --error ER_LOCK_DEADLOCK --reap +--connection node_1a +SET SESSION DEBUG_SYNC = "RESET"; + --connection node_2 SELECT * FROM p; SELECT * FROM c; diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc index 71df979d6ba..f080d99fe7e 100644 --- a/mysql-test/suite/galera/t/MW-369.inc +++ b/mysql-test/suite/galera/t/MW-369.inc @@ -12,9 +12,9 @@ # START TRANSACTION; # $mw_369_parent_query # node_2 -# $mw_369_child_query - will be blocked on node_1 in apply monitor +# $mw_369_child_query - will be blocked on node_1 in wsrep_apply_cb # node_1: -# COMMIT; - will be blocked on node_1 in local monitor +# COMMIT; - will be blocked on node_1 in wsrep_after_certification # # The $mw_369_child_query is always expected to succeed. The caller is # responsible for checking if the final COMMIT on connection node_1 @@ -32,8 +32,7 @@ START TRANSACTION; # --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 --connection node_1a SET SESSION wsrep_sync_wait = 0; ---let $galera_sync_point = apply_monitor_slave_enter_sync ---source include/galera_set_sync_point.inc +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; # # insert client row, which will make it impossible to replay the @@ -47,28 +46,37 @@ SET SESSION wsrep_sync_wait = 0; # block the 'COMMIT' from node_1 before it certifies. # --connection node_1a ---source include/galera_wait_sync_point.inc ---source include/galera_clear_sync_point.inc - ---let $galera_sync_point = local_monitor_master_enter_sync ---source include/galera_set_sync_point.inc +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; --connection node_1 +SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification"; --send COMMIT # # Wait until both sync points have been reached # --connection node_1a ---let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync ---source include/galera_wait_sync_point.inc +SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached"; # # both threads are now parked in sync points, signal them to continue # ---let $galera_sync_point = apply_monitor_slave_enter_sync ---source include/galera_signal_sync_point.inc ---let $galera_sync_point = local_monitor_master_enter_sync ---source include/galera_signal_sync_point.inc ---source include/galera_clear_sync_point.inc +--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%' +--let $wait_condition_on_error_output = SELECT STATE FROM INFORMATION_SCHEMA.PROCESSLIST +--source include/wait_condition_with_debug.inc + +SET DEBUG_SYNC = 'now SIGNAL continue_after_certification'; + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%' +--let $wait_condition_on_error_output = SELECT STATE FROM INFORMATION_SCHEMA.PROCESSLIST +--source include/wait_condition_with_debug.inc + +SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; + +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%' +--let $wait_condition_on_error_output = SELECT STATE FROM INFORMATION_SCHEMA.PROCESSLIST +--source include/wait_condition_with_debug.inc + +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = 'RESET'; diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test index c8f8c974019..0efac20dbe0 100644 --- a/mysql-test/suite/galera/t/MW-369.test +++ b/mysql-test/suite/galera/t/MW-369.test @@ -24,7 +24,6 @@ --source include/galera_cluster.inc --source include/have_innodb.inc --source include/have_debug_sync.inc ---source include/galera_have_debug_sync.inc CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, diff --git a/mysql-test/suite/galera/t/mysql-wsrep#332.test b/mysql-test/suite/galera/t/mysql-wsrep#332.test index e216dfe79d4..464156e832e 100644 --- a/mysql-test/suite/galera/t/mysql-wsrep#332.test +++ b/mysql-test/suite/galera/t/mysql-wsrep#332.test @@ -3,7 +3,7 @@ --source include/have_debug_sync.inc --source include/galera_have_debug_sync.inc -# Open connection node_1a here, MW-369.inc will use it later +# Open connection node_1a here, will use it later --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 # @@ -27,7 +27,42 @@ INSERT INTO c VALUES (2, 2); --let $mw_369_parent_query = UPDATE p SET f1 = f1 + 100 --let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1) ---source MW-369.inc +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; +--eval $mw_369_parent_query + +# +# Block the $mw_369_child_query from node_2 +# +# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_set_sync_point.inc + +# +# insert client row, which will make it impossible to replay the +# delete on parent +# +--connection node_2 +--eval $mw_369_child_query + +# +# Wait until $mw_369_child_query from node_2 reaches the sync point and +# block the 'COMMIT' from node_1 before it certifies. +# +--connection node_1a +--source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc + +--connection node_1 +--send COMMIT + +--connection node_1a +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc # Expect certification failure --connection node_1 @@ -62,7 +97,42 @@ INSERT INTO c VALUES (2, 2, 2); --let $mw_369_parent_query = UPDATE p1 SET f1 = f1 + 100 --let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1) ---source MW-369.inc +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; +--eval $mw_369_parent_query + +# +# Block the $mw_369_child_query from node_2 +# +# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_set_sync_point.inc + +# +# insert client row, which will make it impossible to replay the +# delete on parent +# +--connection node_2 +--eval $mw_369_child_query + +# +# Wait until $mw_369_child_query from node_2 reaches the sync point and +# block the 'COMMIT' from node_1 before it certifies. +# +--connection node_1a +--source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc + +--connection node_1 +--send COMMIT + +--connection node_1a +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc # Expect certification failure --connection node_1 @@ -96,7 +166,42 @@ INSERT INTO c VALUES (2, 2, 2); --let $mw_369_parent_query = UPDATE p2 SET f1 = f1 + 100 --let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1) ---source MW-369.inc +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; +--eval $mw_369_parent_query + +# +# Block the $mw_369_child_query from node_2 +# +# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_set_sync_point.inc + +# +# insert client row, which will make it impossible to replay the +# delete on parent +# +--connection node_2 +--eval $mw_369_child_query + +# +# Wait until $mw_369_child_query from node_2 reaches the sync point and +# block the 'COMMIT' from node_1 before it certifies. +# +--connection node_1a +--source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc + +--connection node_1 +--send COMMIT + +--connection node_1a +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc # Expect certification failure --connection node_1 From 136358036dfe2637b2db428b848148475ac21154 Mon Sep 17 00:00:00 2001 From: mkaruza Date: Sat, 27 Apr 2024 18:40:58 +0200 Subject: [PATCH 09/74] MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replicated events have time associated with them from originating node which will be used for commit timestamp. Associated time can be set in past before event is even applied. For WSREP replication we don't need to use time information from event. Addressed review comments: Jan Lindström Signed-off-by: Julius Goryavsky --- mysql-test/suite/galera/disabled.def | 1 - .../suite/galera/r/versioning_trx_id.result | 6 +++--- mysql-test/suite/galera/t/versioning_trx_id.test | 12 ++++++------ sql/log_event.cc | 15 ++++++++++++--- sql/log_event_old.cc | 13 +++++++++++-- sql/wsrep_applier.cc | 9 --------- sql/wsrep_high_priority_service.cc | 2 ++ 7 files changed, 34 insertions(+), 24 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index d6d70c7c43e..45c04bdfd4b 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -13,7 +13,6 @@ galera_as_slave_ctas : MDEV-28378 timeout galera_pc_recovery : MDEV-25199 cluster fails to start up galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED -versioning_trx_id : MDEV-18590 : galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert() galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback() galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback() diff --git a/mysql-test/suite/galera/r/versioning_trx_id.result b/mysql-test/suite/galera/r/versioning_trx_id.result index df92d088834..c28662dcfe6 100644 --- a/mysql-test/suite/galera/r/versioning_trx_id.result +++ b/mysql-test/suite/galera/r/versioning_trx_id.result @@ -17,7 +17,7 @@ a select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; count(*) 0 -select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp; count(*) 0 connection node_3; @@ -34,7 +34,7 @@ a select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; count(*) 0 -select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp; count(*) 0 connection node_1; @@ -50,7 +50,7 @@ a select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; count(*) 0 -select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp; count(*) 0 drop table t1; diff --git a/mysql-test/suite/galera/t/versioning_trx_id.test b/mysql-test/suite/galera/t/versioning_trx_id.test index 017379c32c4..fc9ea18eeb4 100644 --- a/mysql-test/suite/galera/t/versioning_trx_id.test +++ b/mysql-test/suite/galera/t/versioning_trx_id.test @@ -13,29 +13,29 @@ set session wsrep_sync_wait=15; insert into t1 (a) values (3),(4); select a from t1; select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; -if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp`) { +if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp`) { select * from mysql.transaction_registry; } -select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp; --connection node_3 set session wsrep_sync_wait=15; insert into t1 (a) values (5),(6); select a from t1; select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; -if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp`) { +if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp`) { select * from mysql.transaction_registry; } -select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp; --connection node_1 set session wsrep_sync_wait=15; select a from t1; select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; -if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp`) { +if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp`) { select * from mysql.transaction_registry; } -select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp; drop table t1; diff --git a/sql/log_event.cc b/sql/log_event.cc index 6a59a021efc..1638a7d029b 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5554,7 +5554,10 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, */ if (is_trans_keyword() || rpl_filter->db_ok(thd->db.str)) { - thd->set_time(when, when_sec_part); +#ifdef WITH_WSREP + if (!wsrep_thd_is_applying(thd)) +#endif + thd->set_time(when, when_sec_part); thd->set_query_and_id((char*)query_arg, q_len_arg, thd->charset(), next_query_id()); thd->variables.pseudo_thread_id= thread_id; // for temp tables @@ -7433,7 +7436,10 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi, */ if (rpl_filter->db_ok(thd->db.str)) { - thd->set_time(when, when_sec_part); +#ifdef WITH_WSREP + if (!wsrep_thd_is_applying(thd)) +#endif + thd->set_time(when, when_sec_part); thd->set_query_id(next_query_id()); thd->get_stmt_da()->opt_clear_warning_info(thd->query_id); @@ -11629,7 +11635,10 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi) TIMESTAMP column to a table with one. So we call set_time(), like in SBR. Presently it changes nothing. */ - thd->set_time(when, when_sec_part); +#ifdef WITH_WSREP + if (!wsrep_thd_is_applying(thd)) +#endif + thd->set_time(when, when_sec_part); if (m_width == table->s->fields && bitmap_is_set_all(&m_cols)) set_flags(COMPLETE_ROWS_F); diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index c71a1f39e28..8adf5276577 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -31,6 +31,9 @@ #include "log_event_old.h" #include "rpl_record_old.h" #include "transaction.h" +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* WITH_WSREP */ #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) @@ -203,7 +206,10 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, rpl_group_info *rgi) TIMESTAMP column to a table with one. So we call set_time(), like in SBR. Presently it changes nothing. */ - ev_thd->set_time(ev->when, ev->when_sec_part); +#ifdef WITH_WSREP + if (!wsrep_thd_is_applying(thd)) +#endif + ev_thd->set_time(ev->when, ev->when_sec_part); /* There are a few flags that are replicated with each row event. Make sure to set/clear them before executing the main body of @@ -1507,7 +1513,10 @@ int Old_rows_log_event::do_apply_event(rpl_group_info *rgi) TIMESTAMP column to a table with one. So we call set_time(), like in SBR. Presently it changes nothing. */ - thd->set_time(when, when_sec_part); +#ifdef WITH_WSREP + if (!wsrep_thd_is_applying(thd)) +#endif + thd->set_time(when, when_sec_part); /* There are a few flags that are replicated with each row event. Make sure to set/clear them before executing the main body of diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc index ff6a0a7f60e..32476d05227 100644 --- a/sql/wsrep_applier.cc +++ b/sql/wsrep_applier.cc @@ -182,16 +182,7 @@ int wsrep_apply_events(THD* thd, /* Use the original server id for logging. */ thd->set_server_id(ev->server_id); - thd->set_time(); // time the query - thd->transaction.start_time.reset(thd); thd->lex->current_select= 0; - if (!ev->when) - { - my_hrtime_t hrtime= my_hrtime(); - ev->when= hrtime_to_my_time(hrtime); - ev->when_sec_part= hrtime_sec_part(hrtime); - } - thd->variables.option_bits= (thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) | (ev->flags & LOG_EVENT_SKIP_REPLICATION_F ? OPTION_SKIP_REPLICATION : 0); diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc index 1988088d0a8..c63e70d316d 100644 --- a/sql/wsrep_high_priority_service.cc +++ b/sql/wsrep_high_priority_service.cc @@ -197,6 +197,7 @@ int Wsrep_high_priority_service::start_transaction( const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta) { DBUG_ENTER(" Wsrep_high_priority_service::start_transaction"); + m_thd->set_time(); DBUG_RETURN(m_thd->wsrep_cs().start_transaction(ws_handle, ws_meta) || trans_begin(m_thd)); } @@ -391,6 +392,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta, };); #endif + thd->set_time(); int ret= wsrep_apply_events(thd, m_rli, data.data(), data.size()); if (ret != 0 || thd->wsrep_has_ignored_error) { From 3f2a5b28c6c7044a05bcef173619b5aeb7b4c34f Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 29 Apr 2024 16:42:46 +1000 Subject: [PATCH 10/74] MDEV-34003 Add testcase spider/bugfix.mdev_34003 MDEV-34003 appears to be a duplicate of MDEV-33742, and no code change is needed. Nevertheless we add the testcase reported in the former. --- .../spider/bugfix/r/mdev_34003.result | 18 +++++++++++++++++ .../spider/bugfix/t/mdev_34003.test | 20 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_34003.test diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result new file mode 100644 index 00000000000..b78f18d19dd --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result @@ -0,0 +1,18 @@ +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +create table t2 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (0,1,0),(1,0,0),(2,0,0); +create table t1 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +SELECT * FROM t1 WHERE c=0; +c c1 c2 +0 1 0 +drop table t1, t2; +drop server srv; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_34003.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34003.test new file mode 100644 index 00000000000..f81259b99a9 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34003.test @@ -0,0 +1,20 @@ +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +create table t2 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (0,1,0),(1,0,0),(2,0,0); +create table t1 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +SELECT * FROM t1 WHERE c=0; +drop table t1, t2; +drop server srv; +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log From dc25d600eed6ff4cee6340bd22302b7cbc0f2f25 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 24 Apr 2024 16:54:00 +0400 Subject: [PATCH 11/74] MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt Regexp_processor_pcre::fix_owner() called Regexp_processor_pcre::compile(), which could fail on the regex syntax error in the pattern and put an error into the diagnostics area. However, the callers: - Item_func_regex::fix_length_and_dec() - Item_func_regexp_instr::fix_length_and_dec() still returned "false" in such cases, which made the code crash later inside Diagnostics_area::set_ok_status(). Fix: - Change the return type of fix_onwer() from "void" to "bool" and return "true" whenever an error is put to the DA (e.g. on the syntax error in the pattern). - Fixing fix_length_and_dec() of the mentioned Item_func_xxx classes to return "true" if fix_onwer() returned "true". --- mysql-test/main/func_regexp.result | 16 +++++++++ mysql-test/main/func_regexp.test | 17 ++++++++++ mysql-test/suite/vcol/r/func_regexp.result | 24 ++++++++++++++ mysql-test/suite/vcol/t/func_regexp.test | 30 +++++++++++++++++ sql/item_cmpfunc.cc | 38 +++++++++++++++++----- sql/item_cmpfunc.h | 2 +- 6 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 mysql-test/suite/vcol/r/func_regexp.result create mode 100644 mysql-test/suite/vcol/t/func_regexp.test diff --git a/mysql-test/main/func_regexp.result b/mysql-test/main/func_regexp.result index 8e32732e12d..7a9e24f8262 100644 --- a/mysql-test/main/func_regexp.result +++ b/mysql-test/main/func_regexp.result @@ -192,4 +192,20 @@ SELECT SUM(a.t) FROM (SELECT (c1 RLIKE c1) = (c0 IS NULL) as t FROM t0) as a; SUM(a.t) 0 DROP TABLE t0; +# +# MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt +# +CREATE TABLE t1 (c0 INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT ('' RLIKE '[') AS c1 FROM t1; +ERROR 42000: Regex error 'missing terminating ] for character class at offset 1' +SELECT REGEXP_INSTR('','[') AS c1 FROM t1; +ERROR 42000: Regex error 'missing terminating ] for character class at offset 1' +SELECT c0, '' RLIKE NULL AS c1, REGEXP_INSTR('', NULL) AS c2 +FROM t1 ORDER BY c0; +c0 c1 c2 +1 NULL NULL +2 NULL NULL +3 NULL NULL +DROP TABLE t1; # End of 10.5 tests diff --git a/mysql-test/main/func_regexp.test b/mysql-test/main/func_regexp.test index 48a273f6979..fb441bde4d2 100644 --- a/mysql-test/main/func_regexp.test +++ b/mysql-test/main/func_regexp.test @@ -132,5 +132,22 @@ SELECT (c1 RLIKE c1), (c0 IS NULL) FROM t0; SELECT SUM(a.t) FROM (SELECT (c1 RLIKE c1) = (c0 IS NULL) as t FROM t0) as a; DROP TABLE t0; +--echo # +--echo # MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt +--echo # + +CREATE TABLE t1 (c0 INT); +INSERT INTO t1 VALUES (1),(2),(3); + +--error ER_REGEXP_ERROR +SELECT ('' RLIKE '[') AS c1 FROM t1; + +--error ER_REGEXP_ERROR +SELECT REGEXP_INSTR('','[') AS c1 FROM t1; + +SELECT c0, '' RLIKE NULL AS c1, REGEXP_INSTR('', NULL) AS c2 +FROM t1 ORDER BY c0; + +DROP TABLE t1; --echo # End of 10.5 tests diff --git a/mysql-test/suite/vcol/r/func_regexp.result b/mysql-test/suite/vcol/r/func_regexp.result new file mode 100644 index 00000000000..f7ae11f79b1 --- /dev/null +++ b/mysql-test/suite/vcol/r/func_regexp.result @@ -0,0 +1,24 @@ +# +# Start of 10.5 tests +# +# +# MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt +# +CREATE TABLE t1 (c0 INT AS(('' RLIKE '['))); +ERROR 42000: Regex error 'missing terminating ] for character class at offset 1' +CREATE TABLE t1 (c0 INT AS(REGEXP_INSTR('','['))); +ERROR 42000: Regex error 'missing terminating ] for character class at offset 1' +CREATE TABLE t1 +( +c0 INT, +c1 INT AS(('' RLIKE NULL)), +c2 INT AS(REGEXP_INSTR('',NULL)) +); +INSERT INTO t1 (c0) VALUES (0); +SELECT * FROM t1; +c0 c1 c2 +0 NULL NULL +DROP TABLE t1; +# +# End of 10.5 tests +# diff --git a/mysql-test/suite/vcol/t/func_regexp.test b/mysql-test/suite/vcol/t/func_regexp.test new file mode 100644 index 00000000000..5e97009ab7b --- /dev/null +++ b/mysql-test/suite/vcol/t/func_regexp.test @@ -0,0 +1,30 @@ +--source inc/vcol_init_vars.pre +--source inc/vcol_cleanup.inc + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt +--echo # + +--error ER_REGEXP_ERROR +CREATE TABLE t1 (c0 INT AS(('' RLIKE '['))); + +--error ER_REGEXP_ERROR +CREATE TABLE t1 (c0 INT AS(REGEXP_INSTR('','['))); + +CREATE TABLE t1 +( + c0 INT, + c1 INT AS(('' RLIKE NULL)), + c2 INT AS(REGEXP_INSTR('',NULL)) +); +INSERT INTO t1 (c0) VALUES (0); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index f8959cfd2bf..a755cac49ad 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -6215,7 +6215,17 @@ bool Regexp_processor_pcre::exec(Item *item, int offset, } -void Regexp_processor_pcre::fix_owner(Item_func *owner, +/* + This method determines the owner's maybe_null flag. + Generally, the result is NULL-able. However, in case + of a constant pattern and a NOT NULL subject, the + result can also be NOT NULL. + @return true - in case if the constant regex compilation failed + (e.g. due to a wrong regex syntax in the pattern). + The compilation error message is put to the DA in this case. + false - otherwise. +*/ +bool Regexp_processor_pcre::fix_owner(Item_func *owner, Item *subject_arg, Item *pattern_arg) { @@ -6223,16 +6233,30 @@ void Regexp_processor_pcre::fix_owner(Item_func *owner, pattern_arg->const_item() && !pattern_arg->is_expensive()) { - if (compile(pattern_arg, true)) + if (compile(pattern_arg, true/* raise errors to DA, e.g. on bad syntax */)) { - owner->maybe_null= 1; // Will always return NULL - return; + owner->maybe_null= 1; + if (pattern_arg->null_value) + { + /* + The pattern evaluated to NULL. Regex compilation did not happen. + No errors were put to DA. Continue with maybe_null==true. + The function will return NULL per row. + */ + return false; + } + /* + A syntax error in the pattern, an error was raised to the DA. + Let's abort the query. The caller will send the error to the client. + */ + return true; } set_const(true); owner->maybe_null= subject_arg->maybe_null; } else owner->maybe_null= 1; + return false; } @@ -6244,8 +6268,7 @@ Item_func_regex::fix_length_and_dec() return TRUE; re.init(cmp_collation.collation, 0); - re.fix_owner(this, args[0], args[1]); - return FALSE; + return re.fix_owner(this, args[0], args[1]); } @@ -6269,9 +6292,8 @@ Item_func_regexp_instr::fix_length_and_dec() return TRUE; re.init(cmp_collation.collation, 0); - re.fix_owner(this, args[0], args[1]); max_length= MY_INT32_NUM_DECIMAL_DIGITS; // See also Item_func_locate - return FALSE; + return re.fix_owner(this, args[0], args[1]); } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 465625f69bf..4674f935aed 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -2893,7 +2893,7 @@ public: {} int default_regex_flags(); void init(CHARSET_INFO *data_charset, int extra_flags); - void fix_owner(Item_func *owner, Item *subject_arg, Item *pattern_arg); + bool fix_owner(Item_func *owner, Item *subject_arg, Item *pattern_arg); bool compile(String *pattern, bool send_error); bool compile(Item *item, bool send_error); bool recompile(Item *item) From c6e3fe29d41f38bdb98334daff78d9cbd6d40998 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 27 Apr 2024 08:54:38 +0400 Subject: [PATCH 12/74] MDEV-30646 View created via JSON_ARRAYAGG returns incorrect json object Backporting add782a13e58 from 10.6, this fixes the problem. --- mysql-test/main/func_json.result | 6 +++--- mysql-test/suite/json/r/type_json.result | 8 ++++++++ mysql-test/suite/json/t/type_json.test | 9 +++++++++ sql/item_jsonfunc.cc | 2 +- sql/item_jsonfunc.h | 1 + sql/sql_select.cc | 22 ++++++++++++++++++++++ sql/table.cc | 21 +++++++++++++-------- sql/table.h | 2 ++ 8 files changed, 59 insertions(+), 12 deletions(-) diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index e40951a0b1f..bf8c85a59f1 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -1640,9 +1640,9 @@ SELECT t1.id, JSON_ARRAYAGG(JSON_OBJECT('id',t2.id) ORDER BY t2.id) as materials from t1 LEFT JOIN t2 on t1.id = t2.owner_id GROUP BY t1.id ORDER BY id; id materials -1 ["{\"id\": 1}","{\"id\": 2}"] -2 ["{\"id\": 3}"] -3 ["{\"id\": 4}"] +1 [{"id": 1},{"id": 2}] +2 [{"id": 3}] +3 [{"id": 4}] DROP TABLE t1; DROP TABLE t2; # diff --git a/mysql-test/suite/json/r/type_json.result b/mysql-test/suite/json/r/type_json.result index b9b70f24190..fc9bea9dc91 100644 --- a/mysql-test/suite/json/r/type_json.result +++ b/mysql-test/suite/json/r/type_json.result @@ -2880,5 +2880,13 @@ DROP PROCEDURE p1; DROP PROCEDURE p2; DROP TABLE t1, t1c, t2; # +# MDEV-30646 View created via JSON_ARRAYAGG returns incorrect json object +# +CREATE VIEW v1 AS SELECT JSON_OBJECT('plugin','unix_socket') as v1_json; +SELECT JSON_ARRAYAGG(v1_json) FROM v1; +JSON_ARRAYAGG(v1_json) +[{"plugin": "unix_socket"}] +DROP VIEW v1; +# # End of 10.5 tests # diff --git a/mysql-test/suite/json/t/type_json.test b/mysql-test/suite/json/t/type_json.test index f84bef780c3..03236070c8e 100644 --- a/mysql-test/suite/json/t/type_json.test +++ b/mysql-test/suite/json/t/type_json.test @@ -138,6 +138,15 @@ DROP PROCEDURE p2; DROP TABLE t1, t1c, t2; +--echo # +--echo # MDEV-30646 View created via JSON_ARRAYAGG returns incorrect json object +--echo # + +CREATE VIEW v1 AS SELECT JSON_OBJECT('plugin','unix_socket') as v1_json; +SELECT JSON_ARRAYAGG(v1_json) FROM v1; +DROP VIEW v1; + + --echo # --echo # End of 10.5 tests --echo # diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index 25b74f8d0aa..fb2e995cd52 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -1633,7 +1633,7 @@ null_return: `CONVERT(arg USING charset)` is actually a general purpose string expression, not a JSON expression. */ -static bool is_json_type(const Item *item) +bool is_json_type(const Item *item) { for ( ; ; ) { diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index eea7605d8e8..c8e920dc083 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -640,5 +640,6 @@ public: { return get_item_copy(thd, this); } }; +extern bool is_json_type(const Item *item); #endif /* ITEM_JSONFUNC_INCLUDED */ diff --git a/sql/sql_select.cc b/sql/sql_select.cc index a7b84bbfe3b..3b30c2f1789 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -18569,6 +18569,25 @@ Field *Item_func_sp::create_tmp_field_ex(MEM_ROOT *root, TABLE *table, return result; } + +static bool make_json_valid_expr(TABLE *table, Field *field) +{ + THD *thd= table->in_use; + Query_arena backup_arena; + Item *expr, *item_field; + + if (!table->expr_arena && table->init_expr_arena(thd->mem_root)) + return 1; + + thd->set_n_backup_active_arena(table->expr_arena, &backup_arena); + if ((item_field= new (thd->mem_root) Item_field(thd, field)) && + (expr= new (thd->mem_root) Item_func_json_valid(thd, item_field))) + field->check_constraint= add_virtual_expression(thd, expr); + thd->restore_active_arena(table->expr_arena, &backup_arena); + return field->check_constraint == NULL; +} + + /** Create field for temporary table. @@ -18614,6 +18633,9 @@ Field *create_tmp_field(TABLE *table, Item *item, make_copy_field); Field *result= item->create_tmp_field_ex(table->in_use->mem_root, table, &src, &prm); + if (is_json_type(item) && make_json_valid_expr(table, result)) + result= NULL; + *from_field= src.field(); *default_field= src.default_field(); if (src.item_result_field()) diff --git a/sql/table.cc b/sql/table.cc index 6633aa1ee04..610d94d413c 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -53,6 +53,17 @@ #define MYSQL57_GENERATED_FIELD 128 #define MYSQL57_GCOL_HEADER_SIZE 4 +bool TABLE::init_expr_arena(MEM_ROOT *mem_root) +{ + /* + We need to use CONVENTIONAL_EXECUTION here to ensure that + any new items created by fix_fields() are not reverted. + */ + expr_arena= new (alloc_root(mem_root, sizeof(Query_arena))) + Query_arena(mem_root, Query_arena::STMT_CONVENTIONAL_EXECUTION); + return expr_arena == NULL; +} + struct extra2_fields { LEX_CUSTRING version; @@ -1145,14 +1156,8 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, table->s->table_check_constraints * sizeof(Virtual_column_info*)); DBUG_ASSERT(table->expr_arena == NULL); - /* - We need to use CONVENTIONAL_EXECUTION here to ensure that - any new items created by fix_fields() are not reverted. - */ - table->expr_arena= new (alloc_root(mem_root, sizeof(Query_arena))) - Query_arena(mem_root, - Query_arena::STMT_CONVENTIONAL_EXECUTION); - if (!table->expr_arena) + + if (table->init_expr_arena(mem_root)) DBUG_RETURN(1); thd->set_n_backup_active_arena(table->expr_arena, &backup_arena); diff --git a/sql/table.h b/sql/table.h index a63eae88cb6..97e595979b9 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1645,6 +1645,8 @@ public: m_needs_reopen= value; } + bool init_expr_arena(MEM_ROOT *mem_root); + bool alloc_keys(uint key_count); bool check_tmp_key(uint key, uint key_parts, uint (*next_field_no) (uchar *), uchar *arg); From a586b6dbc81b788106cee0f88416c389ae79d26c Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Mon, 29 Apr 2024 16:42:26 +0530 Subject: [PATCH 13/74] MDEV-22855 Assertion `!field->prefix_len || field->fixed_len == field->prefix_len' failed in btr_node_ptr_max_size Problem: ======== - InnoDB wrongly calulates the record size in btr_node_ptr_max_size() when prefix index of the column has to be stored externally. Fix: ==== - InnoDB should add the maximum field size to record size when the field is a fixed length one. --- mysql-test/suite/innodb/r/index_length.result | 8 ++++++++ mysql-test/suite/innodb/t/index_length.test | 8 ++++++++ storage/innobase/btr/btr0cur.cc | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/innodb/r/index_length.result b/mysql-test/suite/innodb/r/index_length.result index cc92780ac32..e0d6a735bb4 100644 --- a/mysql-test/suite/innodb/r/index_length.result +++ b/mysql-test/suite/innodb/r/index_length.result @@ -20,4 +20,12 @@ FLOOR(index_length/@@innodb_page_size) 2 disconnect stop_purge; DROP TABLE t1; +# +# MDEV-22855 Assertion (!field->prefix_len || +# field->fixed_len == field->prefix_len) +# failed in btr_node_ptr_max_size +# +CREATE TABLE t1(c CHAR(194) CHARACTER SET UTF32, KEY k1(c(193)))ENGINE=InnoDB; +INSERT INTO t1 SET c=''; +DROP TABLE t1; # End of 10.4 tests diff --git a/mysql-test/suite/innodb/t/index_length.test b/mysql-test/suite/innodb/t/index_length.test index bf4940d4b39..03e61a5a8f9 100644 --- a/mysql-test/suite/innodb/t/index_length.test +++ b/mysql-test/suite/innodb/t/index_length.test @@ -20,4 +20,12 @@ WHERE table_schema = 'test' AND table_name = 't1'; disconnect stop_purge; DROP TABLE t1; +--echo # +--echo # MDEV-22855 Assertion (!field->prefix_len || +--echo # field->fixed_len == field->prefix_len) +--echo # failed in btr_node_ptr_max_size +--echo # +CREATE TABLE t1(c CHAR(194) CHARACTER SET UTF32, KEY k1(c(193)))ENGINE=InnoDB; +INSERT INTO t1 SET c=''; +DROP TABLE t1; --echo # End of 10.4 tests diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index bd88582d4f4..bc9abd77a81 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -1126,7 +1126,7 @@ static ulint btr_node_ptr_max_size(const dict_index_t* index) /* Determine the maximum length of the index field. */ field_max_size = dict_col_get_fixed_size(col, comp); - if (field_max_size) { + if (field_max_size && field->fixed_len) { /* dict_index_add_col() should guarantee this */ ut_ad(!field->prefix_len || field->fixed_len == field->prefix_len); From d7df63e1c922efcbbf9836f993754ad509823c19 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Tue, 19 Mar 2024 01:30:13 +0530 Subject: [PATCH 14/74] MDEV-19487: JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER" Analysis: When the first character of json is scanned it is number. Based on that integer is returned. Fix: Scan rest of the json before returning the final result to ensure json is valid in the first place in order to have a valid type. --- mysql-test/main/func_json.result | 8 ++++++++ mysql-test/main/func_json.test | 7 +++++++ mysql-test/suite/json/r/json_no_table.result | 20 +++++++++++++++----- sql/item_jsonfunc.cc | 6 ++++++ 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index bf8c85a59f1..b7710aaaa89 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -1697,5 +1697,13 @@ INSERT INTO t (doc) VALUES ('{ "_id" : { "$oid" : "0ca0b0f0" },"a" : [ { "a" : [ ERROR 22001: Data too long for column 'id' at row 1 DROP TABLE t; # +# MDEV-19487: JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER" +# +SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')); +JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5 +# # End of 10.5 tests # diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index c881ede45ce..35b9d9bffb9 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -1125,6 +1125,13 @@ INSERT INTO t (doc) VALUES ('{ "_id" : { "$oid" : "0ca0b0f0" },"a" : [ { "a" : [ DROP TABLE t; +--echo # +--echo # MDEV-19487: JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER" +--echo # + +SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')); + + --echo # --echo # End of 10.5 tests --echo # diff --git a/mysql-test/suite/json/r/json_no_table.result b/mysql-test/suite/json/r/json_no_table.result index bb3b9d2ab1e..bd29ef99edd 100644 --- a/mysql-test/suite/json/r/json_no_table.result +++ b/mysql-test/suite/json/r/json_no_table.result @@ -1002,19 +1002,27 @@ DOUBLE error ER_INVALID_JSON_TEXT_IN_PARAM select json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8')); json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8')) -INTEGER +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5 # ---------------------------------------------------------------------- # Test of json_compact(literal) # ---------------------------------------------------------------------- select json_type(json_compact(cast('2014-11-25 18:00' as datetime))); json_type(json_compact(cast('2014-11-25 18:00' as datetime))) -INTEGER +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5 select json_type(json_compact(cast('2014-11-25' as date))); json_type(json_compact(cast('2014-11-25' as date))) -INTEGER +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5 select json_type(json_compact(cast('18:00:59' as time))); json_type(json_compact(cast('18:00:59' as time))) -INTEGER +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 3 select json_type(json_compact(127)); json_type(json_compact(127)) INTEGER @@ -1064,7 +1072,9 @@ json_type(json_compact(3.14E30)) DOUBLE select json_type(json_compact(cast('10101abcde' as binary))); json_type(json_compact(cast('10101abcde' as binary))) -INTEGER +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 6 select json_type(json_compact(ST_GeomFromText('POINT(1 1)'))); json_type(json_compact(ST_GeomFromText('POINT(1 1)'))) NULL diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index fb2e995cd52..95f8bfde7ce 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -2971,6 +2971,12 @@ String *Item_func_json_type::val_str(String *str) break; } + /* ensure the json is at least valid. */ + while(json_scan_next(&je) == 0) {} + + if (je.s.error) + goto error; + str->set(type, strlen(type), &my_charset_utf8mb3_general_ci); return str; From 5ca64e65d099ecd5aff616325ce4f7ed33baf633 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Tue, 19 Mar 2024 00:04:47 +0530 Subject: [PATCH 15/74] MDEV-32287: JSON_EXTRACT not returning multiple values for same path Analysis: When scanning json and getting the exact path at each step, if a path is reached, we end up adding the item in the result and immediately get the next item which results in current path changing. Fix: Instead of immediately returning the item, count the occurences of the path in argument and append in the result as needed. --- mysql-test/main/func_json.result | 6 ++++++ mysql-test/main/func_json.test | 8 ++++++++ sql/item_jsonfunc.cc | 25 +++++++++++++++++-------- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index b7710aaaa89..2991eb4e6fb 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -1690,6 +1690,12 @@ select json_arrayagg('ä'), json_objectagg(1, 'ä'); json_arrayagg('ä') json_objectagg(1, 'ä') ["ä"] {"1":"ä"} # +# MDEV-32287: JSON_EXTRACT not returning multiple values for same path +# +select JSON_EXTRACT("[1, 2, [30, 40]]", '$[2][1]', '$[2][1]'); +JSON_EXTRACT("[1, 2, [30, 40]]", '$[2][1]', '$[2][1]') +[40, 40] +# # MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json # CREATE TABLE t (id CHAR AS (JSON_COMPACT (JSON_EXTRACT(doc,"$._id"))) UNIQUE KEY,doc JSON,CONSTRAINT notnu CHECK (id IS NOT NULL)); diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 35b9d9bffb9..5787ee88960 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -1115,6 +1115,14 @@ set names latin1; select json_arrayagg('ä'), json_objectagg(1, 'ä'); --enable_service_connection + +--echo # +--echo # MDEV-32287: JSON_EXTRACT not returning multiple values for same path +--echo # + +select JSON_EXTRACT("[1, 2, [30, 40]]", '$[2][1]', '$[2][1]'); + + --echo # --echo # MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json --echo # diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index 95f8bfde7ce..5622bf3e803 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -893,15 +893,16 @@ bool Item_func_json_extract::fix_length_and_dec() } -static bool path_exact(const json_path_with_flags *paths_list, int n_paths, +static int path_exact(const json_path_with_flags *paths_list, int n_paths, const json_path_t *p, json_value_types vt) { + int count_path= 0; for (; n_paths > 0; n_paths--, paths_list++) { if (json_path_compare(&paths_list->p, p, vt) == 0) - return TRUE; + count_path++; } - return FALSE; + return count_path; } @@ -925,7 +926,7 @@ String *Item_func_json_extract::read_json(String *str, json_engine_t je, sav_je; json_path_t p; const uchar *value; - int not_first_value= 0; + int not_first_value= 0, count_path= 0; uint n_arg; size_t v_len; int possible_multiple_values; @@ -972,7 +973,7 @@ String *Item_func_json_extract::read_json(String *str, while (json_get_path_next(&je, &p) == 0) { - if (!path_exact(paths, arg_count-1, &p, je.value_type)) + if (!(count_path= path_exact(paths, arg_count-1, &p, je.value_type))) continue; value= je.value_begin; @@ -1002,9 +1003,12 @@ String *Item_func_json_extract::read_json(String *str, je= sav_je; } - if ((not_first_value && str->append(", ", 2)) || - str->append((const char *) value, v_len)) - goto error; /* Out of memory. */ + for (int count= 0; count < count_path; count++) + { + if (str->append((const char *) value, v_len) || + str->append(", ", 2)) + goto error; /* Out of memory. */ + } not_first_value= 1; @@ -1025,6 +1029,11 @@ String *Item_func_json_extract::read_json(String *str, goto return_null; } + if (str->length()>2) + { + str->chop(); + str->chop(); + } if (possible_multiple_values && str->append("]", 1)) goto error; /* Out of memory. */ From 9e6858a42653c4684bbafa4b2c2c62f9ea8186c4 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Sat, 16 Mar 2024 00:28:48 +0530 Subject: [PATCH 16/74] MDEV-22141: JSON_REMOVE returns NULL on valid arguments Analysis: When we scan json to get to a beginning according to the path, we end up scanning json even if we have exhausted it. When eventually returns error. Fix: Continue scanning json only if we have not exhausted it and return result accordingly. --- mysql-test/main/func_json.result | 6 ++++++ mysql-test/main/func_json.test | 7 +++++++ sql/item_jsonfunc.cc | 1 + 3 files changed, 14 insertions(+) diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index 2991eb4e6fb..8d90a6ec726 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -1711,5 +1711,11 @@ NULL Warnings: Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5 # +# MDEV-22141: JSON_REMOVE returns NULL on valid arguments +# +SELECT JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D'); +JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D') +{"A": {"B": 1}} +# # End of 10.5 tests # diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 5787ee88960..1b55dcb149e 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -1140,6 +1140,13 @@ DROP TABLE t; SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')); +--echo # +--echo # MDEV-22141: JSON_REMOVE returns NULL on valid arguments +--echo # + +SELECT JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D'); + + --echo # --echo # End of 10.5 tests --echo # diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index 5622bf3e803..442c4cbed90 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -3332,6 +3332,7 @@ String *Item_func_json_remove::val_str(String *str) { if (je.s.error) goto js_error; + continue; } if (json_read_value(&je)) From f9575495ceef8a262a977cf07a9d6a9c0551ba11 Mon Sep 17 00:00:00 2001 From: Bernard Spil Date: Sun, 28 Apr 2024 16:51:04 +0000 Subject: [PATCH 17/74] Fix typo There is no component `SuportFiles` in MariaDB server, yet a `SupportFiles` component exists. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a01ebcf57eb..05bd751be21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,7 @@ ENDIF() OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON) IF (WITHOUT_SERVER) - SET (SKIP_COMPONENTS "Server|IniFiles|SuportFiles|Readme") + SET (SKIP_COMPONENTS "Server|IniFiles|SupportFiles|Readme") ELSE() SET (SKIP_COMPONENTS "N-O-N-E") ENDIF() From f378e7643459f0baa6c4149a795463f2f46b6871 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Tue, 30 Apr 2024 14:16:08 +0530 Subject: [PATCH 18/74] MDEV-33980 mariadb-backup --backup is missing retry logic for undo tablespaces Problem: ======== - Currently mariabackup have to reread the pages in case they are modified by server concurrently. But while reading the undo tablespace, mariabackup failed to do reread the page in case of error. Fix: === Mariabackup --backup functionality should have retry logic while reading the undo tablespaces. --- .../suite/mariabackup/undo_space_id.result | 7 +++++++ .../suite/mariabackup/undo_space_id.test | 19 +++++++++++++++++++ storage/innobase/os/os0file.cc | 8 ++++++++ storage/innobase/srv/srv0start.cc | 13 ++++++++++++- 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/mariabackup/undo_space_id.result b/mysql-test/suite/mariabackup/undo_space_id.result index 96d3e2a58f4..8ca52da7e0d 100644 --- a/mysql-test/suite/mariabackup/undo_space_id.result +++ b/mysql-test/suite/mariabackup/undo_space_id.result @@ -11,3 +11,10 @@ undo004 undo003 undo004 DROP TABLE t1; +# +# MDEV-33980 mariadb-backup --backup is missing +# retry logic for undo tablespaces +# +# xtrabackup backup +# Display undo log files from target directory +FOUND 5 /Retrying to read undo tablespace*/ in backup.log diff --git a/mysql-test/suite/mariabackup/undo_space_id.test b/mysql-test/suite/mariabackup/undo_space_id.test index e903a0ad4c5..f9859cb999d 100644 --- a/mysql-test/suite/mariabackup/undo_space_id.test +++ b/mysql-test/suite/mariabackup/undo_space_id.test @@ -23,3 +23,22 @@ list_files $basedir undo*; DROP TABLE t1; rmdir $basedir; + +--echo # +--echo # MDEV-33980 mariadb-backup --backup is missing +--echo # retry logic for undo tablespaces +--echo # +let $backuplog= $MYSQLTEST_VARDIR/tmp/backup.log; +--echo # xtrabackup backup +--disable_result_log +--error 1 +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir --dbug=+d,undo_space_read_fail > $backuplog; +--enable_result_log +--echo # Display undo log files from target directory +list_files $basedir undo*; + +--let SEARCH_PATTERN=Retrying to read undo tablespace* +--let SEARCH_FILE=$backuplog +--source include/search_pattern_in_file.inc +rmdir $basedir; +remove_file $backuplog; diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 075f838ebb1..6c5203b0739 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -7560,7 +7560,15 @@ invalid: } ut_free(buf2); + DBUG_EXECUTE_IF("undo_space_read_fail", + if (space_id == srv_undo_space_id_start) { + goto wrong_space_id; + }); + if (UNIV_UNLIKELY(space_id != space->id)) { +#ifndef DBUG_OFF +wrong_space_id: +#endif ib::error() << "Expected tablespace id " << space->id << " but found " << space_id << " in the file " << name; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index b8b74263eba..d1b682d9200 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -100,6 +100,7 @@ Created 2/16/1996 Heikki Tuuri #include "zlib.h" #include "ut0crc32.h" #include "btr0scrub.h" +#include "log.h" /** Log sequence number immediately after startup */ lsn_t srv_start_lsn; @@ -656,10 +657,11 @@ static bool srv_undo_tablespace_open(const char* name, ulint space_id, pfs_os_file_t fh; bool success; char undo_name[sizeof "innodb_undo000"]; + ulint n_retries = 5; snprintf(undo_name, sizeof(undo_name), "innodb_undo%03u", static_cast(space_id)); - +undo_retry: fh = os_file_create( innodb_data_file_key, name, OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT | OS_FILE_ON_ERROR_SILENT, @@ -716,6 +718,15 @@ static bool srv_undo_tablespace_open(const char* name, ulint space_id, mutex_exit(&fil_system.mutex); + if (!success && n_retries && + srv_operation == SRV_OPERATION_BACKUP) { + sql_print_information("InnoDB: Retrying to read undo " + "tablespace %s", undo_name); + fil_space_free(space_id, false); + n_retries--; + goto undo_retry; + } + return success; } From bf77f9793dd13630ea2302f5cbdfe5b741e1817a Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Sat, 13 Apr 2024 23:29:11 +0100 Subject: [PATCH 19/74] openssl: add a more specific DES support detection Improve detection for DES support in OpenSSL, to allow compilation against system OpenSSL without DES. Note that MariaDB needs to be compiled against OpenSSL-like library that itself has DES support which cmake detected. Positive detection is indicated with CMake variable HAVE_des 1. Signed-off-by: Dimitri John Ledkov --- cmake/ssl.cmake | 3 ++ config.h.cmake | 1 + mysql-test/main/func_encrypt_nossl.result | 42 +++++++++++------------ mysql-test/main/ssl_and_innodb.test | 2 +- sql/des_key_file.cc | 4 +-- sql/des_key_file.h | 4 +-- sql/item_strfunc.cc | 12 +++---- sql/mysqld.cc | 35 ++++++++++++------- sql/mysqld.h | 17 +++++---- sql/sql_reload.cc | 2 +- 10 files changed, 67 insertions(+), 55 deletions(-) diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 51176a84c51..8be48e2a597 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -60,6 +60,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL) SET(HAVE_EncryptAes128Ctr OFF CACHE INTERNAL "wolfssl does support AES-CTR, but differently from openssl") SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "wolfssl does not support AES-GCM") SET(HAVE_X509_check_host ON CACHE INTERNAL "wolfssl does support X509_check_host") + SET(HAVE_des ON CACHE INTERNAL "wolfssl does support DES API") CHANGE_SSL_SETTINGS("bundled") ADD_SUBDIRECTORY(extra/wolfssl) MESSAGE_ONCE(SSL_LIBRARIES "SSL_LIBRARIES = ${SSL_LIBRARIES}") @@ -158,6 +159,8 @@ MACRO (MYSQL_CHECK_SSL) HAVE_EncryptAes128Gcm) CHECK_SYMBOL_EXISTS(X509_check_host "openssl/x509v3.h" HAVE_X509_check_host) + CHECK_SYMBOL_EXISTS(DES_set_key_unchecked "openssl/des.h" + HAVE_des) SET(CMAKE_REQUIRED_INCLUDES) SET(CMAKE_REQUIRED_LIBRARIES) SET(CMAKE_REQUIRED_DEFINITIONS) diff --git a/config.h.cmake b/config.h.cmake index cc35690f708..2c421798c33 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -498,6 +498,7 @@ #cmakedefine HAVE_COMPRESS 1 #cmakedefine HAVE_EncryptAes128Ctr 1 #cmakedefine HAVE_EncryptAes128Gcm 1 +#cmakedefine HAVE_des 1 /* Stuff that always need to be defined (compile breaks without it) diff --git a/mysql-test/main/func_encrypt_nossl.result b/mysql-test/main/func_encrypt_nossl.result index dd45717a22f..73bb5c591b9 100644 --- a/mysql-test/main/func_encrypt_nossl.result +++ b/mysql-test/main/func_encrypt_nossl.result @@ -2,83 +2,83 @@ select des_encrypt("test", 'akeystr'); des_encrypt("test", 'akeystr') NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_encrypt("test", 1); des_encrypt("test", 1) NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_encrypt("test", 9); des_encrypt("test", 9) NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_encrypt("test", 100); des_encrypt("test", 100) NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_encrypt("test", NULL); des_encrypt("test", NULL) NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_encrypt(NULL, NULL); des_encrypt(NULL, NULL) NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_decrypt("test", 'anotherkeystr'); des_decrypt("test", 'anotherkeystr') NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_decrypt(1, 1); des_decrypt(1, 1) NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_decrypt(des_encrypt("test", 'thekey')); des_decrypt(des_encrypt("test", 'thekey')) NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello")); hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello")) NULL NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_decrypt(des_encrypt("hello",4)); des_decrypt(des_encrypt("hello",4)) NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_decrypt(des_encrypt("hello",'test'),'test'); des_decrypt(des_encrypt("hello",'test'),'test') NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password')); hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password')) NULL NULL NULL Warnings: -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working -Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_decrypt(des_encrypt("hello"),'default_password'); des_decrypt(des_encrypt("hello"),'default_password') NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select des_decrypt(des_encrypt("hello",4),'password4'); des_decrypt(des_encrypt("hello",4),'password4') NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working SET @a=des_decrypt(des_encrypt("hello")); Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working flush des_key_file; select @a = des_decrypt(des_encrypt("hello")); @a = des_decrypt(des_encrypt("hello")) @@ -90,9 +90,9 @@ select hex(des_decrypt(des_encrypt("hello",4),'password2')); hex(des_decrypt(des_encrypt("hello",4),'password2')) NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working select hex(des_decrypt(des_encrypt("hello","hidden"))); hex(des_decrypt(des_encrypt("hello","hidden"))) NULL Warnings: -Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working diff --git a/mysql-test/main/ssl_and_innodb.test b/mysql-test/main/ssl_and_innodb.test index 4966f05b37b..2104eb5c8bf 100644 --- a/mysql-test/main/ssl_and_innodb.test +++ b/mysql-test/main/ssl_and_innodb.test @@ -1,5 +1,5 @@ -- source include/have_innodb.inc --- source include/have_ssl_crypto_functs.inc +-- source include/have_des.inc CREATE TABLE t1(a int) engine=innodb; INSERT INTO t1 VALUES (1); diff --git a/sql/des_key_file.cc b/sql/des_key_file.cc index bfbe04f6015..776be8a5a2f 100644 --- a/sql/des_key_file.cc +++ b/sql/des_key_file.cc @@ -19,7 +19,7 @@ #include "log.h" // sql_print_error #include -#ifdef HAVE_OPENSSL +#ifdef HAVE_des struct st_des_keyschedule des_keyschedule[10]; uint des_default_key; @@ -103,4 +103,4 @@ error: mysql_mutex_unlock(&LOCK_des_key_file); DBUG_RETURN(result); } -#endif /* HAVE_OPENSSL */ +#endif /* HAVE_des */ diff --git a/sql/des_key_file.h b/sql/des_key_file.h index 847cd767b4b..58ed2f87b8e 100644 --- a/sql/des_key_file.h +++ b/sql/des_key_file.h @@ -16,7 +16,7 @@ #ifndef DES_KEY_FILE_INCLUDED #define DES_KEY_FILE_INCLUDED -#ifdef HAVE_OPENSSL +#ifdef HAVE_des #include #include "violite.h" /* DES_cblock, DES_key_schedule */ @@ -35,6 +35,6 @@ extern struct st_des_keyschedule des_keyschedule[10]; extern uint des_default_key; bool load_des_key_file(const char *file_name); -#endif /* HAVE_OPENSSL */ +#endif /* HAVE_des */ #endif /* DES_KEY_FILE_INCLUDED */ diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index ad7ed6e2c9e..c36a2a5c072 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -722,7 +722,7 @@ bool Item_func_concat::fix_length_and_dec() String *Item_func_des_encrypt::val_str(String *str) { DBUG_ASSERT(fixed == 1); -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) +#if defined(HAVE_des) && !defined(EMBEDDED_LIBRARY) uint code= ER_WRONG_PARAMETERS_TO_PROCEDURE; DES_cblock ivec; struct st_des_keyblock keyblock; @@ -811,8 +811,8 @@ error: THD *thd= current_thd; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_FEATURE_DISABLED, ER_THD(thd, ER_FEATURE_DISABLED), - "des_encrypt", "--with-ssl"); -#endif /* defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) */ + "des_encrypt", "openssl des cipher (HAVE_des)"); +#endif /* defined(HAVE_des) && !defined(EMBEDDED_LIBRARY) */ null_value=1; return 0; } @@ -821,7 +821,7 @@ error: String *Item_func_des_decrypt::val_str(String *str) { DBUG_ASSERT(fixed == 1); -#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) +#if defined(HAVE_des) && !defined(EMBEDDED_LIBRARY) uint code= ER_WRONG_PARAMETERS_TO_PROCEDURE; DES_cblock ivec; struct st_des_keyblock keyblock; @@ -896,9 +896,9 @@ wrong_key: THD *thd= current_thd; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_FEATURE_DISABLED, ER_THD(thd, ER_FEATURE_DISABLED), - "des_decrypt", "--with-ssl"); + "des_decrypt", "openssl des cipher (HAVE_des)"); } -#endif /* defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) */ +#endif /* defined(HAVE_des) && !defined(EMBEDDED_LIBRARY) */ null_value=1; return 0; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 128899cb347..be75dd9fc66 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -706,9 +706,6 @@ mysql_mutex_t LOCK_thread_id; server may be fairly high, we need a dedicated lock. */ mysql_mutex_t LOCK_prepared_stmt_count; -#ifdef HAVE_OPENSSL -mysql_mutex_t LOCK_des_key_file; -#endif mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; mysql_rwlock_t LOCK_ssl_refresh; mysql_rwlock_t LOCK_all_status_vars; @@ -849,7 +846,7 @@ static struct my_option pfs_early_options[]= PSI_file_key key_file_binlog, key_file_binlog_cache, key_file_binlog_index, key_file_binlog_index_cache, key_file_casetest, - key_file_dbopt, key_file_des_key_file, key_file_ERRMSG, key_select_to_file, + key_file_dbopt, key_file_ERRMSG, key_select_to_file, key_file_fileparser, key_file_frm, key_file_global_ddl_log, key_file_load, key_file_loadfile, key_file_log_event_data, key_file_log_event_info, key_file_master_info, key_file_misc, key_file_partition_ddl_log, @@ -860,16 +857,19 @@ PSI_file_key key_file_relaylog, key_file_relaylog_index, key_file_relaylog_cache, key_file_relaylog_index_cache; PSI_file_key key_file_binlog_state; +#ifdef HAVE_des +char *des_key_file; +PSI_file_key key_file_des_key_file; +PSI_mutex_key key_LOCK_des_key_file; +mysql_mutex_t LOCK_des_key_file; +#endif /* HAVE_des */ + #ifdef HAVE_PSI_INTERFACE #ifdef HAVE_MMAP PSI_mutex_key key_PAGE_lock, key_LOCK_sync, key_LOCK_active, key_LOCK_pool, key_LOCK_pending_checkpoint; #endif /* HAVE_MMAP */ -#ifdef HAVE_OPENSSL -PSI_mutex_key key_LOCK_des_key_file; -#endif /* HAVE_OPENSSL */ - PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list, key_BINLOG_LOCK_binlog_background_thread, key_LOCK_binlog_end_pos, @@ -924,9 +924,9 @@ static PSI_mutex_info all_server_mutexes[]= { &key_LOCK_pool, "TC_LOG_MMAP::LOCK_pending_checkpoint", 0}, #endif /* HAVE_MMAP */ -#ifdef HAVE_OPENSSL +#ifdef HAVE_des { &key_LOCK_des_key_file, "LOCK_des_key_file", PSI_FLAG_GLOBAL}, -#endif /* HAVE_OPENSSL */ +#endif /* HAVE_des */ { &key_BINLOG_LOCK_index, "MYSQL_BIN_LOG::LOCK_index", 0}, { &key_BINLOG_LOCK_xid_list, "MYSQL_BIN_LOG::LOCK_xid_list", 0}, @@ -1454,7 +1454,6 @@ static void openssl_dynlock_destroy(openssl_lock_t *, const char *, int); static void openssl_lock_function(int, int, const char *, int); static void openssl_lock(int, openssl_lock_t *, const char *, int); #endif /* HAVE_OPENSSL10 */ -char *des_key_file; #ifndef EMBEDDED_LIBRARY struct st_VioSSLFd *ssl_acceptor_fd; #endif @@ -2137,7 +2136,9 @@ static void clean_up_mutexes() mysql_mutex_destroy(&LOCK_global_table_stats); mysql_mutex_destroy(&LOCK_global_index_stats); #ifdef HAVE_OPENSSL +#ifdef HAVE_des mysql_mutex_destroy(&LOCK_des_key_file); +#endif /* HAVE_des */ #if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL) for (int i= 0; i < CRYPTO_num_locks(); ++i) mysql_rwlock_destroy(&openssl_stdlocks[i].lock); @@ -4260,8 +4261,10 @@ static int init_thread_environment() MY_MUTEX_INIT_SLOW); #ifdef HAVE_OPENSSL +#ifdef HAVE_des mysql_mutex_init(key_LOCK_des_key_file, &LOCK_des_key_file, MY_MUTEX_INIT_FAST); +#endif /* HAVE_des */ #if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL) openssl_stdlocks= (openssl_lock_t*) OPENSSL_malloc(CRYPTO_num_locks() * sizeof(openssl_lock_t)); @@ -4479,8 +4482,10 @@ static void init_ssl() { have_ssl= SHOW_OPTION_DISABLED; } +#ifdef HAVE_des if (des_key_file) load_des_key_file(des_key_file); +#endif /* HAVE_des */ #endif /* HAVE_OPENSSL && ! EMBEDDED_LIBRARY */ } @@ -6566,12 +6571,12 @@ struct my_option my_long_options[]= &opt_debug_sync_timeout, 0, 0, GET_UINT, OPT_ARG, 0, 0, UINT_MAX, 0, 0, 0}, #endif /* defined(ENABLED_DEBUG_SYNC) */ -#ifdef HAVE_OPENSSL +#ifdef HAVE_des {"des-key-file", 0, "Load keys for des_encrypt() and des_encrypt from given file.", &des_key_file, &des_key_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif /* HAVE_OPENSSL */ +#endif /* HAVE_des */ #ifdef HAVE_STACKTRACE {"stack-trace", 0 , "Print a symbolic stack trace on failure", &opt_stack_trace, &opt_stack_trace, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -7917,7 +7922,9 @@ static int mysql_init_variables(void) libwrapName= NullS; #endif #ifdef HAVE_OPENSSL +#ifdef HAVE_des des_key_file = 0; +#endif /* HAVE_des */ #ifndef EMBEDDED_LIBRARY ssl_acceptor_fd= 0; #endif /* ! EMBEDDED_LIBRARY */ @@ -9112,7 +9119,9 @@ static PSI_file_info all_server_files[]= { &key_file_io_cache, "io_cache", 0}, { &key_file_casetest, "casetest", 0}, { &key_file_dbopt, "dbopt", 0}, +#ifdef HAVE_des { &key_file_des_key_file, "des_key_file", 0}, +#endif { &key_file_ERRMSG, "ERRMSG", 0}, { &key_select_to_file, "select_to_file", 0}, { &key_file_fileparser, "file_parser", 0}, diff --git a/sql/mysqld.h b/sql/mysqld.h index 5fa8e22c2ab..15febb1e15d 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -310,10 +310,6 @@ extern PSI_mutex_key key_PAGE_lock, key_LOCK_sync, key_LOCK_active, key_LOCK_pool, key_LOCK_pending_checkpoint; #endif /* HAVE_MMAP */ -#ifdef HAVE_OPENSSL -extern PSI_mutex_key key_LOCK_des_key_file; -#endif - extern PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list, key_BINLOG_LOCK_binlog_background_thread, key_LOCK_binlog_end_pos, @@ -390,7 +386,7 @@ extern PSI_thread_key key_thread_delayed_insert, extern PSI_file_key key_file_binlog, key_file_binlog_cache, key_file_binlog_index, key_file_binlog_index_cache, key_file_casetest, - key_file_dbopt, key_file_des_key_file, key_file_ERRMSG, key_select_to_file, + key_file_dbopt, key_file_ERRMSG, key_select_to_file, key_file_fileparser, key_file_frm, key_file_global_ddl_log, key_file_load, key_file_loadfile, key_file_log_event_data, key_file_log_event_info, key_file_master_info, key_file_misc, key_file_partition_ddl_log, @@ -403,6 +399,13 @@ extern PSI_socket_key key_socket_tcpip, key_socket_unix, key_socket_client_connection; extern PSI_file_key key_file_binlog_state; +#ifdef HAVE_des +extern char* des_key_file; +extern PSI_file_key key_file_des_key_file; +extern PSI_mutex_key key_LOCK_des_key_file; +extern mysql_mutex_t LOCK_des_key_file; +#endif + #ifdef HAVE_PSI_INTERFACE void init_server_psi_keys(); #endif /* HAVE_PSI_INTERFACE */ @@ -746,10 +749,6 @@ extern mysql_mutex_t extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_global_system_variables; extern mysql_rwlock_t LOCK_all_status_vars; extern mysql_mutex_t LOCK_start_thread; -#ifdef HAVE_OPENSSL -extern char* des_key_file; -extern mysql_mutex_t LOCK_des_key_file; -#endif extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_server_started; extern MYSQL_PLUGIN_IMPORT mysql_cond_t COND_server_started; extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 4f6356cff54..3a9b8e4641d 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -392,7 +392,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, } } #endif -#ifdef HAVE_OPENSSL +#ifdef HAVE_des if (options & REFRESH_DES_KEY_FILE) { if (des_key_file && load_des_key_file(des_key_file)) From e63ed4e0047b0169dca1dc06e592096bd3ae4724 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 8 Mar 2024 16:27:23 +1100 Subject: [PATCH 20/74] MDEV-33631 Ubuntu/Debian MYSQL_SERVER_SUFFIX is version+suffix on MariaDB packaged versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The debian/rules removed sufficient version information from the downstream version, however the mariadb upstream has a + separator from the suffix. While we are at it, remove the Debian/Ubuntu revision -1. Other revisions used: * Debian unstable (inherited to both Debian and Ubuntu if package unchanged): 1:10.11.6-2 * Ubuntu stable updates example: 1:10.11.6-0ubuntu0.23.10.2 * Debian stable updates example: 1:10.11.4-1~deb12u1 The result is compulation with: -DMYSQL_SERVER_SUFFIX="-1:10.4.34+maria~deb10" \ Compared to Debian: -DMYSQL_SERVER_SUFFIX="-1~deb12u1" \ The impact comes into play with SELECT VERSION(): 10.4.34-MariaDB-1:10.4.34+maria~deb10 A more abbreviated form of the following is much more human/machine parsable: 10.6.16-MariaDB~ubu2004 Reviewer: Otto Kekäläinen --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 052bf865e52..d88d4a4f869 100755 --- a/debian/rules +++ b/debian/rules @@ -21,7 +21,7 @@ ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS))) endif BUILDDIR := builddir -DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*-//') +DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/.*[~-]\(.*\)/\1/') RELEASE := $(shell lsb_release -r -s) # Use changelog based DEB_DISTRIBUTION instead? TMP:=$(CURDIR)/debian/tmp From 20f60fe70f5e3764cd437b2d1dcc80d3e0ce1f00 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 2 May 2024 21:41:13 +0200 Subject: [PATCH 21/74] postfix a09ebe5567694f13dd77876bf61ce3560dfed0e6 (PCRE-10.43) - no need to switch off -fsanitize-address for MSVC anymore - option /WX is MSVC only - CMAKE_C_STANDARD C99 is already in pcre's own CMakeLists.txt --- cmake/pcre.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 5ef089aa686..70ea92f1746 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -41,16 +41,16 @@ MACRO(BUNDLE_PCRE2) SET(byproducts ${byproducts} BUILD_BYPRODUCTS ${file} ${file_d}) SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION ${file}) ENDFOREACH() + FOREACH(v "" "_DEBUG" "_RELWITHDEBINFO" "_RELEASE" "_MINSIZEREL") - STRING(REPLACE "/WX" "" pcre2_flags${v} "${CMAKE_C_FLAGS${v}}") - SET(pcre2_flags${v} "${pcre2_flags${v}} -std=c99 ") + SET(pcre2_flags${v} "${CMAKE_C_FLAGS${v}}") IF(MSVC) + STRING(REPLACE "/WX" "" pcre2_flags${v} "${pcre2_flags${v}}") # Suppress a warning STRING(APPEND pcre2_flags${v} " /wd4244 /wd4267 " ) - # Disable asan support - STRING(REPLACE "-fsanitize=address" "" pcre2_flags${v} "${pcre2_flags${v}}") ENDIF() ENDFOREACH() + ExternalProject_Add( pcre2 PREFIX "${dir}" From b84d335d9df076be0cbf4b02ab21c91e905c077b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 4 Mar 2024 10:25:34 +1100 Subject: [PATCH 22/74] MDEV-33538 make auxiliary spider plugins init depend on actual spider The two I_S plugins SPIDER_ALLOC_MEM and SPIDER_WRAPPER_PROTOCOL only makes sense if the main SPIDER plugin is installed. Further, SPIDER_ALLOC_MEM requires a mutex that requires SPIDER init to fill the table. We also update the spider init query to override --transaction_read_only=on so that it does not affect the spider init. Also fixed error handling in spider_db_init() so that failure in spider table init does not result in memory leak --- sql/handler.cc | 7 ------- sql/sql_show.cc | 10 +++++++--- .../spider/bugfix/r/mdev_33538.result | 12 ++++++++++++ .../spider/bugfix/r/mdev_33538_fail_init.result | 8 ++++++++ .../spider/bugfix/r/plugin_load_add_all.result | 4 ++++ .../mysql-test/spider/bugfix/t/mdev_33538.opt | 2 ++ .../mysql-test/spider/bugfix/t/mdev_33538.test | 2 ++ .../spider/bugfix/t/mdev_33538_fail_init.test | 17 +++++++++++++++++ .../spider/bugfix/t/plugin_load_add_all.test | 1 + storage/spider/spd_i_s.cc | 6 ++++++ storage/spider/spd_init_query.h | 3 +++ storage/spider/spd_table.cc | 7 ++++--- 12 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test diff --git a/sql/handler.cc b/sql/handler.cc index 8b299ae1b9e..7f5cb343824 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -641,13 +641,6 @@ int ha_initialize_handlerton(st_plugin_int *plugin) hton->slot= HA_SLOT_UNDEF; /* Historical Requirement */ plugin->data= hton; // shortcut for the future - /* [remove after merge] notes on merge conflict (MDEV-31400): - 10.6-10.11: 13ba00ff4933cfc1712676f323587504e453d1b5 - 11.0-11.2: 42f8be10f18163c4025710cf6a212e82bddb2f62 - The 10.11->11.0 conflict is trivial, but the reference commit also - contains different non-conflict changes needs to be applied to 11.0 - (and beyond). - */ if (plugin->plugin->init && (ret= plugin->plugin->init(hton))) goto err; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 63c00f8614e..a6b307ac8a4 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -9942,6 +9942,7 @@ ST_SCHEMA_TABLE schema_tables[]= int initialize_schema_table(st_plugin_int *plugin) { ST_SCHEMA_TABLE *schema_table; + int err; DBUG_ENTER("initialize_schema_table"); if (!(schema_table= (ST_SCHEMA_TABLE *)my_malloc(key_memory_ST_SCHEMA_TABLE, @@ -9958,12 +9959,15 @@ int initialize_schema_table(st_plugin_int *plugin) /* Make the name available to the init() function. */ schema_table->table_name= plugin->name.str; - if (plugin->plugin->init(schema_table)) + if ((err= plugin->plugin->init(schema_table))) { - sql_print_error("Plugin '%s' init function returned error.", - plugin->name.str); + if (err != HA_ERR_RETRY_INIT) + sql_print_error("Plugin '%s' init function returned error.", + plugin->name.str); plugin->data= NULL; my_free(schema_table); + if (err == HA_ERR_RETRY_INIT) + DBUG_RETURN(err); DBUG_RETURN(1); } diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result new file mode 100644 index 00000000000..6597e457101 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result @@ -0,0 +1,12 @@ +show create table information_schema.SPIDER_ALLOC_MEM; +Table Create Table +SPIDER_ALLOC_MEM CREATE TEMPORARY TABLE `SPIDER_ALLOC_MEM` ( + `ID` int(10) unsigned NOT NULL, + `FUNC_NAME` varchar(64), + `FILE_NAME` varchar(64), + `LINE_NO` int(10) unsigned, + `TOTAL_ALLOC_MEM` bigint(20) unsigned, + `CURRENT_ALLOC_MEM` bigint(20), + `ALLOC_MEM_COUNT` bigint(20) unsigned, + `FREE_MEM_COUNT` bigint(20) unsigned +) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result new file mode 100644 index 00000000000..4b914710f18 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result @@ -0,0 +1,8 @@ +call mtr.add_suppression("\\[ERROR\\] SPIDER plugin initialization failed"); +call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER' registration as a STORAGE ENGINE failed."); +call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_WRAPPER_PROTOCOLS' registration as a INFORMATION SCHEMA failed."); +call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_ALLOC_MEM' registration as a INFORMATION SCHEMA failed."); +create table mysql.spider_tables (c int); +# restart: --plugin-load-add=ha_spider +SELECT * FROM information_schema.SPIDER_ALLOC_MEM; +ERROR 42S02: Unknown table 'SPIDER_ALLOC_MEM' in information_schema diff --git a/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result b/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result index 04e5ed6da68..4d161a2f7fb 100644 --- a/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result +++ b/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result @@ -3,5 +3,9 @@ # select * from mysql.plugin; name dl +select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA = "information_schema" and TABLE_NAME like "SPIDER_%"; +TABLE_NAME +SPIDER_ALLOC_MEM +SPIDER_WRAPPER_PROTOCOLS create table t (c int) Engine=SPIDER; drop table t; diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt new file mode 100644 index 00000000000..a90c3a39413 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt @@ -0,0 +1,2 @@ +--plugin-load-add=ha_spider +--transaction-read-only=on diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test new file mode 100644 index 00000000000..e2d4d8b46e4 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test @@ -0,0 +1,2 @@ +# we check that information_schema.SPIDER_ALLOC_MEM exists +show create table information_schema.SPIDER_ALLOC_MEM; diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test new file mode 100644 index 00000000000..1218e1db719 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test @@ -0,0 +1,17 @@ +call mtr.add_suppression("\\[ERROR\\] SPIDER plugin initialization failed"); +call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER' registration as a STORAGE ENGINE failed."); +call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_WRAPPER_PROTOCOLS' registration as a INFORMATION SCHEMA failed."); +call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_ALLOC_MEM' registration as a INFORMATION SCHEMA failed."); +# We create a table with identical name of the spider system table, to +# fail the spider init query ([ERROR] SPIDER plugin initialization +# failed at 'alter table mysql.spider_tables add column if not exists +# link_id int not null default 0 after table_name, drop primary key, +# add primary key (db_name, table_name, link_id), algorithm=copy, +# lock=shared;' by 'Unknown column 'table_name' in 'spider_tables'') +# This will cause the init of spider_alloc_mem to fail because it +# depends on the main spider plugin. +create table mysql.spider_tables (c int); +--let $restart_parameters= --plugin-load-add=ha_spider +--source include/restart_mysqld.inc +--error ER_UNKNOWN_TABLE +SELECT * FROM information_schema.SPIDER_ALLOC_MEM; diff --git a/storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test b/storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test index 396145fba2e..35242b2092b 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test +++ b/storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test @@ -3,5 +3,6 @@ --echo # # A simple test that tests plugin-load-add=ha_spider select * from mysql.plugin; +select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA = "information_schema" and TABLE_NAME like "SPIDER_%"; create table t (c int) Engine=SPIDER; drop table t; diff --git a/storage/spider/spd_i_s.cc b/storage/spider/spd_i_s.cc index 22cd8eb0f15..8f828939aeb 100644 --- a/storage/spider/spd_i_s.cc +++ b/storage/spider/spd_i_s.cc @@ -129,7 +129,10 @@ static int spider_i_s_alloc_mem_init( void *p ) { ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p; + const LEX_CSTRING spider_name={STRING_WITH_LEN("SPIDER")}; DBUG_ENTER("spider_i_s_alloc_mem_init"); + if (!plugin_is_ready(&spider_name, MYSQL_STORAGE_ENGINE_PLUGIN)) + DBUG_RETURN(HA_ERR_RETRY_INIT); schema->fields_info = Show::spider_i_s_alloc_mem_fields_info; schema->fill_table = spider_i_s_alloc_mem_fill_table; schema->idx_field1 = 0; @@ -249,7 +252,10 @@ static int spider_i_s_wrapper_protocols_init( void *p ) { ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p; + const LEX_CSTRING spider_name={STRING_WITH_LEN("SPIDER")}; DBUG_ENTER("spider_i_s_wrapper_protocols_init"); + if (!plugin_is_ready(&spider_name, MYSQL_STORAGE_ENGINE_PLUGIN)) + DBUG_RETURN(HA_ERR_RETRY_INIT); schema->fields_info = Show::spider_i_s_wrapper_protocols_fields_info; schema->fill_table = spider_i_s_wrapper_protocols_fill_table; schema->idx_field1 = 0; diff --git a/storage/spider/spd_init_query.h b/storage/spider/spd_init_query.h index b493104f095..bdf42ddc3ef 100644 --- a/storage/spider/spd_init_query.h +++ b/storage/spider/spd_init_query.h @@ -25,6 +25,9 @@ static LEX_STRING spider_init_queries[] = { "SET @@SQL_MODE = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO," "NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';" )}, + {C_STRING_WITH_LEN( + "SET tx_read_only = off;" + )}, {C_STRING_WITH_LEN( "create table if not exists mysql.spider_xa(" " format_id int not null default 0," diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 3485ce07eea..5eedda46523 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -7230,7 +7230,7 @@ int spider_db_init( spider_param_table_crd_thread_count()), NullS)) ) - goto error_alloc_mon_mutxes; + goto error_alloc_table_sts_crd_threads; for (roop_count = 0; roop_count < (int) spider_param_table_sts_thread_count(); @@ -7305,9 +7305,11 @@ error_init_table_sts_threads: { spider_free_sts_threads(&spider_table_sts_threads[roop_count]); } +error_alloc_table_sts_crd_threads: spider_free(NULL, spider_table_sts_threads, MYF(0)); - roop_count = spider_param_udf_table_mon_mutex_count() - 1; #endif +error_system_table_creation: + roop_count = spider_param_udf_table_mon_mutex_count() - 1; error_init_udf_table_mon_list_hash: for (; roop_count >= 0; roop_count--) { @@ -7321,7 +7323,6 @@ error_init_udf_table_mon_list_hash: error_init_udf_table_mon_cond: for (; roop_count >= 0; roop_count--) pthread_cond_destroy(&spider_udf_table_mon_conds[roop_count]); -error_system_table_creation: roop_count = spider_param_udf_table_mon_mutex_count() - 1; error_init_udf_table_mon_mutex: for (; roop_count >= 0; roop_count--) From 611cd6b9817e3649441533a332d8d8cc0665d1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 3 May 2024 13:06:13 +0300 Subject: [PATCH 23/74] MDEV-33817 preparation: Restructuring and unit tests In our unit test, let us rely on our own reference implementation using the reflected CRC-32 ISO 3309 and CRC-32C polynomials. Let us also test with various lengths. Let us refactor the CRC-32 and CRC-32C implementations so that no special compilation flags will be needed and that some function call indirection will be avoided. pmull_supported: Remove. We will have pointers to two separate functions crc32c_aarch64_pmull() and crc32c_aarch64(). --- mysys/CMakeLists.txt | 30 ++-- mysys/crc32/crc32_arm64.c | 342 ++++++++++++++++++++---------------- mysys/crc32/crc32_x86.c | 16 +- mysys/crc32/crc32c.cc | 261 +++++++++++---------------- mysys/crc32/crc32c_amd64.cc | 8 + mysys/crc32/crc32c_ppc.h | 3 +- mysys/crc32/crc32c_x86.cc | 67 +++++++ mysys/crc32/crc_ppc64.h | 7 +- mysys/crc32ieee.cc | 19 +- unittest/mysys/crc32-t.c | 138 +++++++++++---- 10 files changed, 509 insertions(+), 382 deletions(-) create mode 100644 mysys/crc32/crc32c_x86.cc diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index ec72fb2601d..8b007f7f8da 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -60,29 +60,21 @@ IF (WIN32) ENDIF() IF(MSVC) - SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c) + SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c crc32/crc32c_x86.cc) IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET (MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc) ENDIF() - ADD_DEFINITIONS(-DHAVE_SSE42 -DHAVE_PCLMUL) - IF(CLANG_CL) - SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul") - ENDIF() ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|i386|i686") - MY_CHECK_CXX_COMPILER_FLAG(-msse4.2) - MY_CHECK_CXX_COMPILER_FLAG(-mpclmul) - CHECK_INCLUDE_FILE(cpuid.h HAVE_CPUID_H) - CHECK_INCLUDE_FILE(x86intrin.h HAVE_X86INTRIN_H) - IF(have_CXX__msse4.2 AND HAVE_CPUID_H) - ADD_DEFINITIONS(-DHAVE_SSE42) - IF (have_CXX__mpclmul AND HAVE_X86INTRIN_H) - ADD_DEFINITIONS(-DHAVE_PCLMUL) - SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c) - SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul") - IF(CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc) - SET_SOURCE_FILES_PROPERTIES(crc32/crc32c_amd64.cc PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul") - ENDIF() + SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c crc32/crc32c_x86.cc) + IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5") + SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES + COMPILE_FLAGS "-msse4.2 -mpclmul") + ENDIF() + IF(CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc) + IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5") + SET_SOURCE_FILES_PROPERTIES(crc32/crc32c_amd64.cc PROPERTIES + COMPILE_FLAGS "-msse4.2 -mpclmul") ENDIF() ENDIF() ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64") diff --git a/mysys/crc32/crc32_arm64.c b/mysys/crc32/crc32_arm64.c index 0e70c21812a..6588606a015 100644 --- a/mysys/crc32/crc32_arm64.c +++ b/mysys/crc32/crc32_arm64.c @@ -1,13 +1,18 @@ #include #include #include +#include -static int pmull_supported; +typedef unsigned (*my_crc32_t)(unsigned, const void *, size_t); -#if defined(HAVE_ARMV8_CRC) +#ifdef HAVE_ARMV8_CRC -#if defined(__APPLE__) -#include +# ifdef HAVE_ARMV8_CRYPTO +static unsigned crc32c_aarch64_pmull(unsigned, const void *, size_t); +# endif + +# ifdef __APPLE__ +# include int crc32_aarch64_available(void) { @@ -18,17 +23,17 @@ int crc32_aarch64_available(void) return ret; } -const char *crc32c_aarch64_available(void) +my_crc32_t crc32c_aarch64_available(void) { - if (crc32_aarch64_available() == 0) - return NULL; - pmull_supported = 1; - return "Using ARMv8 crc32 + pmull instructions"; +# ifdef HAVE_ARMV8_CRYPTO + if (crc32_aarch64_available()) + return crc32c_aarch64_pmull; +# endif + return NULL; } - -#else -#include -#if defined(__FreeBSD__) +# else +# include +# ifdef __FreeBSD__ static unsigned long getauxval(unsigned int key) { unsigned long val; @@ -36,17 +41,17 @@ static unsigned long getauxval(unsigned int key) return 0ul; return val; } -#else -# include -#endif +# else +# include +# endif -#ifndef HWCAP_CRC32 -# define HWCAP_CRC32 (1 << 7) -#endif +# ifndef HWCAP_CRC32 +# define HWCAP_CRC32 (1 << 7) +# endif -#ifndef HWCAP_PMULL -# define HWCAP_PMULL (1 << 4) -#endif +# ifndef HWCAP_PMULL +# define HWCAP_PMULL (1 << 4) +# endif /* ARM made crc32 default from ARMv8.1 but optional in ARMv8A * Runtime check API. @@ -56,22 +61,37 @@ int crc32_aarch64_available(void) unsigned long auxv= getauxval(AT_HWCAP); return (auxv & HWCAP_CRC32) != 0; } +# endif -const char *crc32c_aarch64_available(void) +# ifndef __APPLE__ +static unsigned crc32c_aarch64(unsigned, const void *, size_t); + +my_crc32_t crc32c_aarch64_available(void) { unsigned long auxv= getauxval(AT_HWCAP); - if (!(auxv & HWCAP_CRC32)) return NULL; - - pmull_supported= (auxv & HWCAP_PMULL) != 0; - if (pmull_supported) - return "Using ARMv8 crc32 + pmull instructions"; - else - return "Using ARMv8 crc32 instructions"; +# ifdef HAVE_ARMV8_CRYPTO + /* Raspberry Pi 4 supports crc32 but doesn't support pmull (MDEV-23030). */ + if (auxv & HWCAP_PMULL) + return crc32c_aarch64_pmull; +# endif + return crc32c_aarch64; } +# endif -#endif /* __APPLE__ */ +const char *crc32c_aarch64_impl(my_crc32_t c) +{ +# ifdef HAVE_ARMV8_CRYPTO + if (c == crc32c_aarch64_pmull) + return "Using ARMv8 crc32 + pmull instructions"; +# endif +# ifndef __APPLE__ + if (c == crc32c_aarch64) + return "Using ARMv8 crc32 instructions"; +# endif + return NULL; +} #endif /* HAVE_ARMV8_CRC */ #ifndef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS @@ -157,131 +177,14 @@ asm(".arch_extension crypto"); PREF4X64L2(buffer,(PREF_OFFSET), 8) \ PREF4X64L2(buffer,(PREF_OFFSET), 12) -uint32_t crc32c_aarch64(uint32_t crc, const unsigned char *buffer, uint64_t len) +#ifndef __APPLE__ +static unsigned crc32c_aarch64(unsigned crc, const void *buf, size_t len) { - uint32_t crc0, crc1, crc2; int64_t length= (int64_t)len; + const unsigned char *buffer= buf; crc^= 0xffffffff; - /* Pmull runtime check here. - * Raspberry Pi 4 supports crc32 but doesn't support pmull (MDEV-23030). - * - * Consider the condition that the target platform does support hardware crc32 - * but not support PMULL. In this condition, it should leverage the aarch64 - * crc32 instruction (__crc32c) and just only skip parallel computation (pmull/vmull) - * rather than skip all hardware crc32 instruction of computation. - */ - if (pmull_supported) - { -/* The following Macro (HAVE_ARMV8_CRYPTO) is used for compiling check */ -#ifdef HAVE_ARMV8_CRYPTO - -/* Crypto extension Support - * Parallel computation with 1024 Bytes (per block) - * Intrinsics Support - */ -# ifdef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS - const poly64_t k1= 0xe417f38a, k2= 0x8f158014; - uint64_t t0, t1; - - /* Process per block size of 1024 Bytes - * A block size = 8 + 42*3*sizeof(uint64_t) + 8 - */ - while ((length-= 1024) >= 0) - { - /* Prefetch 3*1024 data for avoiding L2 cache miss */ - PREF1KL2(buffer, 1024*3); - /* Do first 8 bytes here for better pipelining */ - crc0= __crc32cd(crc, *(const uint64_t *)buffer); - crc1= 0; - crc2= 0; - buffer+= sizeof(uint64_t); - - /* Process block inline - * Process crc0 last to avoid dependency with above - */ - CRC32C7X3X8(buffer, 0); - CRC32C7X3X8(buffer, 1); - CRC32C7X3X8(buffer, 2); - CRC32C7X3X8(buffer, 3); - CRC32C7X3X8(buffer, 4); - CRC32C7X3X8(buffer, 5); - - buffer+= 42*3*sizeof(uint64_t); - /* Prefetch data for following block to avoid L1 cache miss */ - PREF1KL1(buffer, 1024); - - /* Last 8 bytes - * Merge crc0 and crc1 into crc2 - * crc1 multiply by K2 - * crc0 multiply by K1 - */ - t1= (uint64_t)vmull_p64(crc1, k2); - t0= (uint64_t)vmull_p64(crc0, k1); - crc= __crc32cd(crc2, *(const uint64_t *)buffer); - crc1= __crc32cd(0, t1); - crc^= crc1; - crc0= __crc32cd(0, t0); - crc^= crc0; - - buffer+= sizeof(uint64_t); - } - -# else /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */ - - /*No intrinsics*/ - __asm__("mov x16, #0xf38a \n\t" - "movk x16, #0xe417, lsl 16 \n\t" - "mov v1.2d[0], x16 \n\t" - "mov x16, #0x8014 \n\t" - "movk x16, #0x8f15, lsl 16 \n\t" - "mov v0.2d[0], x16 \n\t" - :::"x16"); - - while ((length-= 1024) >= 0) - { - PREF1KL2(buffer, 1024*3); - __asm__("crc32cx %w[c0], %w[c], %x[v]\n\t" - :[c0]"=r"(crc0):[c]"r"(crc), [v]"r"(*(const uint64_t *)buffer):); - crc1= 0; - crc2= 0; - buffer+= sizeof(uint64_t); - - CRC32C7X3X8(buffer, 0); - CRC32C7X3X8(buffer, 1); - CRC32C7X3X8(buffer, 2); - CRC32C7X3X8(buffer, 3); - CRC32C7X3X8(buffer, 4); - CRC32C7X3X8(buffer, 5); - - buffer+= 42*3*sizeof(uint64_t); - PREF1KL1(buffer, 1024); - __asm__("mov v2.2d[0], %x[c1] \n\t" - "pmull v2.1q, v2.1d, v0.1d \n\t" - "mov v3.2d[0], %x[c0] \n\t" - "pmull v3.1q, v3.1d, v1.1d \n\t" - "crc32cx %w[c], %w[c2], %x[v] \n\t" - "mov %x[c1], v2.2d[0] \n\t" - "crc32cx %w[c1], wzr, %x[c1] \n\t" - "eor %w[c], %w[c], %w[c1] \n\t" - "mov %x[c0], v3.2d[0] \n\t" - "crc32cx %w[c0], wzr, %x[c0] \n\t" - "eor %w[c], %w[c], %w[c0] \n\t" - :[c1]"+r"(crc1), [c0]"+r"(crc0), [c2]"+r"(crc2), [c]"+r"(crc) - :[v]"r"(*((const uint64_t *)buffer))); - buffer+= sizeof(uint64_t); - } -# endif /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */ - - /* Done if Input data size is aligned with 1024 */ - if (!(length+= 1024)) - return ~crc; - -#endif /* HAVE_ARMV8_CRYPTO */ - - } // end if pmull_supported - while ((length-= sizeof(uint64_t)) >= 0) { CRC32CX(crc, *(uint64_t *)buffer); @@ -306,6 +209,143 @@ uint32_t crc32c_aarch64(uint32_t crc, const unsigned char *buffer, uint64_t len) return ~crc; } +#endif + +#ifdef HAVE_ARMV8_CRYPTO +static unsigned crc32c_aarch64_pmull(unsigned crc, const void *buf, size_t len) +{ + int64_t length= (int64_t)len; + const unsigned char *buffer= buf; + + crc^= 0xffffffff; + + /* Crypto extension Support + * Parallel computation with 1024 Bytes (per block) + * Intrinsics Support + */ +# ifdef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS + /* Process per block size of 1024 Bytes + * A block size = 8 + 42*3*sizeof(uint64_t) + 8 + */ + for (const poly64_t k1= 0xe417f38a, k2= 0x8f158014; (length-= 1024) >= 0; ) + { + uint32_t crc0, crc1, crc2; + uint64_t t0, t1; + /* Prefetch 3*1024 data for avoiding L2 cache miss */ + PREF1KL2(buffer, 1024*3); + /* Do first 8 bytes here for better pipelining */ + crc0= __crc32cd(crc, *(const uint64_t *)buffer); + crc1= 0; + crc2= 0; + buffer+= sizeof(uint64_t); + + /* Process block inline + * Process crc0 last to avoid dependency with above + */ + CRC32C7X3X8(buffer, 0); + CRC32C7X3X8(buffer, 1); + CRC32C7X3X8(buffer, 2); + CRC32C7X3X8(buffer, 3); + CRC32C7X3X8(buffer, 4); + CRC32C7X3X8(buffer, 5); + + buffer+= 42*3*sizeof(uint64_t); + /* Prefetch data for following block to avoid L1 cache miss */ + PREF1KL1(buffer, 1024); + + /* Last 8 bytes + * Merge crc0 and crc1 into crc2 + * crc1 multiply by K2 + * crc0 multiply by K1 + */ + t1= (uint64_t)vmull_p64(crc1, k2); + t0= (uint64_t)vmull_p64(crc0, k1); + crc= __crc32cd(crc2, *(const uint64_t *)buffer); + crc1= __crc32cd(0, t1); + crc^= crc1; + crc0= __crc32cd(0, t0); + crc^= crc0; + + buffer+= sizeof(uint64_t); + } + +# else /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */ + /*No intrinsics*/ + __asm__("mov x16, #0xf38a \n\t" + "movk x16, #0xe417, lsl 16 \n\t" + "mov v1.2d[0], x16 \n\t" + "mov x16, #0x8014 \n\t" + "movk x16, #0x8f15, lsl 16 \n\t" + "mov v0.2d[0], x16 \n\t" + :::"x16"); + + while ((length-= 1024) >= 0) + { + uint32_t crc0, crc1, crc2; + + PREF1KL2(buffer, 1024*3); + __asm__("crc32cx %w[c0], %w[c], %x[v]\n\t" + :[c0]"=r"(crc0):[c]"r"(crc), [v]"r"(*(const uint64_t *)buffer):); + crc1= 0; + crc2= 0; + buffer+= sizeof(uint64_t); + + CRC32C7X3X8(buffer, 0); + CRC32C7X3X8(buffer, 1); + CRC32C7X3X8(buffer, 2); + CRC32C7X3X8(buffer, 3); + CRC32C7X3X8(buffer, 4); + CRC32C7X3X8(buffer, 5); + + buffer+= 42*3*sizeof(uint64_t); + PREF1KL1(buffer, 1024); + __asm__("mov v2.2d[0], %x[c1] \n\t" + "pmull v2.1q, v2.1d, v0.1d \n\t" + "mov v3.2d[0], %x[c0] \n\t" + "pmull v3.1q, v3.1d, v1.1d \n\t" + "crc32cx %w[c], %w[c2], %x[v] \n\t" + "mov %x[c1], v2.2d[0] \n\t" + "crc32cx %w[c1], wzr, %x[c1] \n\t" + "eor %w[c], %w[c], %w[c1] \n\t" + "mov %x[c0], v3.2d[0] \n\t" + "crc32cx %w[c0], wzr, %x[c0] \n\t" + "eor %w[c], %w[c], %w[c0] \n\t" + :[c1]"+r"(crc1), [c0]"+r"(crc0), [c2]"+r"(crc2), [c]"+r"(crc) + :[v]"r"(*((const uint64_t *)buffer))); + buffer+= sizeof(uint64_t); + } +# endif /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */ + + /* Done if Input data size is aligned with 1024 */ + length+= 1024; + if (length) + { + while ((length-= sizeof(uint64_t)) >= 0) + { + CRC32CX(crc, *(uint64_t *)buffer); + buffer+= sizeof(uint64_t); + } + + /* The following is more efficient than the straight loop */ + if (length & sizeof(uint32_t)) + { + CRC32CW(crc, *(uint32_t *)buffer); + buffer+= sizeof(uint32_t); + } + + if (length & sizeof(uint16_t)) + { + CRC32CH(crc, *(uint16_t *)buffer); + buffer+= sizeof(uint16_t); + } + + if (length & sizeof(uint8_t)) + CRC32CB(crc, *buffer); + } + + return ~crc; +} +#endif /* HAVE_ARMV8_CRYPTO */ /* There are multiple approaches to calculate crc. Approach-1: Process 8 bytes then 4 bytes then 2 bytes and then 1 bytes diff --git a/mysys/crc32/crc32_x86.c b/mysys/crc32/crc32_x86.c index f077399caca..ab2522d61cf 100644 --- a/mysys/crc32/crc32_x86.c +++ b/mysys/crc32/crc32_x86.c @@ -56,11 +56,16 @@ #include #ifdef __GNUC__ -#include +# include +# include +# include +# include +# define USE_PCLMUL __attribute__((target("sse4.2,pclmul"))) #elif defined(_MSC_VER) -#include +# include +# define USE_PCLMUL /* nothing */ #else -#error "unknown compiler" +# error "unknown compiler" #endif /** @@ -71,6 +76,7 @@ * * @return \a reg << (\a num * 8) */ +USE_PCLMUL static inline __m128i xmm_shift_left(__m128i reg, const unsigned int num) { static const MY_ALIGNED(16) uint8_t crc_xmm_shift_tab[48]= { @@ -111,6 +117,7 @@ struct crcr_pclmulqdq_ctx * * @return New 16 byte folded data */ +USE_PCLMUL static inline __m128i crcr32_folding_round(const __m128i data_block, const __m128i precomp, const __m128i fold) { @@ -128,6 +135,7 @@ static inline __m128i crcr32_folding_round(const __m128i data_block, * * @return data reduced to 64 bits */ +USE_PCLMUL static inline __m128i crcr32_reduce_128_to_64(__m128i data128, const __m128i precomp) { __m128i tmp0, tmp1, tmp2; @@ -152,6 +160,7 @@ static inline __m128i crcr32_reduce_128_to_64(__m128i data128, const __m128i pre * * @return data reduced to 32 bits */ +USE_PCLMUL static inline uint32_t crcr32_reduce_64_to_32(__m128i data64, const __m128i precomp) { static const MY_ALIGNED(16) uint32_t mask1[4]= { @@ -188,6 +197,7 @@ static inline uint32_t crcr32_reduce_64_to_32(__m128i data64, const __m128i prec * * @return CRC for given \a data block (32 bits wide). */ +USE_PCLMUL static inline uint32_t crcr32_calc_pclmulqdq(const uint8_t *data, uint32_t data_len, uint32_t crc, const struct crcr_pclmulqdq_ctx *params) diff --git a/mysys/crc32/crc32c.cc b/mysys/crc32/crc32c.cc index 2bec041e278..32a45478e94 100644 --- a/mysys/crc32/crc32c.cc +++ b/mysys/crc32/crc32c.cc @@ -19,52 +19,23 @@ #include #include #include -#include -static inline uint32_t DecodeFixed32(const char *ptr) -{ - return uint4korr(ptr); -} -#include -#ifdef _MSC_VER -#include -#endif +#ifdef __powerpc64__ +# include "crc32c_ppc.h" +# ifdef __linux__ +# include -#ifdef HAVE_SSE42 -# ifdef __GNUC__ -# include -# if __GNUC__ < 5 && !defined __clang__ -/* the headers do not really work in GCC before version 5 */ -# define _mm_crc32_u8(crc,data) __builtin_ia32_crc32qi(crc,data) -# define _mm_crc32_u32(crc,data) __builtin_ia32_crc32si(crc,data) -# define _mm_crc32_u64(crc,data) __builtin_ia32_crc32di(crc,data) -# else -# include +# ifndef PPC_FEATURE2_VEC_CRYPTO +# define PPC_FEATURE2_VEC_CRYPTO 0x02000000 +# endif + +# ifndef AT_HWCAP2 +# define AT_HWCAP2 26 # endif -# define USE_SSE42 __attribute__((target("sse4.2"))) -# else -# define USE_SSE42 /* nothing */ # endif #endif - -#ifdef __powerpc64__ -#include "crc32c_ppc.h" - -#if __linux__ -#include - -#ifndef PPC_FEATURE2_VEC_CRYPTO -#define PPC_FEATURE2_VEC_CRYPTO 0x02000000 -#endif - -#ifndef AT_HWCAP2 -#define AT_HWCAP2 26 -#endif - -#endif /* __linux__ */ - -#endif +typedef unsigned (*my_crc32_t)(unsigned, const void *, size_t); namespace mysys_namespace { namespace crc32c { @@ -75,6 +46,7 @@ static int arch_ppc_crc32 = 0; #endif /* __powerpc64__ */ #endif +alignas(CPU_LEVEL1_DCACHE_LINESIZE) static const uint32_t table0_[256] = { 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb, @@ -341,8 +313,9 @@ static const uint32_t table3_[256] = { }; // Used to fetch a naturally-aligned 32-bit word in little endian byte-order -static inline uint32_t LE_LOAD32(const uint8_t *p) { - return DecodeFixed32(reinterpret_cast(p)); +static inline uint32_t LE_LOAD32(const uint8_t *p) +{ + return uint4korr(reinterpret_cast(p)); } static inline void Slow_CRC32(uint64_t* l, uint8_t const **p) @@ -362,10 +335,7 @@ static inline void Slow_CRC32(uint64_t* l, uint8_t const **p) table0_[c >> 24]; } -#ifdef ALIGN #undef ALIGN -#endif - // Align n to (1 << m) byte boundary #define ALIGN(n, m) ((n + ((1 << m) - 1)) & ~((1 << m) - 1)) @@ -374,70 +344,30 @@ static inline void Slow_CRC32(uint64_t* l, uint8_t const **p) l = table0_[c] ^ (l >> 8); \ } while (0) -static uint32_t crc32c_slow(uint32_t crc, const char* buf, size_t size) -{ - const uint8_t *p = reinterpret_cast(buf); - const uint8_t *e = p + size; - uint64_t l = crc ^ 0xffffffffu; - - // Point x at first 16-byte aligned byte in string. This might be - // just past the end of the string. - const uintptr_t pval = reinterpret_cast(p); - const uint8_t* x = reinterpret_cast(ALIGN(pval, 4)); - if (x <= e) - // Process bytes until finished or p is 16-byte aligned - while (p != x) - STEP1; - // Process bytes 16 at a time - while ((e-p) >= 16) - { - Slow_CRC32(&l, &p); - Slow_CRC32(&l, &p); - } - // Process bytes 8 at a time - while ((e-p) >= 8) - Slow_CRC32(&l, &p); - // Process the last few bytes - while (p != e) - STEP1; - return static_cast(l ^ 0xffffffffu); -} - -#if defined HAVE_POWER8 -#elif defined HAVE_ARMV8_CRC -#elif defined HAVE_SSE42 -constexpr uint32_t cpuid_ecx_SSE42= 1U << 20; -constexpr uint32_t cpuid_ecx_SSE42_AND_PCLMUL= cpuid_ecx_SSE42 | 1U<<1; - -static uint32_t cpuid_ecx() -{ -#ifdef __GNUC__ - uint32_t reax= 0, rebx= 0, recx= 0, redx= 0; - __cpuid(1, reax, rebx, recx, redx); - return recx; -#elif defined _MSC_VER - int regs[4]; - __cpuid(regs, 1); - return regs[2]; -#else -# error "unknown compiler" +#undef USE_SSE42 +#if defined _MSC_VER && (defined _M_X64 || defined _M_IX86) +# include +# include +# define USE_SSE42 /* nothing */ +#elif defined __GNUC__ && (defined __i386__||defined __x86_64__) +# if __GNUC__ < 5 && !defined __clang_major__ +/* the headers do not really work in GCC before version 5 */ +# define _mm_crc32_u8(crc,data) __builtin_ia32_crc32qi(crc,data) +# define _mm_crc32_u32(crc,data) __builtin_ia32_crc32si(crc,data) +# define _mm_crc32_u64(crc,data) __builtin_ia32_crc32di(crc,data) +# else +# include +# endif +# define USE_SSE42 __attribute__((target("sse4.2"))) #endif -} -extern "C" int crc32_pclmul_enabled(void) -{ - return !(~cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL); -} - -#if SIZEOF_SIZE_T == 8 -extern "C" uint32_t crc32c_3way(uint32_t crc, const char *buf, size_t len); - -USE_SSE42 +#ifdef USE_SSE42 +# if SIZEOF_SIZE_T == 8 static inline uint64_t LE_LOAD64(const uint8_t *ptr) { return uint8korr(reinterpret_cast(ptr)); } -#endif +# endif USE_SSE42 static inline void Fast_CRC32(uint64_t* l, uint8_t const **p) @@ -453,10 +383,11 @@ static inline void Fast_CRC32(uint64_t* l, uint8_t const **p) # endif } +extern "C" USE_SSE42 -static uint32_t crc32c_sse42(uint32_t crc, const char* buf, size_t size) +unsigned crc32c_sse42(unsigned crc, const void* buf, size_t size) { - const uint8_t *p = reinterpret_cast(buf); + const uint8_t *p = static_cast(buf); const uint8_t *e = p + size; uint64_t l = crc ^ 0xffffffffu; @@ -484,107 +415,111 @@ static uint32_t crc32c_sse42(uint32_t crc, const char* buf, size_t size) } #endif -typedef uint32_t (*Function)(uint32_t, const char*, size_t); +static unsigned crc32c_slow(unsigned crc, const void* buf, size_t size) +{ + const uint8_t *p = static_cast(buf); + const uint8_t *e = p + size; + uint64_t l = crc ^ 0xffffffffu; -#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC) -uint32_t ExtendPPCImpl(uint32_t crc, const char *buf, size_t size) { - return crc32c_ppc(crc, (const unsigned char *)buf, size); + // Point x at first 16-byte aligned byte in string. This might be + // just past the end of the string. + const uintptr_t pval = reinterpret_cast(p); + const uint8_t* x = reinterpret_cast(ALIGN(pval, 4)); + if (x <= e) + // Process bytes until finished or p is 16-byte aligned + while (p != x) + STEP1; + // Process bytes 16 at a time + while ((e-p) >= 16) + { + Slow_CRC32(&l, &p); + Slow_CRC32(&l, &p); + } + // Process bytes 8 at a time + while ((e-p) >= 8) + Slow_CRC32(&l, &p); + // Process the last few bytes + while (p != e) + STEP1; + return static_cast(l ^ 0xffffffffu); } -#if __linux__ +#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC) +# ifdef __linux__ static int arch_ppc_probe(void) { arch_ppc_crc32 = 0; -#if defined(__powerpc64__) +# if defined(__powerpc64__) if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) arch_ppc_crc32 = 1; -#endif /* __powerpc64__ */ +# endif /* __powerpc64__ */ return arch_ppc_crc32; } -#elif __FreeBSD_version >= 1200000 -#include -#include -#include +# elif defined __FreeBSD_version && __FreeBSD_version >= 1200000 +# include +# include +# include static int arch_ppc_probe(void) { unsigned long cpufeatures; arch_ppc_crc32 = 0; -#if defined(__powerpc64__) +# if defined(__powerpc64__) elf_aux_info(AT_HWCAP2, &cpufeatures, sizeof(cpufeatures)); if (cpufeatures & PPC_FEATURE2_HAS_VEC_CRYPTO) arch_ppc_crc32 = 1; -#endif /* __powerpc64__ */ +# endif /* __powerpc64__ */ return arch_ppc_crc32; } -#elif defined(_AIX) || defined(__OpenBSD__) +# elif defined(_AIX) || defined(__OpenBSD__) static int arch_ppc_probe(void) { arch_ppc_crc32 = 0; -#if defined(__powerpc64__) +# if defined(__powerpc64__) // AIX 7.1+/OpenBSD has vector crypto features on all POWER 8+ arch_ppc_crc32 = 1; -#endif /* __powerpc64__ */ +# endif /* __powerpc64__ */ return arch_ppc_crc32; } -#endif // __linux__ +# endif #endif #if defined(HAVE_ARMV8_CRC) -extern "C" const char *crc32c_aarch64_available(void); -extern "C" uint32_t crc32c_aarch64(uint32_t crc, const unsigned char *buffer, uint64_t len); - -static uint32_t ExtendARMImpl(uint32_t crc, const char *buf, size_t size) { - return crc32c_aarch64(crc, (const unsigned char *)buf, (size_t) size); -} +extern "C" my_crc32_t crc32c_aarch64_available(void); +extern "C" const char *crc32c_aarch64_impl(my_crc32_t); +#elif defined __i386__||defined __x86_64__||defined _M_X64||defined _M_IX86 +extern "C" my_crc32_t crc32c_x86_available(void); +extern "C" const char *crc32c_x86_impl(my_crc32_t); #endif -static inline Function Choose_Extend() +static inline my_crc32_t Choose_Extend() { #if defined HAVE_POWER8 && defined HAS_ALTIVEC if (arch_ppc_probe()) - return ExtendPPCImpl; -#elif defined(HAVE_ARMV8_CRC) - if (crc32c_aarch64_available()) - return ExtendARMImpl; -#elif HAVE_SSE42 -# if defined HAVE_PCLMUL && SIZEOF_SIZE_T == 8 - switch (cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) { - case cpuid_ecx_SSE42_AND_PCLMUL: - return crc32c_3way; - case cpuid_ecx_SSE42: - return crc32c_sse42; - } -# else - if (cpuid_ecx() & cpuid_ecx_SSE42) - return crc32c_sse42; -# endif + return crc32c_ppc; +#elif defined HAVE_ARMV8_CRC + if (my_crc32_t crc= crc32c_aarch64_available()) + return crc; +#elif defined __i386__||defined __x86_64__||defined _M_X64||defined _M_IX86 + if (my_crc32_t crc= crc32c_x86_available()) + return crc; #endif return crc32c_slow; } -static const Function ChosenExtend= Choose_Extend(); - -static inline uint32_t Extend(uint32_t crc, const char* buf, size_t size) -{ - return ChosenExtend(crc, buf, size); -} +static const my_crc32_t ChosenExtend= Choose_Extend(); extern "C" const char *my_crc32c_implementation() { -#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC) - if (ChosenExtend == ExtendPPCImpl) +#if defined HAVE_POWER8 && defined HAS_ALTIVEC + if (ChosenExtend == crc32c_ppc) return "Using POWER8 crc32 instructions"; -#elif defined(HAVE_ARMV8_CRC) - if (const char *ret= crc32c_aarch64_available()) +#elif defined HAVE_ARMV8_CRC + if (const char *ret= crc32c_aarch64_impl(ChosenExtend)) + return ret; +#elif defined __i386__||defined __x86_64__||defined _M_X64||defined _M_IX86 + if (const char *ret= crc32c_x86_impl(ChosenExtend)) return ret; -#elif HAVE_SSE42 -# if defined HAVE_PCLMUL && SIZEOF_SIZE_T == 8 - if (ChosenExtend == crc32c_3way) - return "Using crc32 + pclmulqdq instructions"; -# endif - if (ChosenExtend == crc32c_sse42) - return "Using SSE4.2 crc32 instructions"; #endif return "Using generic crc32 instructions"; } @@ -593,5 +528,5 @@ extern "C" const char *my_crc32c_implementation() extern "C" unsigned my_crc32c(unsigned int crc, const char *buf, size_t size) { - return mysys_namespace::crc32c::Extend(crc,buf, size); + return mysys_namespace::crc32c::ChosenExtend(crc,buf, size); } diff --git a/mysys/crc32/crc32c_amd64.cc b/mysys/crc32/crc32c_amd64.cc index 22c492b457f..147c0ccaba6 100644 --- a/mysys/crc32/crc32c_amd64.cc +++ b/mysys/crc32/crc32c_amd64.cc @@ -47,6 +47,11 @@ #include #include +#ifdef _MSC_VER +# define USE_PCLMUL /* nothing */ +#else +# define USE_PCLMUL __attribute__((target("sse4.2,pclmul"))) +#endif #define CRCtriplet(crc, buf, offset) \ crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \ @@ -131,6 +136,7 @@ static const uint64_t clmul_constants alignas(16) [] = { }; // Compute the crc32c value for buffer smaller than 8 +USE_PCLMUL static inline void align_to_8( size_t len, uint64_t& crc0, // crc so far, updated on return @@ -155,6 +161,7 @@ static inline void align_to_8( // CombineCRC performs pclmulqdq multiplication of 2 partial CRC's and a well // chosen constant and xor's these with the remaining CRC. // +USE_PCLMUL static inline uint64_t CombineCRC( size_t block_size, uint64_t crc0, @@ -176,6 +183,7 @@ static inline uint64_t CombineCRC( // Compute CRC-32C using the Intel hardware instruction. extern "C" +USE_PCLMUL uint32_t crc32c_3way(uint32_t crc, const char *buf, size_t len) { const unsigned char* next = (const unsigned char*)buf; diff --git a/mysys/crc32/crc32c_ppc.h b/mysys/crc32/crc32c_ppc.h index c359061c610..797e849b685 100644 --- a/mysys/crc32/crc32c_ppc.h +++ b/mysys/crc32/crc32c_ppc.h @@ -11,8 +11,7 @@ extern "C" { #endif -extern uint32_t crc32c_ppc(uint32_t crc, unsigned char const *buffer, - unsigned len); +extern unsigned crc32c_ppc(unsigned crc, const void *buffer, size_t len); #ifdef __cplusplus } diff --git a/mysys/crc32/crc32c_x86.cc b/mysys/crc32/crc32c_x86.cc new file mode 100644 index 00000000000..d191d16c2cf --- /dev/null +++ b/mysys/crc32/crc32c_x86.cc @@ -0,0 +1,67 @@ +#include +#include +#include + +#ifdef _MSC_VER +# include +#else +# include +#endif + +extern "C" unsigned crc32c_sse42(unsigned crc, const void* buf, size_t size); + +constexpr uint32_t cpuid_ecx_SSE42= 1U << 20; +constexpr uint32_t cpuid_ecx_SSE42_AND_PCLMUL= cpuid_ecx_SSE42 | 1U << 1; + +static uint32_t cpuid_ecx() +{ +#ifdef __GNUC__ + uint32_t reax= 0, rebx= 0, recx= 0, redx= 0; + __cpuid(1, reax, rebx, recx, redx); + return recx; +#elif defined _MSC_VER + int regs[4]; + __cpuid(regs, 1); + return regs[2]; +#else +# error "unknown compiler" +#endif +} + +typedef unsigned (*my_crc32_t)(unsigned, const void *, size_t); +extern "C" unsigned int crc32_pclmul(unsigned int, const void *, size_t); +extern "C" unsigned int crc32c_3way(unsigned int, const void *, size_t); + +extern "C" my_crc32_t crc32_pclmul_enabled(void) +{ + if (~cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) + return nullptr; + return crc32_pclmul; +} + +extern "C" my_crc32_t crc32c_x86_available(void) +{ +#if SIZEOF_SIZE_T == 8 + switch (cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) { + case cpuid_ecx_SSE42_AND_PCLMUL: + return crc32c_3way; + case cpuid_ecx_SSE42: + return crc32c_sse42; + } +#else + if (cpuid_ecx() & cpuid_ecx_SSE42) + return crc32c_sse42; +#endif + return nullptr; +} + +extern "C" const char *crc32c_x86_impl(my_crc32_t c) +{ +#if SIZEOF_SIZE_T == 8 + if (c == crc32c_3way) + return "Using crc32 + pclmulqdq instructions"; +#endif + if (c == crc32c_sse42) + return "Using SSE4.2 crc32 instructions"; + return nullptr; +} diff --git a/mysys/crc32/crc_ppc64.h b/mysys/crc32/crc_ppc64.h index eb9379abc6c..81bbc16dfed 100644 --- a/mysys/crc32/crc_ppc64.h +++ b/mysys/crc32/crc_ppc64.h @@ -28,7 +28,7 @@ * any later version, or * b) the Apache License, Version 2.0 */ - +#include #include @@ -57,12 +57,13 @@ static unsigned int __attribute__ ((aligned (32))) __crc32_vpmsum(unsigned int crc, const void* p, unsigned long len); -unsigned int CRC32_FUNCTION(unsigned int crc, const unsigned char *p, - unsigned long len) +unsigned CRC32_FUNCTION(unsigned crc, const void *buffer, size_t len) { unsigned int prealign; unsigned int tail; + const unsigned char *p = buffer; + #ifdef CRC_XOR crc ^= 0xffffffff; #endif diff --git a/mysys/crc32ieee.cc b/mysys/crc32ieee.cc index bbafa1230f8..a9bbf690272 100644 --- a/mysys/crc32ieee.cc +++ b/mysys/crc32ieee.cc @@ -26,23 +26,22 @@ static unsigned int my_crc32_zlib(unsigned int crc, const void *data, return (unsigned int) crc32(crc, (const Bytef *)data, (unsigned int) len); } -#ifdef HAVE_PCLMUL -extern "C" int crc32_pclmul_enabled(); -extern "C" unsigned int crc32_pclmul(unsigned int, const void *, size_t); -#elif defined(__GNUC__) && defined(HAVE_ARMV8_CRC) +typedef unsigned int (*my_crc32_t)(unsigned int, const void *, size_t); + +#if defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __x86_64__ +extern "C" my_crc32_t crc32_pclmul_enabled(); +#elif defined HAVE_ARMV8_CRC extern "C" int crc32_aarch64_available(); extern "C" unsigned int crc32_aarch64(unsigned int, const void *, size_t); #endif -typedef unsigned int (*my_crc32_t)(unsigned int, const void *, size_t); - static my_crc32_t init_crc32() { -#ifdef HAVE_PCLMUL - if (crc32_pclmul_enabled()) - return crc32_pclmul; -#elif defined(__GNUC__) && defined(HAVE_ARMV8_CRC) +#if defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __x86_64__ + if (my_crc32_t crc= crc32_pclmul_enabled()) + return crc; +#elif defined HAVE_ARMV8_CRC if (crc32_aarch64_available()) return crc32_aarch64; #endif diff --git a/unittest/mysys/crc32-t.c b/unittest/mysys/crc32-t.c index 9834d21769b..7079aeb614a 100644 --- a/unittest/mysys/crc32-t.c +++ b/unittest/mysys/crc32-t.c @@ -1,4 +1,4 @@ -/* Copyright (c) MariaDB 2020 +/* Copyright (c) MariaDB 2020, 2024 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -19,51 +19,127 @@ #include #include #include -#include /* - Check that optimized crc32 (ieee, or ethernet polynomical) returns the same - result as zlib (not so well optimized, yet, but trustworthy) + The following lookup table oriented computation of CRC-32 + is based on the Public Domain / Creative Commons CC0 Perl code from + http://billauer.co.il/blog/2011/05/perl-crc32-crc-xs-module/ */ -#define DO_TEST_CRC32(crc,str) \ - ok(crc32(crc,(const Bytef *)str,(uint)(sizeof(str)-1)) == my_checksum(crc, str, sizeof(str)-1), "crc32 '%s'",str) -/* Check that CRC32-C calculation returns correct result*/ -#define DO_TEST_CRC32C(crc,str,expected) \ - do { \ - unsigned int v = my_crc32c(crc, str, sizeof(str)-1); \ - printf("crc32(%u,'%s',%zu)=%u\n",crc,str,sizeof(str)-1,v); \ - ok(expected == my_crc32c(crc, str, sizeof(str)-1),"crc32c '%s'",str); \ - }while(0) +/** Lookup tables */ +static uint32 tab_3309[256], tab_castagnoli[256]; +/** Initialize a lookup table for a CRC-32 polynomial */ +static void init_lookup(uint32 *tab, uint32 polynomial) +{ + unsigned i; + for (i= 0; i < 256; i++) + { + uint32 x= i; + unsigned j; + for (j= 0; j < 8; j++) + if (x & 1) + x= (x >> 1) ^ polynomial; + else + x>>= 1; + tab[i]= x; + } +} -#define LONG_STR "1234567890234568900212345678901231213123321212123123123123123"\ - "............................................................................." \ - "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ - "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" \ - "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" +/** Compute a CRC-32 one octet at a time based on a lookup table */ +static uint crc_(uint32 crc, const void *buf, size_t len, const uint32 *tab) +{ + const unsigned char *b= buf; + const unsigned char *const end = b + len; + crc^= 0xffffffff; + while (b != end) + crc= ((crc >> 8) & 0xffffff) ^ tab[(crc ^ *b++) & 0xff]; + crc^= 0xffffffff; + return crc; +} + +static uint crc32(uint32 crc, const void *buf, size_t len) +{ return crc_(crc, buf, len, tab_3309); } +static uint crc32c(uint32 crc, const void *buf, size_t len) +{ return crc_(crc, buf, len, tab_castagnoli); } + +static char buf[16384]; + +typedef uint (*check)(uint32, const void*, size_t); + +static size_t test_buf(check c1, check c2) +{ + size_t s; + for (s= sizeof buf; s; s--) + if (c1(0, buf, s) != c2(0, buf, s)) + break; + return s; +} + +#define DO_TEST_CRC32(crc,str,len) \ + ok(crc32(crc,str,len) == my_checksum(crc, str, len), \ + "crc32(%u,'%.*s')", crc, (int) len, str) + +/* Check that CRC-32C calculation returns correct result*/ +#define DO_TEST_CRC32C(crc,str,len) \ + ok(crc32c(crc,str,len) == my_crc32c(crc, str, len), \ + "crc32c(%u,'%.*s')", crc, (int) len, str) + +static const char STR[]= + "123456789012345678900212345678901231213123321212123123123123123" + "..........................................................................." + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" + "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"; int main(int argc __attribute__((unused)),char *argv[]) { MY_INIT(argv[0]); - plan(14); + init_lookup(tab_3309, 0xedb88320); + init_lookup(tab_castagnoli, 0x82f63b78); + + plan(36); printf("%s\n",my_crc32c_implementation()); - DO_TEST_CRC32(0,""); - DO_TEST_CRC32(1,""); - DO_TEST_CRC32(0,"12345"); - DO_TEST_CRC32(1,"12345"); - DO_TEST_CRC32(0,"1234567890123456789"); - DO_TEST_CRC32(0, LONG_STR); + DO_TEST_CRC32(0,STR,0); + DO_TEST_CRC32(1,STR,0); + DO_TEST_CRC32(0,STR,3); + DO_TEST_CRC32(0,STR,5); + DO_TEST_CRC32(1,STR,5); + DO_TEST_CRC32(0,STR,15); + DO_TEST_CRC32(0,STR,16); + DO_TEST_CRC32(0,STR,19); + DO_TEST_CRC32(0,STR,32); + DO_TEST_CRC32(0,STR,63); + DO_TEST_CRC32(0,STR,64); + DO_TEST_CRC32(0,STR,65); + DO_TEST_CRC32(0,STR,255); + DO_TEST_CRC32(0,STR,256); + DO_TEST_CRC32(0,STR,257); + DO_TEST_CRC32(0,STR,(sizeof(STR)-1)); ok(0 == my_checksum(0, NULL, 0) , "crc32 data = NULL, length = 0"); - DO_TEST_CRC32C(0,"", 0); - DO_TEST_CRC32C(1,"", 1); - DO_TEST_CRC32C(0, "12345", 416359221); - DO_TEST_CRC32C(1, "12345", 549473433); - DO_TEST_CRC32C(0, "1234567890123456789", 2366987449U); - DO_TEST_CRC32C(0, LONG_STR, 3009234172U); + DO_TEST_CRC32C(0,STR,0); + DO_TEST_CRC32C(1,STR,0); + DO_TEST_CRC32C(0,STR,3); + DO_TEST_CRC32C(0,STR,5); + DO_TEST_CRC32C(1,STR,5); + DO_TEST_CRC32C(0,STR,15); + DO_TEST_CRC32C(0,STR,16); + DO_TEST_CRC32C(0,STR,19); + DO_TEST_CRC32C(0,STR,32); + DO_TEST_CRC32C(0,STR,63); + DO_TEST_CRC32C(0,STR,64); + DO_TEST_CRC32C(0,STR,65); + DO_TEST_CRC32C(0,STR,255); + DO_TEST_CRC32C(0,STR,256); + DO_TEST_CRC32C(0,STR,257); + DO_TEST_CRC32C(0,STR,(sizeof(STR)-1)); ok(0 == my_crc32c(0, NULL, 0), "crc32c data = NULL, length = 0"); + memset(buf, 0x5a, sizeof buf); + ok(0 == test_buf(my_checksum, crc32), "crc32 with various lengths"); + ok(0 == test_buf(my_crc32c, crc32c), "crc32c with various lengths"); + my_end(0); return exit_status(); } From 9ec7819c585d139c8fe64d0f7f0f0f51dcafa01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 3 May 2024 15:55:20 +0300 Subject: [PATCH 24/74] MDEV-33817: AVX512BW and VPCLMULQDQ based CRC-32 This is based on https://github.com/intel/intel-ipsec-mb/ and has been tested both on x86 and x86-64, with code that was generated by several versions of GCC and clang. GCC 11 or clang 8 or later should be able to compile this, and so should recent versions of MSVC. Thanks to Intel Corporation for providing access to hardware, for answering my questions regarding the code, and for providing the coefficients for the CRC-32C computation. crc32_avx512(): Compute a reverse polynomial CRC-32 using precomputed tables and carry-less product, for up to 256 bytes of unaligned input per loop iteration. Reviewed by: Vladislav Vaintroub --- mysys/crc32/crc32c_x86.cc | 390 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 390 insertions(+) diff --git a/mysys/crc32/crc32c_x86.cc b/mysys/crc32/crc32c_x86.cc index d191d16c2cf..02dbf2920eb 100644 --- a/mysys/crc32/crc32c_x86.cc +++ b/mysys/crc32/crc32c_x86.cc @@ -1,11 +1,33 @@ +/* Copyright (c) 2024, MariaDB plc + + 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 Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ + #include #include #include #ifdef _MSC_VER # include +# if 0 /* So far, we have no environment where this could be tested. */ +# define USE_VPCLMULQDQ /* nothing */ +# endif #else # include +# if __GNUC__ >= 11 || (defined __clang_major__ && __clang_major__ >= 8) +# define TARGET "pclmul,avx512f,avx512dq,avx512bw,avx512vl,vpclmulqdq" +# define USE_VPCLMULQDQ __attribute__((target(TARGET))) +# endif #endif extern "C" unsigned crc32c_sse42(unsigned crc, const void* buf, size_t size); @@ -32,15 +54,379 @@ typedef unsigned (*my_crc32_t)(unsigned, const void *, size_t); extern "C" unsigned int crc32_pclmul(unsigned int, const void *, size_t); extern "C" unsigned int crc32c_3way(unsigned int, const void *, size_t); +#ifdef USE_VPCLMULQDQ +# include + +# ifdef _MSC_VER +/* MSVC does not seem to define this intrinsic for vmovdqa */ +# define _mm_load_epi32(x) *reinterpret_cast(x) +# endif + +/* + This implementation is based on + crc32_by16_vclmul_avx512 and crc32_refl_by16_vclmul_avx512 + in https://github.com/intel/intel-ipsec-mb/ with some optimizations. + The // comments in crc32_avx512() correspond to assembler labels. +*/ + +/** table of constants corresponding to a CRC polynomial up to degree 32 */ +struct alignas(64) crc32_tab +{ + const uint64_t b2048[2], b1024[2]; + alignas(64) const uint64_t b896[6]; /* includes b786, b640 */ + const uint64_t b512[2]; + const uint64_t b384[2], b256[2], b128[2], zeropad_for_b384[2]; + const uint64_t b64[2], b32[2]; +}; + +/** ISO 3309 CRC-32 (reflected polynomial 0x04C11DB7); zlib crc32() */ +static const crc32_tab refl32 = { + { 0x00000000e95c1271, 0x00000000ce3371cb }, + { 0x00000000910eeec1, 0x0000000033fff533 }, + { 0x000000000cbec0ed, 0x0000000031f8303f, + 0x0000000057c54819, 0x00000000df068dc2, + 0x00000000ae0b5394, 0x000000001c279815 }, + { 0x000000001d9513d7, 0x000000008f352d95 }, + { 0x00000000af449247, 0x000000003db1ecdc }, + { 0x0000000081256527, 0x00000000f1da05aa }, + { 0x00000000ccaa009e, 0x00000000ae689191 }, + { 0, 0 }, + { 0x00000000ccaa009e, 0x00000000b8bc6765 }, + { 0x00000001f7011640, 0x00000001db710640 } +}; + +/** Castagnoli CRC-32C (reflected polynomial 0x1EDC6F41) */ +static const crc32_tab refl32c = { + { 0x00000000b9e02b86, 0x00000000dcb17aa4 }, + { 0x000000000d3b6092, 0x000000006992cea2 }, + { 0x0000000047db8317, 0x000000002ad91c30, + 0x000000000715ce53, 0x00000000c49f4f67, + 0x0000000039d3b296, 0x00000000083a6eec }, + { 0x000000009e4addf8, 0x00000000740eef02 }, + { 0x00000000ddc0152b, 0x000000001c291d04 }, + { 0x00000000ba4fc28e, 0x000000003da6d0cb }, + { 0x00000000493c7d27, 0x00000000f20c0dfe }, + { 0, 0 }, + { 0x00000000493c7d27, 0x00000000dd45aab8 }, + { 0x00000000dea713f0, 0x0000000105ec76f0 } +}; + +/** Some ternary functions */ +class ternary +{ + static constexpr uint8_t A = 0b11110000; + static constexpr uint8_t B = 0b11001100; + static constexpr uint8_t C = 0b10101010; +public: + static constexpr uint8_t XOR3 = A ^ B ^ C; + static constexpr uint8_t XNOR3 = uint8_t(~(A ^ B ^ C)); + static constexpr uint8_t XOR2_AND = (A ^ B) & C; +}; + +USE_VPCLMULQDQ +/** @return a^b^c */ +static inline __m128i xor3_128(__m128i a, __m128i b, __m128i c) +{ + return _mm_ternarylogic_epi64(a, b, c, ternary::XOR3); +} + +USE_VPCLMULQDQ +/** @return ~(a^b^c) */ +static inline __m128i xnor3_128(__m128i a, __m128i b, __m128i c) +{ + return _mm_ternarylogic_epi64(a, b, c, ternary::XNOR3); +} + +USE_VPCLMULQDQ +/** @return a^b^c */ +static inline __m512i xor3_512(__m512i a, __m512i b, __m512i c) +{ + return _mm512_ternarylogic_epi64(a, b, c, ternary::XOR3); +} + +USE_VPCLMULQDQ +/** @return (a^b)&c */ +static inline __m128i xor2_and_128(__m128i a, __m128i b, __m128i c) +{ + return _mm_ternarylogic_epi64(a, b, c, ternary::XOR2_AND); +} + +USE_VPCLMULQDQ +/** Load 64 bytes */ +static inline __m512i load512(const char *b) { return _mm512_loadu_epi8(b); } + +USE_VPCLMULQDQ +/** Load 16 bytes */ +static inline __m128i load128(const char *b) { return _mm_loadu_epi64(b); } + +/** Combine 512 data bits with CRC */ +USE_VPCLMULQDQ +static inline __m512i combine512(__m512i a, __m512i tab, __m512i b) +{ + return xor3_512(b, _mm512_clmulepi64_epi128(a, tab, 0x01), + _mm512_clmulepi64_epi128(a, tab, 0x10)); +} + +# define xor512(a, b) _mm512_xor_epi64(a, b) +# define xor256(a, b) _mm256_xor_epi64(a, b) +# define xor128(a, b) _mm_xor_epi64(a, b) +# define and128(a, b) _mm_and_si128(a, b) + +template USE_VPCLMULQDQ +/** Pick a 128-bit component of a 512-bit vector */ +static inline __m512i extract512_128(__m512i a) +{ + static_assert(bits <= 3, "usage"); +# if defined __GNUC__ && __GNUC__ >= 11 + /* While technically incorrect, this would seem to translate into a + vextracti32x4 instruction, which actually outputs a ZMM register + (anything above the XMM range is cleared). */ + return _mm512_castsi128_si512(_mm512_extracti64x2_epi64(a, bits)); +# else + /* On clang, this is needed in order to get a correct result. */ + return _mm512_maskz_shuffle_i64x2(3, a, a, bits); +# endif +} + +alignas(16) static const uint64_t shuffle128[4] = { + 0x8786858483828100, 0x8f8e8d8c8b8a8988, + 0x0706050403020100, 0x000e0d0c0b0a0908 +}; + +static const __mmask16 size_mask[16] = { + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + +alignas(16) static const uint64_t shift128[4] = { + 0x8786858483828100, 0x8f8e8d8c8b8a8988, + 0x0706050403020100, 0x000e0d0c0b0a0908 +}; + +static const char shift_1_to_3_reflect[7 + 11] = { + -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 +}; + +USE_VPCLMULQDQ +static unsigned crc32_avx512(unsigned crc, const char *buf, size_t size, + const crc32_tab &tab) +{ + const __m512i crc_in = _mm512_castsi128_si512(_mm_cvtsi32_si128(~crc)), + b512 = _mm512_broadcast_i32x4(_mm_load_epi32(tab.b512)); + __m128i crc_out; + __m512i lo; + + if (size >= 256) { + lo = xor512(load512(buf), crc_in); + __m512i l1 = load512(buf + 64); + + const __m512i b1024 = _mm512_broadcast_i32x4(_mm_load_epi32(&tab.b1024)); + size -= 256; + if (size >= 256) { + __m512i h0 = load512(buf + 128), + hi = load512(buf + 192); + const __m512i b2048 = _mm512_broadcast_i32x4(_mm_load_epi32(&tab.b2048)); + size -= 256; + do { + buf += 256; + lo = combine512(lo, b2048, load512(buf)); + l1 = combine512(l1, b2048, load512(buf + 64)); + h0 = combine512(h0, b2048, load512(buf + 128)); + hi = combine512(hi, b2048, load512(buf + 192)); + size -= 256; + } while (ssize_t(size) >= 0); + + buf += 256; + lo = combine512(lo, b1024, h0); + l1 = combine512(l1, b1024, hi); + size += 128; + } else { + do { + buf += 128; + lo = combine512(lo, b1024, load512(buf)); + l1 = combine512(l1, b1024, load512(buf + 64)); + size -= 128; + } while (ssize_t(size) >= 0); + + buf += 128; + } + + if (ssize_t(size) >= -64) { + size += 128; + lo = combine512(lo, b512, l1); + goto fold_64_B_loop; + } + + const __m512i + b896 = _mm512_load_epi32(&tab.b896), + b384 = _mm512_load_epi32(&tab.b384); + + __m512i c4 = xor3_512(_mm512_clmulepi64_epi128(lo, b896, 1), + _mm512_clmulepi64_epi128(lo, b896, 0x10), + _mm512_clmulepi64_epi128(l1, b384, 1)); + c4 = xor3_512(c4, _mm512_clmulepi64_epi128(l1, b384, 0x10), + extract512_128<3>(l1)); + + __m256i c2 = _mm512_castsi512_si256(_mm512_shuffle_i64x2(c4, c4, 0b01001110)); + c2 = xor256(c2, _mm512_castsi512_si256(c4)); + crc_out = xor128(_mm256_extracti64x2_epi64(c2, 1), + _mm256_castsi256_si128(c2)); + size += 128 - 16; + goto final_reduction; + } + + __m128i b; + + // less_than_256 + if (size >= 32) { + if (size >= 64) { + lo = xor512(load512(buf), crc_in); + + while (buf += 64, (size -= 64) >= 64) + fold_64_B_loop: + lo = combine512(lo, b512, load512(buf)); + + // reduce_64B + const __m512i b384 = _mm512_load_epi32(&tab.b384); + __m512i crc512 = + xor3_512(_mm512_clmulepi64_epi128(lo, b384, 1), + _mm512_clmulepi64_epi128(lo, b384, 0x10), + extract512_128<3>(lo)); + crc512 = xor512(crc512, _mm512_shuffle_i64x2(crc512, crc512, 0b01001110)); + const __m256i crc256 = _mm512_castsi512_si256(crc512); + crc_out = xor128(_mm256_extracti64x2_epi64(crc256, 1), + _mm256_castsi256_si128(crc256)); + size -= 16; + } else { + // less_than_64 + crc_out = xor128(load128(buf), + _mm512_castsi512_si128(crc_in)); + buf += 16; + size -= 32; + } + + final_reduction: + b = _mm_load_epi32(&tab.b128); + + while (ssize_t(size) >= 0) { + // reduction_loop_16B + crc_out = xor3_128(load128(buf), + _mm_clmulepi64_si128(crc_out, b, 1), + _mm_clmulepi64_si128(crc_out, b, 0x10)); + buf += 16; + size -= 16; + } + // final_reduction_for_128 + + size += 16; + if (size) { + get_last_two_xmms: + const __m128i crc2 = crc_out, d = load128(buf + (size - 16)); + __m128i S = load128(reinterpret_cast(shuffle128) + size); + crc_out = _mm_shuffle_epi8(crc_out, S); + S = xor128(S, _mm_set1_epi32(0x80808080)); + crc_out = xor3_128(_mm_blendv_epi8(_mm_shuffle_epi8(crc2, S), d, S), + _mm_clmulepi64_si128(crc_out, b, 1), + _mm_clmulepi64_si128(crc_out, b, 0x10)); + } + + done_128: + __m128i crc_tmp; + b = _mm_load_epi32(&tab.b64); + crc_tmp = xor128(_mm_clmulepi64_si128(crc_out, b, 0x00), + _mm_srli_si128(crc_out, 8)); + crc_out = _mm_slli_si128(crc_tmp, 4); + crc_out = _mm_clmulepi64_si128(crc_out, b, 0x10); + crc_out = xor128(crc_out, crc_tmp); + + barrett: + b = _mm_load_epi32(&tab.b32); + crc_tmp = crc_out; + crc_out = and128(crc_out, _mm_set_epi64x(~0ULL, ~0xFFFFFFFFULL)); + crc_out = _mm_clmulepi64_si128(crc_out, b, 0); + crc_out = xor2_and_128(crc_out, crc_tmp, _mm_set_epi64x(0, ~0ULL)); + crc_out = xnor3_128(crc_out, crc_tmp, + _mm_clmulepi64_si128(crc_out, b, 0x10)); + return _mm_extract_epi32(crc_out, 2); + } else { + // less_than_32 + if (size > 0) { + if (size > 16) { + crc_out = xor128(load128(buf), + _mm512_castsi512_si128(crc_in)); + buf += 16; + size -= 16; + b = _mm_load_epi32(&tab.b128); + goto get_last_two_xmms; + } else if (size < 16) { + crc_out = _mm_maskz_loadu_epi8(size_mask[size - 1], buf); + crc_out = xor128(crc_out, _mm512_castsi512_si128(crc_in)); + + if (size >= 4) { + crc_out = _mm_shuffle_epi8 + (crc_out, + load128(reinterpret_cast(shift128) + size)); + goto done_128; + } else { + // only_less_than_4 + /* Shift, zero-filling 5 to 7 of the 8-byte crc_out */ + crc_out = _mm_shuffle_epi8(crc_out, + load128(shift_1_to_3_reflect + size - 1)); + goto barrett; + } + } else { + crc_out = xor128(load128(buf), _mm512_castsi512_si128(crc_in)); + goto done_128; + } + } else + return crc; + } +} + +static ATTRIBUTE_NOINLINE int have_vpclmulqdq() +{ +# ifdef _MSC_VER + int regs[4]; + __cpuidex(regs, 7, 0); + uint32_t ebx = regs[1], ecx = regs[2]; +# else + uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0; + __cpuid_count(7, 0, eax, ebx, ecx, edx); +# endif + return ecx & 1U<<10/*VPCLMULQDQ*/ && + !(~ebx & ((1U<<16/*AVX512F*/ | 1U<<17/*AVX512DQ*/ | + 1U<<30/*AVX512BW*/ | 1U<<31/*AVX512VL*/))); +} + +static unsigned crc32_vpclmulqdq(unsigned crc, const void *buf, size_t size) +{ + return crc32_avx512(crc, static_cast(buf), size, refl32); +} + +static unsigned crc32c_vpclmulqdq(unsigned crc, const void *buf, size_t size) +{ + return crc32_avx512(crc, static_cast(buf), size, refl32c); +} +#endif + extern "C" my_crc32_t crc32_pclmul_enabled(void) { if (~cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) return nullptr; +#ifdef USE_VPCLMULQDQ + if (have_vpclmulqdq()) + return crc32_vpclmulqdq; +#endif return crc32_pclmul; } extern "C" my_crc32_t crc32c_x86_available(void) { +#ifdef USE_VPCLMULQDQ + if (have_vpclmulqdq()) + return crc32c_vpclmulqdq; +#endif #if SIZEOF_SIZE_T == 8 switch (cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) { case cpuid_ecx_SSE42_AND_PCLMUL: @@ -57,6 +443,10 @@ extern "C" my_crc32_t crc32c_x86_available(void) extern "C" const char *crc32c_x86_impl(my_crc32_t c) { +#ifdef USE_VPCLMULQDQ + if (c == crc32c_vpclmulqdq) + return "Using AVX512 instructions"; +#endif #if SIZEOF_SIZE_T == 8 if (c == crc32c_3way) return "Using crc32 + pclmulqdq instructions"; From 029e2a5fd9017d0ed12de6a0a1549f39bece7fbe Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 2 May 2024 23:11:38 +0200 Subject: [PATCH 25/74] MDEV-33876 CMake, zlib - use names compatible with official FindZLIB.cmake - ZLIB_LIBRARIES, not ZLIB_LIBRARY - ZLIB_INCLUDE_DIRS, not ZLIB_INCLUDE_DIR For building libmariadb, ZLIB_LIBRARY/ZLIB_INCLUDE_DIR are still defined This workaround will be removed later. --- client/CMakeLists.txt | 2 +- cmake/plugin.cmake | 2 +- cmake/zlib.cmake | 10 ++++++---- extra/CMakeLists.txt | 2 +- libmysqld/CMakeLists.txt | 4 ++-- mysys/CMakeLists.txt | 4 ++-- sql/CMakeLists.txt | 2 +- storage/archive/CMakeLists.txt | 2 +- storage/connect/CMakeLists.txt | 2 +- storage/innobase/CMakeLists.txt | 2 +- storage/maria/CMakeLists.txt | 4 ++-- storage/maria/unittest/CMakeLists.txt | 2 +- storage/rocksdb/CMakeLists.txt | 2 +- storage/rocksdb/build_rocksdb.cmake | 2 +- storage/tokudb/CMakeLists.txt | 2 +- storage/tokudb/PerconaFT/src/CMakeLists.txt | 2 +- unittest/mysys/CMakeLists.txt | 2 +- 17 files changed, 25 insertions(+), 23 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 55fd02b23c3..3ad788f8023 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ${PCRE_INCLUDES} ${CMAKE_SOURCE_DIR}/mysys_ssl - ${ZLIB_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/strings diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 813d8ef6e42..7fd3b6294b9 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -46,7 +46,7 @@ MACRO(MYSQL_ADD_PLUGIN) ${CMAKE_SOURCE_DIR}/sql ${PCRE_INCLUDES} ${SSL_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIR}) + ${ZLIB_INCLUDE_DIRS}) LIST(GET ARG_UNPARSED_ARGUMENTS 0 plugin) SET(SOURCES ${ARG_UNPARSED_ARGUMENTS}) diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake index ee47eb427d9..a933194cd33 100644 --- a/cmake/zlib.cmake +++ b/cmake/zlib.cmake @@ -14,9 +14,12 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA MACRO (MYSQL_USE_BUNDLED_ZLIB) - SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib) + SET(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib) SET(BUILD_BUNDLED_ZLIB 1) - SET(ZLIB_LIBRARY zlib CACHE INTERNAL "Bundled zlib library") + SET(ZLIB_LIBRARIES zlib CACHE INTERNAL "Bundled zlib library") + # temporarily define ZLIB_LIBRARY and ZLIB_INCLUDE_DIR for libmariadb + SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES}) + SET(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS}) SET(ZLIB_FOUND TRUE) SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib") ADD_SUBDIRECTORY(zlib) @@ -29,7 +32,7 @@ ENDMACRO() # If this is set,we use bundled zlib # If this is not set,search for system zlib. # if system zlib is not found, use bundled copy -# ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR and ZLIB_SOURCES +# ZLIB_LIBRARIES, ZLIB_INCLUDE_DIRS # are set after this macro has run MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS) @@ -52,7 +55,6 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS) IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND) SET(WITH_ZLIB "system" CACHE STRING "Which zlib to use (possible values are 'bundled' or 'system')") - SET(ZLIB_SOURCES "") ELSE() SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable") MESSAGE(STATUS "system zlib found but not usable") diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index f53e9fdf8d8..00ef14c1b21 100644 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -13,7 +13,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${ZLIB_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${ZLIB_INCLUDE_DIRS}) # Default install component for the files is Server here SET(MYSQL_INSTALL_COMPONENT Server) diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index b9eff10bc18..44115b5c1fc 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -24,7 +24,7 @@ ${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/tpool ${CMAKE_BINARY_DIR}/sql ${PCRE_INCLUDES} -${ZLIB_INCLUDE_DIR} +${ZLIB_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS} ${SSL_INTERNAL_INCLUDE_DIRS} ) @@ -169,7 +169,7 @@ ENDIF() SET(LIBS dbug strings mysys mysys_ssl pcre2-8 vio - ${ZLIB_LIBRARY} ${SSL_LIBRARIES} + ${ZLIB_LIBRARIES} ${SSL_LIBRARIES} ${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS} ${EMBEDDED_PLUGIN_LIBS} sql_embedded diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 8b007f7f8da..bf3984a1ffc 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/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 -INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys) +INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys) SET(MYSYS_SOURCES array.c charset-def.c charset.c my_default.c get_password.c @@ -157,7 +157,7 @@ ENDIF() ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES}) MAYBE_DISABLE_IPO(mysys) -TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} +TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARIES} ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO}) DTRACE_INSTRUMENT(mysys) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index bb86d5cac66..8d24a140865 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -53,7 +53,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql ${PCRE_INCLUDES} -${ZLIB_INCLUDE_DIR} +${ZLIB_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/sql ${CMAKE_SOURCE_DIR}/tpool diff --git a/storage/archive/CMakeLists.txt b/storage/archive/CMakeLists.txt index 5b6818fc921..5c7b6aa4aab 100644 --- a/storage/archive/CMakeLists.txt +++ b/storage/archive/CMakeLists.txt @@ -14,5 +14,5 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA SET(ARCHIVE_SOURCES azio.c ha_archive.cc ha_archive.h) -MYSQL_ADD_PLUGIN(archive ${ARCHIVE_SOURCES} STORAGE_ENGINE LINK_LIBRARIES ${ZLIB_LIBRARY}) +MYSQL_ADD_PLUGIN(archive ${ARCHIVE_SOURCES} STORAGE_ENGINE LINK_LIBRARIES ${ZLIB_LIBRARIES}) diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 6dd6832dc7e..1a1e8df080a 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -406,7 +406,7 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES} STORAGE_ENGINE COMPONENT connect-engine RECOMPILE_FOR_EMBEDDED - LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY} + LINK_LIBRARIES ${ZLIB_LIBRARIES} ${XML_LIBRARY} ${ICONV_LIBRARY} ${ODBC_LIBRARY} ${JDBC_LIBRARY} ${MONGOC_LIBRARY} ${IPHLPAPI_LIBRARY} ${REST_LIBRARY}) IF(NOT TARGET connect) diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 8e26eec0f0a..8289da05fc4 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -492,7 +492,7 @@ MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE MODULE_OUTPUT_NAME ha_innodb DEFAULT RECOMPILE_FOR_EMBEDDED LINK_LIBRARIES - ${ZLIB_LIBRARY} + ${ZLIB_LIBRARIES} ${NUMA_LIBRARY} ${LIBSYSTEMD} ${LINKER_SCRIPT} diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt index a566580dca3..426a19f0447 100644 --- a/storage/maria/CMakeLists.txt +++ b/storage/maria/CMakeLists.txt @@ -124,7 +124,7 @@ ENDIF() IF (CURL_FOUND) INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) MYSQL_ADD_PLUGIN(s3 ha_s3.cc ${S3_SOURCES} COMPONENT s3-engine - LINK_LIBRARIES ${CURL_LIBRARIES} ${ZLIB_LIBRARY} STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf) + LINK_LIBRARIES ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf) ENDIF() SET(CPACK_RPM_s3-engine_PACKAGE_SUMMARY "Amazon S3 archival storage engine for MariaDB" PARENT_SCOPE) @@ -132,7 +132,7 @@ SET(CPACK_RPM_s3-engine_PACKAGE_DESCRIPTION "The S3 storage engine allows one to IF(TARGET s3) MYSQL_ADD_EXECUTABLE(aria_s3_copy aria_s3_copy.cc ${S3_SOURCES} COMPONENT s3-engine) - TARGET_LINK_LIBRARIES(aria_s3_copy aria myisam mysys mysys_ssl ${CURL_LIBRARIES} ${ZLIB_LIBRARY}) + TARGET_LINK_LIBRARIES(aria_s3_copy aria myisam mysys mysys_ssl ${CURL_LIBRARIES} ${ZLIB_LIBRARIES}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libmarias3) ADD_DEFINITIONS(-DWITH_S3_STORAGE_ENGINE) ENDIF() diff --git a/storage/maria/unittest/CMakeLists.txt b/storage/maria/unittest/CMakeLists.txt index a2da1507c97..a7b3441044d 100644 --- a/storage/maria/unittest/CMakeLists.txt +++ b/storage/maria/unittest/CMakeLists.txt @@ -15,7 +15,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/unittest/mytap) -LINK_LIBRARIES(aria myisam mytap mysys dbug strings ${ZLIB_LIBRARY}) +LINK_LIBRARIES(aria myisam mytap mysys dbug strings ${ZLIB_LIBRARIES}) MY_ADD_TESTS(ma_control_file trnman) diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index b6671c458f9..976b7fb2f51 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -197,7 +197,7 @@ ADD_CONVENIENCE_LIBRARY(rocksdb_aux_lib ADD_DEPENDENCIES(rocksdb_aux_lib GenError) # MARIAROCKS-TODO: how to properly depend on -lrt ? -TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY}) +TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARIES}) if (UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt) endif() diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake index cfcb0e351b7..eda58421da0 100644 --- a/storage/rocksdb/build_rocksdb.cmake +++ b/storage/rocksdb/build_rocksdb.cmake @@ -79,7 +79,7 @@ check_lib(snappy snappy) # rocksdb/cmake/modules/Findsnappy.cmake violates the c check_lib(ZSTD ZSTD ZDICT_trainFromBuffer) add_definitions(-DZLIB) -list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARY}) +list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARIES}) ADD_FEATURE_INFO(ROCKSDB_ZLIB "ON" "zlib Compression in the RocksDB storage engine") if(CMAKE_SYSTEM_NAME MATCHES "Cygwin") diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index b88fad4c244..90d7237344d 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -175,7 +175,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/${TOKU_FT_DIR_NAME}/buildheader) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/${TOKU_FT_DIR_NAME}/portability) TARGET_LINK_LIBRARIES(tokudb tokufractaltree_static tokuportability_static - ${ZLIB_LIBRARY} ${LIBJEMALLOC} stdc++) + ${ZLIB_LIBRARIES} ${LIBJEMALLOC} stdc++) SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -fuse-linker-plugin") SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} -flto -fuse-linker-plugin") diff --git a/storage/tokudb/PerconaFT/src/CMakeLists.txt b/storage/tokudb/PerconaFT/src/CMakeLists.txt index bae37389004..ae5611044a8 100644 --- a/storage/tokudb/PerconaFT/src/CMakeLists.txt +++ b/storage/tokudb/PerconaFT/src/CMakeLists.txt @@ -19,7 +19,7 @@ set(tokudb_srcs add_library(${LIBTOKUDB} SHARED ${tokudb_srcs}) add_dependencies(${LIBTOKUDB} install_tdb_h generate_log_code) target_link_libraries(${LIBTOKUDB} LINK_PRIVATE locktree_static ft_static util_static lzma snappy dbug ${LIBTOKUPORTABILITY}) -target_link_libraries(${LIBTOKUDB} LINK_PUBLIC ${ZLIB_LIBRARY} ) +target_link_libraries(${LIBTOKUDB} LINK_PUBLIC ${ZLIB_LIBRARIES} ) ## make the static library add_library(tokudb_static_conv STATIC ${tokudb_srcs}) diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt index 4b947ab780f..9dd5e5dbd9c 100644 --- a/unittest/mysys/CMakeLists.txt +++ b/unittest/mysys/CMakeLists.txt @@ -19,7 +19,7 @@ MY_ADD_TESTS(bitmap base64 my_atomic my_rdtsc lf my_malloc my_getopt dynstring MY_ADD_TESTS(my_vsnprintf LINK_LIBRARIES strings mysys) MY_ADD_TESTS(aes LINK_LIBRARIES mysys mysys_ssl) ADD_DEFINITIONS(${SSL_DEFINES}) -INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) MY_ADD_TESTS(ma_dyncol LINK_LIBRARIES mysys) IF(WIN32) From b18259ecf5e7a730c528382f86a1310fcdcab8c5 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 3 May 2024 13:24:06 +0200 Subject: [PATCH 26/74] Compiling - Fix MSVC compile warnings, on x86 --- sql/ha_partition.cc | 8 +++++--- storage/innobase/buf/buf0flu.cc | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 8606c28d046..8ab9c346ca6 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3282,10 +3282,12 @@ handlerton *ha_partition::get_def_part_engine(const char *name) goto err; if (state.st_size <= 64) goto err; - if (!(frm_image= (uchar*)my_malloc(key_memory_Partition_share, - state.st_size, MYF(MY_WME)))) + if ((ulonglong)state.st_size >= SIZE_T_MAX) /* Whole file need to fit into memory*/ goto err; - if (mysql_file_read(file, frm_image, state.st_size, MYF(MY_NABP))) + if (!(frm_image= (uchar*)my_malloc(key_memory_Partition_share, + (size_t)state.st_size, MYF(MY_WME)))) + goto err; + if (mysql_file_read(file, frm_image, (size_t)state.st_size, MYF(MY_NABP))) goto err; if (frm_image[64] != '/') diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index d74ccd75521..a554309915d 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -2168,7 +2168,7 @@ func_exit: sum_pages += last_pages_in; - const ulint time_elapsed = std::max(curr_time - prev_time, 1); + const ulint time_elapsed = std::max(ulint(curr_time - prev_time), 1); /* We update our variables every innodb_flushing_avg_loops iterations to smooth out transition in workload. */ From 88f49da8e08bb5027b6031fed04f82f2d9f552b7 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 3 May 2024 21:48:26 +0200 Subject: [PATCH 27/74] MDEV-34063 tpool - integer overflow in multiplication. When calculating next wakeup timepoint for the timer thread, with large thread_pool_stall_limit values, 32bit int overflow can happen. Fixed by making one operand 8 byte large. Also fixed the type of tick_interval to be unsigned, so it does not go negative for very thread_pool_stall_limit. --- sql/threadpool_generic.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc index d80cf0e08df..0bab82fba79 100644 --- a/sql/threadpool_generic.cc +++ b/sql/threadpool_generic.cc @@ -107,7 +107,7 @@ struct pool_timer_t mysql_cond_t cond; volatile uint64 current_microtime; std::atomic next_timeout_check; - int tick_interval; + uint tick_interval; bool shutdown; pthread_t timer_thread_id; }; @@ -577,7 +577,7 @@ static void* timer_thread(void *param) struct timespec ts; int err; - set_timespec_nsec(ts,timer->tick_interval*1000000); + set_timespec_nsec(ts, timer->tick_interval*1000000LL); mysql_mutex_lock(&timer->mutex); err= mysql_cond_timedwait(&timer->cond, &timer->mutex, &ts); if (timer->shutdown) From 1cdf22374be6a23f026cfedd4d099b06f84a301c Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 4 May 2024 22:34:14 +0400 Subject: [PATCH 28/74] MDEV-34069 Zero datetime reinterprets as '1970-01-01 00:00:00' on field_datetime=field_timestamp The code in Field_timestamp::save_in_field() did not catch zero datetime and stored it to the other field like a usual value using store_timestamp_dec(), which knows nothing about zero date and treats {tv_sec=0, tv_usec=0} as a normal timeval value corresponding to '1970-01-01 00:00:00 +00:00'. Fixing the code to catch the special combination (ts==0 && sec_pat==0) and store it using store_time_dec() with a zero datetime passed as an argument. --- mysql-test/main/type_timestamp.result | 30 +++++++++++++++++++++++++++ mysql-test/main/type_timestamp.test | 20 ++++++++++++++++++ sql/field.cc | 2 ++ 3 files changed, 52 insertions(+) diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result index f95a1d6ae39..2763b25f58c 100644 --- a/mysql-test/main/type_timestamp.result +++ b/mysql-test/main/type_timestamp.result @@ -1368,5 +1368,35 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci drop table t1; # +# MDEV-34069 Zero datetime reinterprets as '1970-01-01 00:00:00' on field_datetime=field_timestamp +# +SET sql_mode=''; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('0000-00-00 00:00:00'); +SELECT * FROM t1; +a +0000-00-00 00:00:00 +CREATE TABLE t2 (a DATETIME); +INSERT INTO t2 SELECT a FROM t1; +SELECT * FROM t2; +a +0000-00-00 00:00:00 +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +INSERT INTO t2 VALUES ('0000-00-00 00:00:00'); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +INSERT INTO t2 SELECT a FROM t1; +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT * FROM t2; +a +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +DROP TABLE t2, t1; +SET time_zone=DEFAULT; +SET sql_mode=DEFAULT; +# # End of 10.5 tests # diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test index 526a0e69857..076ecbd41ed 100644 --- a/mysql-test/main/type_timestamp.test +++ b/mysql-test/main/type_timestamp.test @@ -920,6 +920,26 @@ create table t1 (f1 timestamp, f2 timestamp); show create table t1; drop table t1; +--echo # +--echo # MDEV-34069 Zero datetime reinterprets as '1970-01-01 00:00:00' on field_datetime=field_timestamp +--echo # + +SET sql_mode=''; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('0000-00-00 00:00:00'); +SELECT * FROM t1; +CREATE TABLE t2 (a DATETIME); +INSERT INTO t2 SELECT a FROM t1; +SELECT * FROM t2; +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +INSERT INTO t2 VALUES ('0000-00-00 00:00:00'); +INSERT INTO t2 SELECT a FROM t1; +SELECT * FROM t2; +DROP TABLE t2, t1; +SET time_zone=DEFAULT; +SET sql_mode=DEFAULT; + --echo # --echo # End of 10.5 tests --echo # diff --git a/sql/field.cc b/sql/field.cc index 828687aeaf3..e428f38b896 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5184,6 +5184,8 @@ int Field_timestamp::save_in_field(Field *to) { ulong sec_part; my_time_t ts= get_timestamp(&sec_part); + if (!ts && !sec_part) + return to->store_time_dec(Datetime::zero().get_mysql_time(), decimals()); return to->store_timestamp_dec(Timeval(ts, sec_part), decimals()); } From 2c19877015bd318f5f1871b1ce5c4aa7e9e8e559 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 4 May 2024 23:41:55 +0400 Subject: [PATCH 29/74] MDEV-34061 unix_timestamp(coalesce(timestamp_column)) returns NULL on '1970-01-01 00:00:00.000001' Field_timestampf::val_native() checked only the first four bytes to detect zero dates. That was not enough. Fixing the code to check all packed_length() bytes to detect zero dates. --- mysql-test/main/type_timestamp.result | 11 +++++++++++ mysql-test/main/type_timestamp.test | 11 +++++++++++ sql/field.cc | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result index 2763b25f58c..a87db3ae898 100644 --- a/mysql-test/main/type_timestamp.result +++ b/mysql-test/main/type_timestamp.result @@ -1398,5 +1398,16 @@ DROP TABLE t2, t1; SET time_zone=DEFAULT; SET sql_mode=DEFAULT; # +# MDEV-34061 unix_timestamp(coalesce(timestamp_column)) returns NULL on '1970-01-01 00:00:00.000001' +# +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP(6) NULL); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.000001'); +SELECT unix_timestamp(a) AS c1, unix_timestamp(coalesce(a)) AS c2 FROM t1; +c1 c2 +0.000001 0.000001 +DROP TABLE t1; +SET time_zone=DEFAULT; +# # End of 10.5 tests # diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test index 076ecbd41ed..4093afe4e0d 100644 --- a/mysql-test/main/type_timestamp.test +++ b/mysql-test/main/type_timestamp.test @@ -940,6 +940,17 @@ DROP TABLE t2, t1; SET time_zone=DEFAULT; SET sql_mode=DEFAULT; +--echo # +--echo # MDEV-34061 unix_timestamp(coalesce(timestamp_column)) returns NULL on '1970-01-01 00:00:00.000001' +--echo # + +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP(6) NULL); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.000001'); +SELECT unix_timestamp(a) AS c1, unix_timestamp(coalesce(a)) AS c2 FROM t1; +DROP TABLE t1; +SET time_zone=DEFAULT; + --echo # --echo # End of 10.5 tests --echo # diff --git a/sql/field.cc b/sql/field.cc index e428f38b896..86b11f6c6bf 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5698,8 +5698,10 @@ my_time_t Field_timestampf::get_timestamp(const uchar *pos, bool Field_timestampf::val_native(Native *to) { DBUG_ASSERT(marked_for_read()); + char zero[8]= "\0\0\0\0\0\0\0"; + DBUG_ASSERT(pack_length () <= sizeof(zero)); // Check if it's '0000-00-00 00:00:00' rather than a real timestamp - if (ptr[0] == 0 && ptr[1] == 0 && ptr[2] == 0 && ptr[3] == 0) + if (!memcmp(ptr, zero, pack_length())) { to->length(0); return false; From 7f161a5c588495ed59d880a98fcd7cdfa74174c9 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sun, 5 May 2024 15:28:37 +0400 Subject: [PATCH 30/74] MDEV-34088 The TIMESTAMP value of '1970-01-01 00:00:00' can be indirectly inserted in strict mode In strict mode a timestamp(0) column could be directly assigned from another timestamp(N>0) column with the value '1970-01-01 00:00:00.1' (at time zone '+00:00'), or with any other value '1970-01-01 00:00:00.XXXXXX' with non-zero microsecond value XXXXXX. This assignment happened silently without warnings or errors. It worked as follows: - The value {tv_sec=0, tv_usec=100000}, which is '1970-01-01 00:00:00.1' was rounded to {tv_sec=0, tv_usec=0}, which is '1970-01-01 00:00:00.0' - Then {tv_sec=0, tv_usec=0} was silently re-interpreted as zero datetime. After the fix this assignment always raises a warning, which in case of the strict mode is escalated to an error. The problem in this scenario is that '1970-01-01 00:00:00' cannot be stored, because its timeval value {tv_sec=0, tv_usec=0} is reserved for zero datetimes. Thus the warning should be raised no matter if sql_mode allows or disallows zero dates. --- mysql-test/main/type_timestamp.result | 75 +++++++++++++++++++++++++++ mysql-test/main/type_timestamp.test | 61 ++++++++++++++++++++++ sql/field.cc | 29 +++++++++-- 3 files changed, 160 insertions(+), 5 deletions(-) diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result index a87db3ae898..2516f8ea312 100644 --- a/mysql-test/main/type_timestamp.result +++ b/mysql-test/main/type_timestamp.result @@ -1409,5 +1409,80 @@ c1 c2 DROP TABLE t1; SET time_zone=DEFAULT; # +# MDEV-34088 The TIMESTAMP value of '1970-01-01 00:00:00' can be indirectly inserted in strict mode +# +SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES'; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00' for column `test`.`t1`.`a` at row 1 +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00.1' for column `test`.`t1`.`a` at row 1 +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +INSERT INTO t1 SELECT a FROM t2; +ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00 +00:00' for column `test`.`t1`.`a` at row 1 +DROP TABLE t2; +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE'; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00' for column `test`.`t1`.`a` at row 1 +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00.1' for column `test`.`t1`.`a` at row 1 +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +INSERT INTO t1 SELECT a FROM t2; +ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00 +00:00' for column `test`.`t1`.`a` at row 1 +DROP TABLE t2; +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET sql_mode=''; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +INSERT INTO t1 SELECT a FROM t2; +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +DROP TABLE t2; +SELECT * FROM t1; +a +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +INSERT INTO t1 SELECT a FROM t2; +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +DROP TABLE t2; +SELECT * FROM t1; +a +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# # End of 10.5 tests # diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test index 4093afe4e0d..3f17f347a22 100644 --- a/mysql-test/main/type_timestamp.test +++ b/mysql-test/main/type_timestamp.test @@ -951,6 +951,67 @@ SELECT unix_timestamp(a) AS c1, unix_timestamp(coalesce(a)) AS c2 FROM t1; DROP TABLE t1; SET time_zone=DEFAULT; +--echo # +--echo # MDEV-34088 The TIMESTAMP value of '1970-01-01 00:00:00' can be indirectly inserted in strict mode +--echo # + +SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES'; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 SELECT a FROM t2; +DROP TABLE t2; +DROP TABLE t1; +SET sql_mode=DEFAULT; + + +SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE'; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 SELECT a FROM t2; +DROP TABLE t2; +DROP TABLE t1; +SET sql_mode=DEFAULT; + +SET sql_mode=''; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +INSERT INTO t1 SELECT a FROM t2; +DROP TABLE t2; +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; + +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +SET time_zone='+00:00'; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00'); +INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1'); +CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1'); +INSERT INTO t1 SELECT a FROM t2; +DROP TABLE t2; +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; + --echo # --echo # End of 10.5 tests --echo # diff --git a/sql/field.cc b/sql/field.cc index 86b11f6c6bf..f03135a63bc 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5307,11 +5307,33 @@ int Field_timestamp::store(longlong nr, bool unsigned_val) } -int Field_timestamp::store_timestamp_dec(const timeval &ts, uint dec) +int Field_timestamp::store_timestamp_dec(const timeval &tv, uint dec) { int warn= 0; time_round_mode_t mode= Datetime::default_round_mode(get_thd()); - store_TIMESTAMP(Timestamp(ts).round(decimals(), mode, &warn)); + const Timestamp ts= Timestamp(tv).round(decimals(), mode, &warn); + store_TIMESTAMP(ts); + if (ts.tv().tv_sec == 0 && ts.tv().tv_usec == 0) + { + /* + The value {tv_sec==0, tv_usec==0} here means '1970-01-01 00:00:00 +00'. + It does not mean zero datetime! because store_timestamp_dec() knows + nothing about zero dates. It inserts only real timeval values. + Zero ts={0,0} here is possible in two scenarios: + - the passed tv was already {0,0} meaning '1970-01-01 00:00:00 +00' + - the passed tv had some microseconds but they were rounded/truncated + to zero: '1970-01-01 00:00:00.1 +00' -> '1970-01-01 00:00:00 +00'. + It does not matter whether rounding/truncation really happened. + In both cases the call for store_TIMESTAMP(ts) above re-interpreted + '1970-01-01 00:00:00 +00:00' to zero date. Return 1 no matter what + sql_mode is. Even if sql_mode allows zero dates, there is still a problem + here: '1970-01-01 00:00:00 +00' could not be stored as-is! + */ + ErrConvString str(STRING_WITH_LEN("1970-01-01 00:00:00 +00:00"), + system_charset_info); + set_datetime_warning(ER_WARN_DATA_OUT_OF_RANGE, &str, "datetime", 1); + return 1; // '1970-01-01 00:00:00 +00' was converted to a zero date + } if (warn) { /* @@ -5325,9 +5347,6 @@ int Field_timestamp::store_timestamp_dec(const timeval &ts, uint dec) */ set_warning(Sql_condition::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); } - if (ts.tv_sec == 0 && ts.tv_usec == 0 && - get_thd()->variables.sql_mode & (ulonglong) TIME_NO_ZERO_DATE) - return zero_time_stored_return_code_with_warning(); return 0; } From 72429cad7f5448ad680d8df7b55aa055462d5964 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Wed, 28 Dec 2022 23:05:46 +0300 Subject: [PATCH 31/74] MDEV-30046 wrong row targeted with "insert ... on duplicate" and "replace" When HA_DUPLICATE_POS is not supported, the row to replace was navigated by ha_index_read_idx_map, which uses only hash to navigate. Suchwise, given a hash collision it may choose an incorrect row. handler::position would be correct and very convenient to use here. dup_ref is already set by handler independently of the engine capabilities, when an extra lookup is made (for long unique or something else, for example WITHOUT OVERLAPS) such error will be indicated by file->lookup_errkey != -1. --- mysql-test/main/long_unique_bugs.result | 19 +++++++++++++++++++ mysql-test/main/long_unique_bugs.test | 15 +++++++++++++++ sql/handler.cc | 13 ++++++++----- sql/handler.h | 1 + sql/sql_insert.cc | 23 ++++++++++++++++++++--- 5 files changed, 63 insertions(+), 8 deletions(-) diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index 81482e68417..b01a0dd2256 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -674,6 +674,25 @@ SELECT * FROM t1; a b c 3 2 2 DROP TABLE t1; +# MDEV-30046 wrong row targeted with "insert ... on duplicate" and +# "replace", leading to data corruption +create table t (s blob, n int, unique (s)) engine=innodb; +insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1); +replace into t values ('Hrecvx_0004mm-00',2); +select * from t; +s n +Hrecvx_0004ln-00 1 +Hrecvx_0004mm-00 2 +drop table t; +create table t (s blob, n int, unique (s)) engine=innodb; +insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1); +insert into t values ('Hrecvx_0004mm-00',2) +on duplicate key update n = values (n); +select * from t; +s n +Hrecvx_0004ln-00 1 +Hrecvx_0004mm-00 2 +drop table t; # # End of 10.5 tests # diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index 2441dfa59e8..3c2ab4d70f5 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -655,6 +655,21 @@ REPLACE INTO t1 VALUES (3,2,2); SELECT * FROM t1; DROP TABLE t1; +--echo # MDEV-30046 wrong row targeted with "insert ... on duplicate" and +--echo # "replace", leading to data corruption +--source include/have_innodb.inc +create table t (s blob, n int, unique (s)) engine=innodb; +insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1); +replace into t values ('Hrecvx_0004mm-00',2); +select * from t; +drop table t; + +create table t (s blob, n int, unique (s)) engine=innodb; +insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1); +insert into t values ('Hrecvx_0004mm-00',2) + on duplicate key update n = values (n); +select * from t; +drop table t; --echo # --echo # End of 10.5 tests --echo # diff --git a/sql/handler.cc b/sql/handler.cc index 7f5cb343824..e2fe80a260d 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4569,6 +4569,12 @@ uint handler::get_dup_key(int error) DBUG_RETURN(errkey); } +bool handler::has_dup_ref() const +{ + DBUG_ASSERT(lookup_errkey != (uint)-1 || errkey != (uint)-1); + return ha_table_flags() & HA_DUPLICATE_POS || lookup_errkey != (uint)-1; +} + /** Delete all files with extension from bas_ext(). @@ -6996,11 +7002,8 @@ exit: if (error == HA_ERR_FOUND_DUPP_KEY) { table->file->lookup_errkey= key_no; - if (ha_table_flags() & HA_DUPLICATE_POS) - { - lookup_handler->position(table->record[0]); - memcpy(table->file->dup_ref, lookup_handler->ref, ref_length); - } + lookup_handler->position(table->record[0]); + memcpy(table->file->dup_ref, lookup_handler->ref, ref_length); } restore_record(table, file->lookup_buffer); table->restore_blob_values(blob_storage); diff --git a/sql/handler.h b/sql/handler.h index 0b0ffe6be27..f858553c7b7 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -3464,6 +3464,7 @@ public: virtual void print_error(int error, myf errflag); virtual bool get_error_message(int error, String *buf); uint get_dup_key(int error); + bool has_dup_ref() const; /** Retrieves the names of the table and the key for which there was a duplicate entry in the case of HA_ERR_FOREIGN_DUPLICATE_KEY. diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b3314e075f0..1e0a6a75338 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1884,11 +1884,28 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, select_result *sink) if (info->handle_duplicates == DUP_REPLACE && table->next_number_field && key_nr == table->s->next_number_index && insert_id_for_cur_row > 0) goto err; - if (table->file->ha_table_flags() & HA_DUPLICATE_POS) + if (table->file->has_dup_ref()) { + /* + If engine doesn't support HA_DUPLICATE_POS, the handler may init to + INDEX, but dup_ref could also be set by lookup_handled (and then, + lookup_errkey is set, f.ex. long unique duplicate). + + In such case, handler would stay uninitialized, so do it here. + */ + bool init_lookup_handler= table->file->lookup_errkey != (uint)-1 && + table->file->inited == handler::NONE; + if (init_lookup_handler && table->file->ha_rnd_init_with_error(false)) + goto err; + DBUG_ASSERT(table->file->inited == handler::RND); - if (table->file->ha_rnd_pos(table->record[1],table->file->dup_ref)) - goto err; + int rnd_pos_err= table->file->ha_rnd_pos(table->record[1], + table->file->dup_ref); + + if (init_lookup_handler) + table->file->ha_rnd_end(); + if (rnd_pos_err) + goto err; } else { From cb7c99674ea861b8e4003a8a593fa6f5c6a1dd88 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 5 May 2024 16:54:50 +0200 Subject: [PATCH 32/74] sporadic failure of perfschema.func_file_io --- func_file_io.result +++ func_file_io.reject @@ -134,7 +134,7 @@ Variable_name Value Performance_schema_accounts_lost 0 Performance_schema_cond_classes_lost 0 -Performance_schema_cond_instances_lost 0 +Performance_schema_cond_instances_lost 5 Performance_schema_digest_lost 0 Performance_schema_file_classes_lost 0 Performance_schema_file_handles_lost 0 --- mysql-test/include/default_mysqld.cnf | 2 +- mysql-test/suite/perfschema/r/max_program_zero.result | 2 +- mysql-test/suite/perfschema/r/ortho_iter.result | 2 +- mysql-test/suite/perfschema/r/privilege_table_io.result | 2 +- .../suite/perfschema/r/start_server_disable_idle.result | 2 +- .../suite/perfschema/r/start_server_disable_stages.result | 2 +- .../suite/perfschema/r/start_server_disable_statements.result | 2 +- .../perfschema/r/start_server_disable_transactions.result | 2 +- .../suite/perfschema/r/start_server_disable_waits.result | 2 +- mysql-test/suite/perfschema/r/start_server_innodb.result | 2 +- mysql-test/suite/perfschema/r/start_server_low_index.result | 2 +- .../suite/perfschema/r/start_server_low_table_lock.result | 2 +- mysql-test/suite/perfschema/r/start_server_no_account.result | 2 +- .../suite/perfschema/r/start_server_no_cond_class.result | 2 +- .../suite/perfschema/r/start_server_no_file_class.result | 2 +- .../suite/perfschema/r/start_server_no_file_inst.result | 2 +- mysql-test/suite/perfschema/r/start_server_no_host.result | 2 +- mysql-test/suite/perfschema/r/start_server_no_index.result | 2 +- mysql-test/suite/perfschema/r/start_server_no_mdl.result | 2 +- .../suite/perfschema/r/start_server_no_memory_class.result | 2 +- .../suite/perfschema/r/start_server_no_mutex_class.result | 2 +- .../suite/perfschema/r/start_server_no_mutex_inst.result | 2 +- .../r/start_server_no_prepared_stmts_instances.result | 2 +- .../suite/perfschema/r/start_server_no_rwlock_class.result | 2 +- .../suite/perfschema/r/start_server_no_rwlock_inst.result | 2 +- .../suite/perfschema/r/start_server_no_setup_actors.result | 2 +- .../suite/perfschema/r/start_server_no_setup_objects.result | 2 +- .../suite/perfschema/r/start_server_no_socket_class.result | 2 +- .../suite/perfschema/r/start_server_no_socket_inst.result | 2 +- .../suite/perfschema/r/start_server_no_stage_class.result | 2 +- .../suite/perfschema/r/start_server_no_stages_history.result | 2 +- .../perfschema/r/start_server_no_stages_history_long.result | 2 +- .../suite/perfschema/r/start_server_no_statement_class.result | 2 +- .../perfschema/r/start_server_no_statements_history.result | 2 +- .../r/start_server_no_statements_history_long.result | 2 +- .../suite/perfschema/r/start_server_no_table_hdl.result | 2 +- .../suite/perfschema/r/start_server_no_table_inst.result | 2 +- .../suite/perfschema/r/start_server_no_table_lock.result | 2 +- .../suite/perfschema/r/start_server_no_thread_class.result | 2 +- .../suite/perfschema/r/start_server_no_thread_inst.result | 2 +- .../perfschema/r/start_server_no_transactions_history.result | 2 +- .../r/start_server_no_transactions_history_long.result | 2 +- mysql-test/suite/perfschema/r/start_server_no_user.result | 2 +- .../suite/perfschema/r/start_server_no_waits_history.result | 2 +- .../perfschema/r/start_server_no_waits_history_long.result | 2 +- mysql-test/suite/perfschema/r/start_server_off.result | 2 +- mysql-test/suite/perfschema/r/start_server_on.result | 2 +- mysql-test/suite/perfschema/r/start_server_variables.result | 4 ++-- .../suite/perfschema/r/statement_program_lost_inst.result | 2 +- 49 files changed, 50 insertions(+), 50 deletions(-) diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 40bf19ac922..1f80cb3910c 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -72,7 +72,7 @@ loose-performance-schema-hosts-size=100 loose-performance-schema-users-size=100 loose-performance-schema-max-mutex-instances=5000 loose-performance-schema-max-rwlock-instances=5000 -loose-performance-schema-max-cond-instances=1000 +loose-performance-schema-max-cond-instances=1500 loose-performance-schema-max-file-instances=10000 loose-performance-schema-max-socket-instances=1000 loose-performance-schema-max-table-instances=500 diff --git a/mysql-test/suite/perfschema/r/max_program_zero.result b/mysql-test/suite/perfschema/r/max_program_zero.result index d2e4526d307..99a63b5f848 100644 --- a/mysql-test/suite/perfschema/r/max_program_zero.result +++ b/mysql-test/suite/perfschema/r/max_program_zero.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result index 2dacee0ac27..4eee062244a 100644 --- a/mysql-test/suite/perfschema/r/ortho_iter.result +++ b/mysql-test/suite/perfschema/r/ortho_iter.result @@ -237,7 +237,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result index 2b40cdec14b..de9a118f726 100644 --- a/mysql-test/suite/perfschema/r/privilege_table_io.result +++ b/mysql-test/suite/perfschema/r/privilege_table_io.result @@ -39,7 +39,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result index 8b609de4534..acebfc567af 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result index b31430eada3..a5f3032c58b 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result index c37509c98ab..c4a21b3e69d 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result index 7fa2125b20e..4e5979f7b37 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result index b6bb1a989ac..7512fc823ff 100644 --- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result +++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result index 8cad1f4d414..07f11f49e8d 100644 --- a/mysql-test/suite/perfschema/r/start_server_innodb.result +++ b/mysql-test/suite/perfschema/r/start_server_innodb.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_low_index.result b/mysql-test/suite/perfschema/r/start_server_low_index.result index 54441252db2..8bb591704cc 100644 --- a/mysql-test/suite/perfschema/r/start_server_low_index.result +++ b/mysql-test/suite/perfschema/r/start_server_low_index.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result index 9164fe18775..65375d3e03f 100644 --- a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result +++ b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result index 9ec22e633d1..e963ec11355 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_account.result +++ b/mysql-test/suite/perfschema/r/start_server_no_account.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result index e554b1e9aa4..e12c4fa066c 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 0 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result index f5367f17973..18e88b131c8 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 0 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result index e9db05a1364..1fa0ac8cb1e 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result index 8298ca3a828..c524120d846 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_host.result +++ b/mysql-test/suite/perfschema/r/start_server_no_host.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 0 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_index.result b/mysql-test/suite/perfschema/r/start_server_no_index.result index 50c693e4489..e8fe0ceb637 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_index.result +++ b/mysql-test/suite/perfschema/r/start_server_no_index.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mdl.result b/mysql-test/suite/perfschema/r/start_server_no_mdl.result index a495471f994..4b2298a94df 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mdl.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mdl.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result index a598db77dc9..69b8f0d9325 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result index cc72db98662..20dde61d564 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result index ee1507c8c59..c07e305aad9 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result index 4b779b919df..c9944f81c99 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result +++ b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result index 4c480f75b3b..048b34b9c41 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result index d0f76f6a8a3..8093234616f 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result index 43e98074842..04f90453d0f 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result +++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result index b8c5e26d6cc..12aa77ff460 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result +++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result index de55a7ff938..55853d6ea39 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result index 57f7a5a3647..d5f8457561a 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result index fdefd3ad1f7..51c8b9a1991 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result index ac0355c51c6..a99f89671d6 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result index dd8fc35984e..da165c2b7fe 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result index 49fdd561ad9..0297ba27546 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result index 612b305f6e6..b4eb2041253 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result index 92a654bdab4..f732163b8e2 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result index b7204361047..8db0883d5b2 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result +++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result index 943e1e92dc2..da235f9bccb 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result index 4996016b4af..6b83569ee94 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result +++ b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result index 374d3bb400b..357478b3d6a 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result index abedd06c0d9..f4ceb286254 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result index 0ce961296bb..3e37684e906 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result index 4b92d21150d..ef8f9402a73 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result index 2ac41042d03..76dd9bf1379 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_user.result +++ b/mysql-test/suite/perfschema/r/start_server_no_user.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result index 570900fca79..1f66e481be2 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result +++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 0 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result index dbcd2100141..d7df9216869 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result +++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 0 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result index f9de9146a13..74fd53fcf4a 100644 --- a/mysql-test/suite/perfschema/r/start_server_off.result +++ b/mysql-test/suite/perfschema/r/start_server_off.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result index 8cad1f4d414..07f11f49e8d 100644 --- a/mysql-test/suite/perfschema/r/start_server_on.result +++ b/mysql-test/suite/perfschema/r/start_server_on.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 diff --git a/mysql-test/suite/perfschema/r/start_server_variables.result b/mysql-test/suite/perfschema/r/start_server_variables.result index f7f44904660..160b648022e 100644 --- a/mysql-test/suite/perfschema/r/start_server_variables.result +++ b/mysql-test/suite/perfschema/r/start_server_variables.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 @@ -164,7 +164,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 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 264be0ede45..0c599c95516 100644 --- a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result +++ b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result @@ -116,7 +116,7 @@ performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 performance_schema_max_cond_classes 90 -performance_schema_max_cond_instances 1000 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 80 performance_schema_max_file_handles 32768 From cea083af9fc099551a34207dac9206181a1ca899 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 24 Apr 2024 22:08:52 +0200 Subject: [PATCH 33/74] cleanup: use THD_STAGE_INFO, not thd_proc_info and put master-slave.inc *last* in the series of includes --- mysql-test/suite/rpl/t/rpl_parallel_sbm.test | 2 +- sql/rpl_rli.cc | 2 -- sql/rpl_rli.h | 7 +------ sql/slave.cc | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test index 9c502ff6cb9..3bf39b47f69 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test @@ -1,9 +1,9 @@ # # Ensure that Seconds_Behind_Master works correctly on the parallel replica. # ---source include/master-slave.inc --source include/have_log_bin.inc --source include/have_debug.inc +--source include/master-slave.inc --echo # --echo # MDEV-29639: Seconds_Behind_Master is incorrect for Delayed, Parallel Replicas diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 4352cdcf494..efcbd29ef39 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -44,8 +44,6 @@ rpl_slave_state *rpl_global_gtid_slave_state; /* Object used for MASTER_GTID_WAIT(). */ gtid_waiting rpl_global_gtid_waiting; -const char *const Relay_log_info::state_delaying_string = "Waiting until MASTER_DELAY seconds after master executed event"; - Relay_log_info::Relay_log_info(bool is_slave_recovery, const char* thread_name) :Slave_reporting_capability(thread_name), replicate_same_server_id(::replicate_same_server_id), diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 46eacf3411a..ec93f76432b 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -506,11 +506,6 @@ public: m_flags&= ~flag; } - /** - Text used in THD::proc_info when the slave SQL thread is delaying. - */ - static const char *const state_delaying_string; - bool flush(); /** @@ -533,7 +528,7 @@ public: { mysql_mutex_assert_owner(&data_lock); sql_delay_end= delay_end; - thd_proc_info(sql_driver_thd, state_delaying_string); + THD_STAGE_INFO(sql_driver_thd, stage_sql_thd_waiting_until_delay); } int32 get_sql_delay() { return sql_delay; } diff --git a/sql/slave.cc b/sql/slave.cc index 5948d11825d..66b42cabcd4 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3324,7 +3324,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full, // to ensure that we use the same value throughout this function. const char *slave_sql_running_state= mi->rli.sql_driver_thd ? mi->rli.sql_driver_thd->proc_info : ""; - if (slave_sql_running_state == Relay_log_info::state_delaying_string) + if (slave_sql_running_state == stage_sql_thd_waiting_until_delay.m_name) { time_t t= my_time(0), sql_delay_end= mi->rli.get_sql_delay_end(); protocol->store((uint32)(t < sql_delay_end ? sql_delay_end - t : 0)); From 7a789e2027778ef1a5f0657b29181aa1f6cfdc87 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 25 Apr 2024 12:47:23 +0200 Subject: [PATCH 34/74] sporadic failures of rpl.rpl_parallel_sbm the test waits for the event to get stuck on MASTER_DELAY, but on a slow/overloaded slave the event might pass MASTER_DELAY before the test starts waiting. Wait for the event to get stuck on the LOCK TABLES (after MASTER_DELAY), the event cannot avoid that, --- mysql-test/suite/rpl/r/rpl_parallel_sbm.result | 2 +- mysql-test/suite/rpl/t/rpl_parallel_sbm.test | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_parallel_sbm.result b/mysql-test/suite/rpl/r/rpl_parallel_sbm.result index e349353ac59..75012c93f3b 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_sbm.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_sbm.result @@ -34,7 +34,7 @@ connection server_2; LOCK TABLES t1 WRITE; include/start_slave.inc connection slave; -# Waiting for replica to resume the delay for the transaction +# Waiting for replica to get blocked by the table lock # Sleeping 1s to increment SBM # Ensuring Seconds_Behind_Master increases after sleeping.. # ..done diff --git a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test index 3bf39b47f69..90753caf143 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test @@ -77,8 +77,8 @@ LOCK TABLES t1 WRITE; --source include/start_slave.inc --connection slave ---echo # Waiting for replica to resume the delay for the transaction ---let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting until MASTER_DELAY seconds after master executed event'; +--echo # Waiting for replica to get blocked by the table lock +--let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting for table metadata lock'; --source include/wait_condition.inc --echo # Sleeping 1s to increment SBM From 03295f0c20ddf49c655ebe4684f8db4b448896e8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 5 May 2024 17:13:20 +0200 Subject: [PATCH 35/74] MDEV-30727 Check spider_hton_ptr in spider udfs UDF isn't supposed to use my_error(), it should return the error message in the provided error message buffer Fixes valgrind: ==93993== Conditional jump or move depends on uninitialised value(s) ==93993== at 0x484ECCD: strnlen (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==93993== by 0x1AD2B2C: process_str_arg (my_vsnprintf.c:259) ==93993== by 0x1AD47E0: my_vsnprintf_ex (my_vsnprintf.c:696) ==93993== by 0x1A3B91E: my_error (my_error.c:120) ==93993== by 0xF87BE8: udf_handler::fix_fields(THD*, Item_func_or_sum*, unsigned int, Item**) (item_func.cc:3638) followup for 267dd5a993d5 --- storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result | 6 +++--- storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test | 6 +++--- storage/spider/spd_copy_tables.cc | 5 +---- storage/spider/spd_direct_sql.cc | 5 +---- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result index ce8ebdc3966..79a383feb83 100644 --- a/storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result @@ -1,12 +1,12 @@ CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.so'; SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"'); -ERROR HY000: Plugin 'SPIDER' is not loaded +ERROR HY000: Can't initialize function 'spider_direct_sql'; Plugin 'SPIDER' is not loaded CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so'; SELECT spider_bg_direct_sql ('SELECT * FROM s','a','srv "b"'); -ERROR HY000: Plugin 'SPIDER' is not loaded +ERROR HY000: Can't initialize function 'spider_bg_direct_sql'; Plugin 'SPIDER' is not loaded CREATE FUNCTION spider_copy_tables RETURNS INT SONAME 'ha_spider.so'; SELECT spider_copy_tables ('t', '0', '0'); -ERROR HY000: Plugin 'SPIDER' is not loaded +ERROR HY000: Can't initialize function 'spider_copy_tables'; Plugin 'SPIDER' is not loaded CREATE FUNCTION spider_flush_table_mon_cache RETURNS INT SONAME 'ha_spider.so'; SELECT spider_flush_table_mon_cache (); spider_flush_table_mon_cache () diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test index e1d917e7147..ebd08edce24 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test @@ -1,13 +1,13 @@ CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.so'; ---error ER_PLUGIN_IS_NOT_LOADED +--error ER_CANT_INITIALIZE_UDF SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"'); CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so'; ---error ER_PLUGIN_IS_NOT_LOADED +--error ER_CANT_INITIALIZE_UDF SELECT spider_bg_direct_sql ('SELECT * FROM s','a','srv "b"'); CREATE FUNCTION spider_copy_tables RETURNS INT SONAME 'ha_spider.so'; ---error ER_PLUGIN_IS_NOT_LOADED +--error ER_CANT_INITIALIZE_UDF SELECT spider_copy_tables ('t', '0', '0'); # spider_flush_table_mon_cache does not require spider init to function diff --git a/storage/spider/spd_copy_tables.cc b/storage/spider/spd_copy_tables.cc index 1783fe7374b..524ad7dd9e9 100644 --- a/storage/spider/spd_copy_tables.cc +++ b/storage/spider/spd_copy_tables.cc @@ -1154,9 +1154,6 @@ error: DBUG_RETURN(0); } -#undef my_error -extern "C" void my_error(unsigned int nr, unsigned long MyFlags, ...); - my_bool spider_copy_tables_init_body( UDF_INIT *initid, UDF_ARGS *args, @@ -1165,7 +1162,7 @@ my_bool spider_copy_tables_init_body( DBUG_ENTER("spider_copy_tables_init_body"); if (!spider_hton_ptr) { - my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), "SPIDER"); + strcpy(message, "Plugin 'SPIDER' is not loaded"); goto error; } if (args->arg_count != 3 && args->arg_count != 4) diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc index 4f6bc0a4405..524e8b7443a 100644 --- a/storage/spider/spd_direct_sql.cc +++ b/storage/spider/spd_direct_sql.cc @@ -1789,9 +1789,6 @@ error: DBUG_RETURN(0); } -#undef my_error -extern "C" void my_error(unsigned int nr, unsigned long MyFlags, ...); - my_bool spider_direct_sql_init_body( UDF_INIT *initid, UDF_ARGS *args, @@ -1802,7 +1799,7 @@ my_bool spider_direct_sql_init_body( DBUG_ENTER("spider_direct_sql_init_body"); if (!spider_hton_ptr) { - my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), "SPIDER"); + strcpy(message, "Plugin 'SPIDER' is not loaded"); goto error; } if (args->arg_count != 3) From d74fee9e8c9542ee884bb14e5bee98a75c226bbb Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 5 May 2024 17:02:09 +0200 Subject: [PATCH 36/74] MDEV-19487 fix for --view followup for d7df63e1c922 --- mysql-test/main/func_json.result | 4 ++-- mysql-test/main/func_json.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index 8d90a6ec726..591e8813a0f 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -1705,8 +1705,8 @@ DROP TABLE t; # # MDEV-19487: JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER" # -SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')); -JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')) +SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')) as x; +x NULL Warnings: Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5 diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 1b55dcb149e..9f08c30f7cf 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -1137,7 +1137,7 @@ DROP TABLE t; --echo # MDEV-19487: JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER" --echo # -SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')); +SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')) as x; --echo # From df6899b30bc12d5b3c1e0a11cef64c57fc196eda Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 3 May 2024 16:21:41 +0200 Subject: [PATCH 37/74] bugfix: mysqld --safe-mode crashes --- mysql-test/suite/parts/t/partition_recover_myisam-master.opt | 2 +- sql/mysqld.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/parts/t/partition_recover_myisam-master.opt b/mysql-test/suite/parts/t/partition_recover_myisam-master.opt index ddbd7a0a8c5..ca3d0cddc18 100644 --- a/mysql-test/suite/parts/t/partition_recover_myisam-master.opt +++ b/mysql-test/suite/parts/t/partition_recover_myisam-master.opt @@ -1 +1 @@ ---myisam-recover-options +--safe-mode diff --git a/sql/mysqld.cc b/sql/mysqld.cc index be75dd9fc66..9a17a002cc8 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8241,7 +8241,7 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument, case (int) OPT_SAFE: opt_specialflag|= SPECIAL_SAFE_MODE | SPECIAL_NO_NEW_FUNC; SYSVAR_AUTOSIZE(delay_key_write_options, (uint) DELAY_KEY_WRITE_NONE); - SYSVAR_AUTOSIZE(myisam_recover_options, HA_RECOVER_DEFAULT); + myisam_recover_options= HA_RECOVER_DEFAULT; ha_open_options&= ~(HA_OPEN_DELAY_KEY_WRITE); #ifdef HAVE_QUERY_CACHE SYSVAR_AUTOSIZE(query_cache_size, 0); From 349ca2be7437ccc45a565edd954d7b2f78f519d8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 29 Apr 2024 15:59:13 +0200 Subject: [PATCH 38/74] mtr: remove innodb combinations dead code for about 10 years --- mysql-test/include/have_innodb.combinations | 39 ------------------- mysql-test/include/have_innodb.opt | 17 ++++++++ ...rdiff => innodb_ext_key,covering,on.rdiff} | 0 ...ff => innodb_ext_key,on,unoptimized.rdiff} | 0 mysql-test/suite.pm | 9 +---- .../include/innodb_merge_threshold_delete.inc | 3 -- .../innodb_merge_threshold_secondary.inc | 3 -- .../include/innodb_merge_threshold_update.inc | 3 -- ...diff => max_record_size,16k,compact.rdiff} | 0 ...diff => max_record_size,16k,dynamic.rdiff} | 0 ...ff => max_record_size,16k,redundant.rdiff} | 0 ...diff => max_record_size,32k,compact.rdiff} | 0 ...diff => max_record_size,32k,dynamic.rdiff} | 0 ...ff => max_record_size,32k,redundant.rdiff} | 0 ...rdiff => max_record_size,4k,compact.rdiff} | 0 ...rdiff => max_record_size,4k,dynamic.rdiff} | 0 ...iff => max_record_size,4k,redundant.rdiff} | 0 ...diff => max_record_size,64k,compact.rdiff} | 0 ...diff => max_record_size,64k,dynamic.rdiff} | 0 ...ff => max_record_size,64k,redundant.rdiff} | 0 ...rdiff => max_record_size,8k,compact.rdiff} | 0 ...rdiff => max_record_size,8k,dynamic.rdiff} | 0 ...art,16k,innodb.rdiff => restart,16k.rdiff} | 0 ...art,32k,innodb.rdiff => restart,32k.rdiff} | 0 ...start,4k,innodb.rdiff => restart,4k.rdiff} | 0 ...art,64k,innodb.rdiff => restart,64k.rdiff} | 0 ...start,8k,innodb.rdiff => restart,8k.rdiff} | 0 .../suite/innodb/t/index_merge_threshold.test | 1 + 28 files changed, 19 insertions(+), 56 deletions(-) delete mode 100644 mysql-test/include/have_innodb.combinations create mode 100644 mysql-test/include/have_innodb.opt rename mysql-test/main/{innodb_ext_key,covering,innodb,on.rdiff => innodb_ext_key,covering,on.rdiff} (100%) rename mysql-test/main/{innodb_ext_key,innodb,on,unoptimized.rdiff => innodb_ext_key,on,unoptimized.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,16k,compact,innodb.rdiff => max_record_size,16k,compact.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,16k,dynamic,innodb.rdiff => max_record_size,16k,dynamic.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,16k,innodb,redundant.rdiff => max_record_size,16k,redundant.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,32k,compact,innodb.rdiff => max_record_size,32k,compact.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,32k,dynamic,innodb.rdiff => max_record_size,32k,dynamic.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,32k,innodb,redundant.rdiff => max_record_size,32k,redundant.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,4k,compact,innodb.rdiff => max_record_size,4k,compact.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,4k,dynamic,innodb.rdiff => max_record_size,4k,dynamic.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,4k,innodb,redundant.rdiff => max_record_size,4k,redundant.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,64k,compact,innodb.rdiff => max_record_size,64k,compact.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,64k,dynamic,innodb.rdiff => max_record_size,64k,dynamic.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,64k,innodb,redundant.rdiff => max_record_size,64k,redundant.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,8k,compact,innodb.rdiff => max_record_size,8k,compact.rdiff} (100%) rename mysql-test/suite/innodb/r/{max_record_size,8k,dynamic,innodb.rdiff => max_record_size,8k,dynamic.rdiff} (100%) rename mysql-test/suite/innodb/r/{restart,16k,innodb.rdiff => restart,16k.rdiff} (100%) rename mysql-test/suite/innodb/r/{restart,32k,innodb.rdiff => restart,32k.rdiff} (100%) rename mysql-test/suite/innodb/r/{restart,4k,innodb.rdiff => restart,4k.rdiff} (100%) rename mysql-test/suite/innodb/r/{restart,64k,innodb.rdiff => restart,64k.rdiff} (100%) rename mysql-test/suite/innodb/r/{restart,8k,innodb.rdiff => restart,8k.rdiff} (100%) diff --git a/mysql-test/include/have_innodb.combinations b/mysql-test/include/have_innodb.combinations deleted file mode 100644 index f1131c448f3..00000000000 --- a/mysql-test/include/have_innodb.combinations +++ /dev/null @@ -1,39 +0,0 @@ -[innodb_plugin] -ignore-builtin-innodb -plugin-load-add=$HA_INNODB_SO -innodb -innodb-cmpmem -innodb-cmp-per-index -innodb-trx -innodb-locks -innodb-lock-waits -innodb-buffer-pool-stats -innodb-buffer-page -innodb-buffer-page-lru -innodb-sys-columns -innodb-sys-fields -innodb-sys-foreign -innodb-sys-foreign-cols -innodb-sys-indexes -innodb-sys-tables -innodb-sys-virtual -innodb-metrics - -[innodb] -innodb -innodb-cmpmem -innodb-cmp-per-index -innodb-trx -innodb-locks -innodb-lock-waits -innodb-metrics -innodb-buffer-pool-stats -innodb-buffer-page -innodb-buffer-page-lru -innodb-sys-columns -innodb-sys-fields -innodb-sys-foreign -innodb-sys-foreign-cols -innodb-sys-indexes -innodb-sys-tables -innodb-sys-virtual diff --git a/mysql-test/include/have_innodb.opt b/mysql-test/include/have_innodb.opt new file mode 100644 index 00000000000..0a6d4d9c819 --- /dev/null +++ b/mysql-test/include/have_innodb.opt @@ -0,0 +1,17 @@ +--innodb +--innodb-cmpmem +--innodb-cmp-per-index +--innodb-trx +--innodb-locks +--innodb-lock-waits +--innodb-metrics +--innodb-buffer-pool-stats +--innodb-buffer-page +--innodb-buffer-page-lru +--innodb-sys-columns +--innodb-sys-fields +--innodb-sys-foreign +--innodb-sys-foreign-cols +--innodb-sys-indexes +--innodb-sys-tables +--innodb-sys-virtual diff --git a/mysql-test/main/innodb_ext_key,covering,innodb,on.rdiff b/mysql-test/main/innodb_ext_key,covering,on.rdiff similarity index 100% rename from mysql-test/main/innodb_ext_key,covering,innodb,on.rdiff rename to mysql-test/main/innodb_ext_key,covering,on.rdiff diff --git a/mysql-test/main/innodb_ext_key,innodb,on,unoptimized.rdiff b/mysql-test/main/innodb_ext_key,on,unoptimized.rdiff similarity index 100% rename from mysql-test/main/innodb_ext_key,innodb,on,unoptimized.rdiff rename to mysql-test/main/innodb_ext_key,on,unoptimized.rdiff diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index 5100b4137a2..d5c4855ce6e 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -4,14 +4,7 @@ use My::Platform; @ISA = qw(My::Suite); sub skip_combinations { - my @combinations; - - # disable innodb combinations for configurations that were not built - push @combinations, 'innodb_plugin' unless $ENV{HA_INNODB_SO}; - - push @combinations, 'innodb' unless $::mysqld_variables{'innodb'} eq "ON"; - - my %skip = ( 'include/have_innodb.combinations' => [ @combinations ]); + my %skip; $skip{'include/innodb_encrypt_log.combinations'} = [ 'crypt' ] unless $ENV{DEBUG_KEY_MANAGEMENT_SO}; diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc index 8c60cd6e230..7d7188aa463 100644 --- a/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc +++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc @@ -5,9 +5,6 @@ # "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;" # ---source include/have_innodb.inc ---source include/have_innodb_16k.inc - # turn on flags --disable_query_log SET GLOBAL innodb_monitor_enable=index_page_merge_attempts; diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc index 8e821365e3f..1d3aca87af6 100644 --- a/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc +++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc @@ -6,9 +6,6 @@ # "create index index1 on tab1(b(750));" # ---source include/have_innodb.inc ---source include/have_innodb_16k.inc - # turn on flags --disable_query_log SET GLOBAL innodb_monitor_enable=index_page_merge_attempts; diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc index 61e961ac6ae..f91a796d161 100644 --- a/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc +++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc @@ -5,9 +5,6 @@ # "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;" # ---source include/have_innodb.inc ---source include/have_innodb_16k.inc - # turn on flags --disable_query_log SET GLOBAL innodb_monitor_enable=index_page_merge_attempts; diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff rename to mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff rename to mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff rename to mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff rename to mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff rename to mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff diff --git a/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,16k.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/restart,16k,innodb.rdiff rename to mysql-test/suite/innodb/r/restart,16k.rdiff diff --git a/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,32k.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/restart,32k,innodb.rdiff rename to mysql-test/suite/innodb/r/restart,32k.rdiff diff --git a/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,4k.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/restart,4k,innodb.rdiff rename to mysql-test/suite/innodb/r/restart,4k.rdiff diff --git a/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,64k.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/restart,64k,innodb.rdiff rename to mysql-test/suite/innodb/r/restart,64k.rdiff diff --git a/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,8k.rdiff similarity index 100% rename from mysql-test/suite/innodb/r/restart,8k,innodb.rdiff rename to mysql-test/suite/innodb/r/restart,8k.rdiff diff --git a/mysql-test/suite/innodb/t/index_merge_threshold.test b/mysql-test/suite/innodb/t/index_merge_threshold.test index a587e10db6c..23ad81f79a9 100644 --- a/mysql-test/suite/innodb/t/index_merge_threshold.test +++ b/mysql-test/suite/innodb/t/index_merge_threshold.test @@ -10,6 +10,7 @@ # # Check actual behavior for table, partitioned table and temporary table # ############################################################# +--source include/have_innodb.inc --source include/have_innodb_16k.inc --source include/have_partition.inc From 983e6ca0974805ba655fe4305dcfb4512d738494 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 4 May 2024 21:02:53 +0200 Subject: [PATCH 39/74] bugfix: buffer overwrite in mariadb-backup this fixes galera.galera_sst_mariabackup_table_options Note that `man snprintf` says The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte ('\0')). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. --- extra/mariabackup/backup_mysql.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index 862f8b46a3a..1c425626f8f 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -66,7 +66,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA #include "page0zip.h" char *tool_name; -char tool_args[2048]; +char tool_args[8192]; /* mysql flavor and version */ mysql_flavor_t server_flavor = FLAVOR_UNKNOWN; @@ -1937,9 +1937,11 @@ char *make_argv(char *buf, size_t len, int argc, char **argv) if (strncmp(*argv, "--password", strlen("--password")) == 0) { arg = "--password=..."; } - left-= snprintf(buf + len - left, left, + uint l= snprintf(buf + len - left, left, "%s%c", arg, argc > 1 ? ' ' : 0); ++argv; --argc; + if (l < left) + left-= l; } return buf; From cd0356a764d5cad5bb64479adb1a646283314f3c Mon Sep 17 00:00:00 2001 From: Monty Date: Sat, 27 Apr 2024 13:35:48 +0300 Subject: [PATCH 40/74] MDEV-34077 scripts/mariadb-install-db: Error in my_thread_global_end(): 1 threads didn't exit followup for 952ab9a5965 chery-pick of 814dc46748d8 into 10.5 --- include/my_sys.h | 2 +- mysys/my_thr_init.c | 8 +++++--- sql/mysqld.cc | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/my_sys.h b/include/my_sys.h index 170794522e7..74231be6746 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -147,7 +147,7 @@ char *guess_malloc_library(); void sf_report_leaked_memory(my_thread_id id); int sf_sanity(); extern my_thread_id (*sf_malloc_dbug_id)(void); -#define SAFEMALLOC_REPORT_MEMORY(X) sf_report_leaked_memory(X) +#define SAFEMALLOC_REPORT_MEMORY(X) if (!sf_leaking_memory) sf_report_leaked_memory(X) #else #define SAFEMALLOC_REPORT_MEMORY(X) do {} while(0) #endif diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index d9f0e41de8d..a10957bdbb0 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -220,7 +220,11 @@ void my_thread_global_end(void) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); -#endif +#endif /* HAVE_PTHREAD_KILL */ +#ifdef SAFEMALLOC + /* We know we will have memoryleaks, suppress the leak report */ + sf_leaking_memory= 1; +#endif /* SAFEMALLOC */ all_threads_killed= 0; break; } @@ -234,9 +238,7 @@ void my_thread_global_end(void) that could use them. */ if (all_threads_killed) - { my_thread_destroy_internal_mutex(); - } my_thread_global_init_done= 0; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9a17a002cc8..93afee25dcf 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1927,6 +1927,7 @@ extern "C" void unireg_abort(int exit_code) wsrep_sst_auth_free(); #endif // WITH_WSREP + wait_for_signal_thread_to_end(); clean_up(!opt_abort && (exit_code || !opt_bootstrap)); /* purecov: inspected */ DBUG_PRINT("quit",("done with cleanup in unireg_abort")); mysqld_exit(exit_code); From 91fb8b7fd3224767fe7eb81e82f5ec0926751420 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 29 Apr 2024 22:41:07 +0200 Subject: [PATCH 41/74] MDEV-19949 mariabackup option of '--password' or '-p' without specifying password in commandline password handling as in other command-line tools --- extra/mariabackup/xtrabackup.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index fcea942cd3e..90ccd693347 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -370,6 +370,7 @@ my_bool opt_no_backup_locks = FALSE; my_bool opt_decompress = FALSE; my_bool opt_remove_original; my_bool opt_log_innodb_page_corruption; +my_bool tty_password= FALSE; my_bool opt_lock_ddl_per_table = FALSE; static my_bool opt_check_privileges; @@ -1367,7 +1368,7 @@ struct my_option xb_client_options[]= { "This option specifies the password to use " "when connecting to the database. It accepts a string argument. " "See mysql --help for details.", - 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"protocol", OPT_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).", 0, 0, @@ -2043,6 +2044,7 @@ xb_get_one_option(const struct my_option *opt, break; case 'p': opt_password = argument; + tty_password = argument == NULL; break; case OPT_PROTOCOL: if (argument) @@ -6749,6 +6751,8 @@ void handle_options(int argc, char **argv, char ***argv_server, if (*start) start[1]= 0; } + else if (tty_password) + opt_password= my_get_tty_password(NullS); /* 4) Process --mysqld-args options, ignore unknown options */ From 947eeaa6dc780c55e5cb731a83a02f2e34107499 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 May 2024 09:55:59 +0200 Subject: [PATCH 42/74] MDEV-29345 update case insensitive (large) unique key with insensitive change of value - duplicate key use collation-sensitive comparison when comparing fields --- mysql-test/main/long_unique_bugs.result | 24 +++++++++++++++++++++++- mysql-test/main/long_unique_bugs.test | 17 ++++++++++++++++- sql/handler.cc | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index b01a0dd2256..afa14310153 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -694,5 +694,27 @@ Hrecvx_0004ln-00 1 Hrecvx_0004mm-00 2 drop table t; # -# End of 10.5 tests +# MDEV-29345 update case insensitive (large) unique key with insensitive change of value - duplicate key # +create table t1 (a int, b text, unique (b)); +insert ignore t1 values (1, 'a'), (2, 'A'); +Warnings: +Warning 1062 Duplicate entry 'A' for key 'b' +select * from t1; +a b +1 a +update t1 set b='A' where a=1; +select * from t1; +a b +1 A +drop table t1; +create table t1 (a int, b blob, unique (b)); +insert t1 values (1, 'a'), (2, 'A'); +select * from t1; +a b +1 a +2 A +update t1 set b='A' where a=1; +ERROR 23000: Duplicate entry 'A' for key 'b' +drop table t1; +# End of 10.5 tests diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index 3c2ab4d70f5..e7f8825ab97 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -671,5 +671,20 @@ insert into t values ('Hrecvx_0004mm-00',2) select * from t; drop table t; --echo # ---echo # End of 10.5 tests +--echo # MDEV-29345 update case insensitive (large) unique key with insensitive change of value - duplicate key --echo # +create table t1 (a int, b text, unique (b)); +insert ignore t1 values (1, 'a'), (2, 'A'); +select * from t1; +update t1 set b='A' where a=1; +select * from t1; +drop table t1; + +create table t1 (a int, b blob, unique (b)); +insert t1 values (1, 'a'), (2, 'A'); +select * from t1; +--error ER_DUP_ENTRY +update t1 set b='A' where a=1; +drop table t1; + +--echo # End of 10.5 tests diff --git a/sql/handler.cc b/sql/handler.cc index e2fe80a260d..93baef92267 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -7082,7 +7082,7 @@ int handler::check_duplicate_long_entries_update(const uchar *new_rec) So also check for that too */ if((field->is_null(0) != field->is_null(reclength)) || - field->cmp_binary_offset(reclength)) + field->cmp_offset(reclength)) { if((error= check_duplicate_long_entry_key(new_rec, i))) return error; From 4f5dea43df22dbf6dffb6694aa0fe23a6da98983 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 26 Apr 2024 16:27:29 +0200 Subject: [PATCH 43/74] cleanup * remove dead code * simplify the check for table->s->next_number_index * misc --- mysql-test/main/information_schema2.result | 7 + mysql-test/main/information_schema2.test | 14 +- mysql-test/main/innodb_ext_key,off.rdiff | 6 +- mysql-test/main/innodb_ext_key.result | 28 +- mysql-test/main/innodb_ext_key.test | 28 +- mysql-test/main/long_unique_bugs.test | 2 - mysql-test/main/myisam.result | 2 - mysql-test/main/myisam.test | 6 - mysql-test/main/trigger.result | 6 - mysql-test/main/trigger.test | 9 - .../suite/galera/r/galera_load_data.result | 303 ++++++++++++++++- .../suite/galera/t/galera_load_data.test | 304 +++++++++++++++++- mysql-test/suite/parts/r/alter_table.result | 11 + .../parts/r/partition_recover_myisam.result | 3 + mysql-test/suite/parts/t/alter_table.test | 24 +- ...aster.opt => partition_recover_myisam.opt} | 0 .../parts/t/partition_recover_myisam.test | 8 - sql/handler.cc | 6 +- sql/sql_insert.cc | 2 +- sql/table.cc | 4 +- storage/myisam/mi_extra.c | 45 --- 21 files changed, 683 insertions(+), 135 deletions(-) rename mysql-test/suite/parts/t/{partition_recover_myisam-master.opt => partition_recover_myisam.opt} (100%) diff --git a/mysql-test/main/information_schema2.result b/mysql-test/main/information_schema2.result index e23e81b885c..75217cf58bd 100644 --- a/mysql-test/main/information_schema2.result +++ b/mysql-test/main/information_schema2.result @@ -1,3 +1,6 @@ +# +# MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling +# select variable_name from information_schema.session_status where variable_name = (select variable_name from information_schema.session_status where variable_name = 'uptime'); variable_name @@ -6,6 +9,9 @@ select variable_name from information_schema.session_variables where variable_na (select variable_name from information_schema.session_variables where variable_name = 'basedir'); variable_name BASEDIR +# +# MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows +# create table t1 (x int); create table t2 (x int); create table t3 (x int); @@ -18,3 +24,4 @@ t2 t3 t4 drop table t1, t2, t3, t4; +# End of 5.5 tests diff --git a/mysql-test/main/information_schema2.test b/mysql-test/main/information_schema2.test index d2fa3da2b5f..bd9350a3031 100644 --- a/mysql-test/main/information_schema2.test +++ b/mysql-test/main/information_schema2.test @@ -1,15 +1,15 @@ -# -# MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling -# +--echo # +--echo # MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling +--echo # select variable_name from information_schema.session_status where variable_name = (select variable_name from information_schema.session_status where variable_name = 'uptime'); select variable_name from information_schema.session_variables where variable_name = (select variable_name from information_schema.session_variables where variable_name = 'basedir'); -# -# MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows -# +--echo # +--echo # MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows +--echo # create table t1 (x int); create table t2 (x int); create table t3 (x int); @@ -17,3 +17,5 @@ create table t4 AS select table_name from information_schema.TABLES where table_ delete from t4 where table_name not in (select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE'); select * from t4 order by table_name; drop table t1, t2, t3, t4; + +--echo # End of 5.5 tests diff --git a/mysql-test/main/innodb_ext_key,off.rdiff b/mysql-test/main/innodb_ext_key,off.rdiff index 8061d87990b..0eb123fcfcf 100644 --- a/mysql-test/main/innodb_ext_key,off.rdiff +++ b/mysql-test/main/innodb_ext_key,off.rdiff @@ -163,7 +163,7 @@ where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000 @@ -220,12 +220,12 @@ 5959 3 - show status like 'handler_read_next'; + show /*a*/ status like 'handler_read_next'; Variable_name Value -Handler_read_next 3 +Handler_read_next 9 @@ -177,7 +177,7 @@ select max(l_orderkey) from lineitem where l_partkey between 1 and 10 group by l_partkey; @@ -243,9 +243,9 @@ - show status like 'handler_read%'; + show /*b*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 -Handler_read_key 21 @@ -199,7 +199,7 @@ select max(l_orderkey) from lineitem where l_suppkey in (1,4) group by l_suppkey; @@ -265,9 +265,9 @@ - show status like 'handler_read%'; + show /*c*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 -Handler_read_key 6 diff --git a/mysql-test/main/innodb_ext_key.result b/mysql-test/main/innodb_ext_key.result index 6d5c1885110..f436b554fb8 100644 --- a/mysql-test/main/innodb_ext_key.result +++ b/mysql-test/main/innodb_ext_key.result @@ -14,7 +14,7 @@ flush status; select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; count(*) 1 -show status like 'handler_read%'; +show /*1*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 @@ -35,7 +35,7 @@ select count(*) from lineitem use index(primary) where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01'; count(*) 1 -show status like 'handler_read%'; +show /*2*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 @@ -56,7 +56,7 @@ select count(*) from lineitem where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000; count(*) 1 -show status like 'handler_read%'; +show /*3*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 @@ -79,7 +79,7 @@ l_orderkey l_linenumber 1088 3 1217 1 1221 3 -show status like 'handler_read%'; +show /*4*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 @@ -98,7 +98,7 @@ flush status; select min(l_orderkey) from lineitem where l_shipdate='1992-07-01'; min(l_orderkey) 130 -show status like 'handler_read%'; +show /*5*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 @@ -119,7 +119,7 @@ select min(l_orderkey) from lineitem where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000; min(l_orderkey) 1088 -show status like 'handler_read%'; +show /*6*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 @@ -140,7 +140,7 @@ select max(l_linenumber) from lineitem where l_shipdate='1992-07-01' and l_orderkey=130; max(l_linenumber) 2 -show status like 'handler_read%'; +show /*7*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 @@ -166,7 +166,7 @@ or l_receiptdate='1992-07-01' and l_orderkey=5603; l_orderkey l_linenumber 130 2 5603 2 -show status like 'handler_read%'; +show /*8*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 @@ -193,7 +193,7 @@ l_orderkey l_linenumber 130 2 5603 2 5959 3 -show status like 'handler_read%'; +show /*9*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 @@ -218,7 +218,7 @@ l_orderkey l_linenumber 130 2 5603 2 5959 3 -show status like 'handler_read_next'; +show /*a*/ status like 'handler_read_next'; Variable_name Value Handler_read_next 3 explain @@ -240,7 +240,7 @@ max(l_orderkey) 5894 5859 5632 -show status like 'handler_read%'; +show /*b*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 21 @@ -262,7 +262,7 @@ where l_suppkey in (1,4) group by l_suppkey; max(l_orderkey) 5988 5984 -show status like 'handler_read%'; +show /*c*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 6 @@ -292,7 +292,7 @@ where p_retailprice > 1100 and o_orderdate='1997-01-01' and o_orderkey=l_orderkey and p_partkey=l_partkey; o_orderkey p_partkey 5895 200 -show status like 'handler_read%'; +show /*d*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 3 @@ -457,7 +457,7 @@ select * from t1, t2 where t2.a=t1.a and t2.b < 2; a pk a b 0 0 0 0 1 1 1 1 -show status like 'handler_read%'; +show /*e*/ status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 10 diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test index 48acf2e747f..a37677411ad 100644 --- a/mysql-test/main/innodb_ext_key.test +++ b/mysql-test/main/innodb_ext_key.test @@ -34,7 +34,7 @@ explain select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; flush status; select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; -show status like 'handler_read%'; +show /*1*/ status like 'handler_read%'; explain select count(*) from lineitem use index(primary) @@ -42,7 +42,7 @@ select count(*) from lineitem use index(primary) flush status; select count(*) from lineitem use index(primary) where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01'; -show status like 'handler_read%'; +show /*2*/ status like 'handler_read%'; explain select count(*) from lineitem @@ -50,7 +50,7 @@ select count(*) from lineitem flush status; select count(*) from lineitem where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000; -show status like 'handler_read%'; +show /*3*/ status like 'handler_read%'; explain select l_orderkey, l_linenumber from lineitem @@ -58,13 +58,13 @@ select l_orderkey, l_linenumber from lineitem flush status; select l_orderkey, l_linenumber from lineitem where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000; -show status like 'handler_read%'; +show /*4*/ status like 'handler_read%'; explain select min(l_orderkey) from lineitem where l_shipdate='1992-07-01'; flush status; select min(l_orderkey) from lineitem where l_shipdate='1992-07-01'; -show status like 'handler_read%'; +show /*5*/ status like 'handler_read%'; explain select min(l_orderkey) from lineitem @@ -72,7 +72,7 @@ select min(l_orderkey) from lineitem flush status; select min(l_orderkey) from lineitem where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000; -show status like 'handler_read%'; +show /*6*/ status like 'handler_read%'; explain select max(l_linenumber) from lineitem @@ -80,7 +80,7 @@ select max(l_linenumber) from lineitem flush status; select max(l_linenumber) from lineitem where l_shipdate='1992-07-01' and l_orderkey=130; -show status like 'handler_read%'; +show /*7*/ status like 'handler_read%'; explain select l_orderkey, l_linenumber @@ -92,7 +92,7 @@ select l_orderkey, l_linenumber from lineitem use index (i_l_shipdate, i_l_receiptdate) where l_shipdate='1992-07-01' and l_orderkey=130 or l_receiptdate='1992-07-01' and l_orderkey=5603; -show status like 'handler_read%'; +show /*8*/ status like 'handler_read%'; --replace_column 7 # explain @@ -105,7 +105,7 @@ select l_orderkey, l_linenumber from lineitem use index (i_l_shipdate, i_l_receiptdate) where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000 or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000; -show status like 'handler_read%'; +show /*9*/ status like 'handler_read%'; --replace_column 7 # 9 # 10 Using explain @@ -116,7 +116,7 @@ flush status; select l_orderkey, l_linenumber from lineitem where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000 or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000; -show status like 'handler_read_next'; +show /*a*/ status like 'handler_read_next'; --replace_column 9 # explain @@ -125,7 +125,7 @@ select max(l_orderkey) from lineitem flush status; select max(l_orderkey) from lineitem where l_partkey between 1 and 10 group by l_partkey; -show status like 'handler_read%'; +show /*b*/ status like 'handler_read%'; --replace_column 9 # explain @@ -134,7 +134,7 @@ select max(l_orderkey) from lineitem flush status; select max(l_orderkey) from lineitem where l_suppkey in (1,4) group by l_suppkey; -show status like 'handler_read%'; +show /*c*/ status like 'handler_read%'; create index i_p_retailprice on part(p_retailprice); @@ -151,7 +151,7 @@ select o_orderkey, p_partkey lineitem use index (i_l_partkey), orders where p_retailprice > 1100 and o_orderdate='1997-01-01' and o_orderkey=l_orderkey and p_partkey=l_partkey; -show status like 'handler_read%'; +show /*d*/ status like 'handler_read%'; --enable_ps2_protocol --echo # @@ -327,7 +327,7 @@ explain select * from t1, t2 where t2.a=t1.a and t2.b < 2; flush status; select * from t1, t2 where t2.a=t1.a and t2.b < 2; -show status like 'handler_read%'; +show /*e*/ status like 'handler_read%'; --enable_ps2_protocol drop table t1,t2; diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index e7f8825ab97..a0da2cd1873 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -503,7 +503,6 @@ start transaction; alter table tmp alter column a set default 8; unlock tables; drop table t2; ---source include/have_innodb.inc --echo # --echo # MDEV-22218 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON upon LOAD DATA with NO_BACKSLASH_ESCAPES in SQL_MODE and unique blob in table @@ -642,7 +641,6 @@ insert into t1 values (0); check table t1 extended; drop table t1; - --echo # --echo # MDEV-32837 long unique does not work like unique key when using replace --echo # diff --git a/mysql-test/main/myisam.result b/mysql-test/main/myisam.result index 9f907e6df1e..abff4c46137 100644 --- a/mysql-test/main/myisam.result +++ b/mysql-test/main/myisam.result @@ -1,7 +1,5 @@ call mtr.add_suppression("Can't find record in '.*'"); call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); -drop table if exists t1,t2,t3; -SET SQL_WARNINGS=1; CREATE TABLE t1 ( STRING_DATA char(255) default NULL, KEY string_data (STRING_DATA) diff --git a/mysql-test/main/myisam.test b/mysql-test/main/myisam.test index 4dc02c35a18..36780ef09ab 100644 --- a/mysql-test/main/myisam.test +++ b/mysql-test/main/myisam.test @@ -7,12 +7,6 @@ call mtr.add_suppression("Can't find record in '.*'"); call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); -# Initialise ---disable_warnings -drop table if exists t1,t2,t3; ---enable_warnings -SET SQL_WARNINGS=1; - # # Test problem with CHECK TABLE; # diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result index 40f310a43e9..cae8faf90b1 100644 --- a/mysql-test/main/trigger.result +++ b/mysql-test/main/trigger.result @@ -1,9 +1,3 @@ -drop table if exists t1, t2, t3, t4; -drop view if exists v1; -drop database if exists mysqltest; -drop function if exists f1; -drop function if exists f2; -drop procedure if exists p1; connect addconroot1, localhost, root,,; connect addconroot2, localhost, root,,; connect addconwithoutdb, localhost, root,,*NO-ONE*; diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test index ddbb8555b90..ae4ee2e04bc 100644 --- a/mysql-test/main/trigger.test +++ b/mysql-test/main/trigger.test @@ -7,15 +7,6 @@ # Basic triggers test # ---disable_warnings -drop table if exists t1, t2, t3, t4; -drop view if exists v1; -drop database if exists mysqltest; -drop function if exists f1; -drop function if exists f2; -drop procedure if exists p1; ---enable_warnings - # Create additional connections used through test connect (addconroot1, localhost, root,,); connect (addconroot2, localhost, root,,); diff --git a/mysql-test/suite/galera/r/galera_load_data.result b/mysql-test/suite/galera/r/galera_load_data.result index 84e96f8a36c..80bea22480f 100644 --- a/mysql-test/suite/galera/r/galera_load_data.result +++ b/mysql-test/suite/galera/r/galera_load_data.result @@ -28,7 +28,308 @@ LOCK TABLES cardtest_tbl WRITE; ALTER TABLE cardtest_tbl DISABLE KEYS; Warnings: Note 1031 Storage engine InnoDB of the table `cardtest02`.`cardtest_tbl` doesn't have this option -INSERT INTO cardtest_tbl VALUES (1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL); +INSERT INTO cardtest_tbl VALUES +(1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), +(301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL); ALTER TABLE cardtest_tbl ENABLE KEYS; Warnings: Note 1031 Storage engine InnoDB of the table `cardtest02`.`cardtest_tbl` doesn't have this option diff --git a/mysql-test/suite/galera/t/galera_load_data.test b/mysql-test/suite/galera/t/galera_load_data.test index c37920a43c4..252580f9426 100644 --- a/mysql-test/suite/galera/t/galera_load_data.test +++ b/mysql-test/suite/galera/t/galera_load_data.test @@ -30,8 +30,308 @@ CREATE TABLE cardtest_tbl ( LOCK TABLES cardtest_tbl WRITE; ALTER TABLE cardtest_tbl DISABLE KEYS; -INSERT INTO cardtest_tbl VALUES (1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL); - +INSERT INTO cardtest_tbl VALUES + (1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), + (301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL); ALTER TABLE cardtest_tbl ENABLE KEYS; UNLOCK TABLES; diff --git a/mysql-test/suite/parts/r/alter_table.result b/mysql-test/suite/parts/r/alter_table.result index 0901584c6f8..a16959d04aa 100644 --- a/mysql-test/suite/parts/r/alter_table.result +++ b/mysql-test/suite/parts/r/alter_table.result @@ -1,3 +1,6 @@ +# +# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER +# set @save_alter_algorithm= @@session.alter_algorithm; SET SESSION alter_algorithm=4; CREATE TABLE t1(a INT) engine=myisam PARTITION BY RANGE(a) SUBPARTITION BY KEY(a) (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION s0,SUBPARTITION s1), PARTITION p1 VALUES LESS THAN (20) (SUBPARTITION s2,SUBPARTITION s3)); @@ -18,9 +21,16 @@ ALTER TABLE t1 ADD COLUMN c INT; ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY DROP table if exists t1; set @@session.alter_algorithm= @save_alter_algorithm; +# +# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata | +# ERROR 1507 (HY000): Error in list of partitions to DROP +# CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3)); ALTER TABLE t1 DROP PARTITION p; DROP TABLE if exists t1; +# +# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition +# CREATE TABLE t1 (i INT); CREATE VIEW v1 as SELECT * FROM t1; CREATE TABLE t2 (i INT); @@ -28,3 +38,4 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ; ERROR 42000: Can't open table DROP VIEW v1; DROP TABLE t1, t2; +# End of 10.5 tests diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result index 151ff802a82..840b8da771b 100644 --- a/mysql-test/suite/parts/r/partition_recover_myisam.result +++ b/mysql-test/suite/parts/r/partition_recover_myisam.result @@ -1,3 +1,6 @@ +call mtr.add_suppression("..test.t1_will_crash"); +call mtr.add_suppression("Got an error from unknown thread"); +call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired"); CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM; INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11); FLUSH TABLES; diff --git a/mysql-test/suite/parts/t/alter_table.test b/mysql-test/suite/parts/t/alter_table.test index 53b61806acb..61b2539dac1 100644 --- a/mysql-test/suite/parts/t/alter_table.test +++ b/mysql-test/suite/parts/t/alter_table.test @@ -1,13 +1,13 @@ # -# General errors with ALTER TABLE and partitions that doesn't have to be run +# General bugs with ALTER TABLE and partitions that doesn't have to be run # on all engines # --source include/have_partition.inc -# -# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER -# +--echo # +--echo # MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER +--echo # set @save_alter_algorithm= @@session.alter_algorithm; SET SESSION alter_algorithm=4; @@ -19,18 +19,18 @@ DROP table if exists t1; set @@session.alter_algorithm= @save_alter_algorithm; -# -# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata | -# ERROR 1507 (HY000): Error in list of partitions to DROP -# +--echo # +--echo # MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata | +--echo # ERROR 1507 (HY000): Error in list of partitions to DROP +--echo # CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3)); ALTER TABLE t1 DROP PARTITION p; DROP TABLE if exists t1; -# -# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition -# +--echo # +--echo # MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition +--echo # CREATE TABLE t1 (i INT); CREATE VIEW v1 as SELECT * FROM t1; CREATE TABLE t2 (i INT); @@ -38,3 +38,5 @@ CREATE TABLE t2 (i INT); ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ; DROP VIEW v1; DROP TABLE t1, t2; + +--echo # End of 10.5 tests diff --git a/mysql-test/suite/parts/t/partition_recover_myisam-master.opt b/mysql-test/suite/parts/t/partition_recover_myisam.opt similarity index 100% rename from mysql-test/suite/parts/t/partition_recover_myisam-master.opt rename to mysql-test/suite/parts/t/partition_recover_myisam.opt diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.test b/mysql-test/suite/parts/t/partition_recover_myisam.test index 91a14a51b3c..3106407bea9 100644 --- a/mysql-test/suite/parts/t/partition_recover_myisam.test +++ b/mysql-test/suite/parts/t/partition_recover_myisam.test @@ -1,18 +1,10 @@ # test the auto-recover (--myisam-recover) of partitioned myisam tables ---disable_query_log call mtr.add_suppression("..test.t1_will_crash"); call mtr.add_suppression("Got an error from unknown thread"); call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired"); ---enable_query_log --source include/have_partition.inc ---disable_warnings ---disable_query_log -drop table if exists t1_will_crash; ---enable_query_log ---enable_warnings - CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM; INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11); diff --git a/sql/handler.cc b/sql/handler.cc index 93baef92267..4d03fcce8cd 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4915,8 +4915,7 @@ handler::ha_check_and_repair(THD *thd) int handler::ha_disable_indexes(uint mode) { - DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE || - m_lock_type != F_UNLCK); + DBUG_ASSERT(table->s->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK); mark_trx_read_write(); return disable_indexes(mode); @@ -4932,8 +4931,7 @@ handler::ha_disable_indexes(uint mode) int handler::ha_enable_indexes(uint mode) { - DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE || - m_lock_type != F_UNLCK); + DBUG_ASSERT(table->s->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK); mark_trx_read_write(); return enable_indexes(mode); diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 1e0a6a75338..a6b12ed7cff 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1881,7 +1881,7 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, select_result *sink) was used. This ensures that we don't get a problem when the whole range of the key has been used. */ - if (info->handle_duplicates == DUP_REPLACE && table->next_number_field && + if (info->handle_duplicates == DUP_REPLACE && key_nr == table->s->next_number_index && insert_id_for_cur_row > 0) goto err; if (table->file->has_dup_ref()) diff --git a/sql/table.cc b/sql/table.cc index 610d94d413c..72bc7835a3c 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -3209,6 +3209,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, goto err; // Wrong field definition reg_field->flags |= AUTO_INCREMENT_FLAG; } + else + share->next_number_index= MAX_KEY; if (share->blob_fields) { @@ -8926,7 +8928,7 @@ void TABLE::period_prepare_autoinc() if (!found_next_number_field) return; /* Don't generate a new value if the autoinc index is WITHOUT OVERLAPS */ - DBUG_ASSERT(s->next_number_index != (uint)-1); + DBUG_ASSERT(s->next_number_index < MAX_KEY); if (key_info[s->next_number_index].without_overlaps) return; diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c index 67cb714e7bf..4f3326098f6 100644 --- a/storage/myisam/mi_extra.c +++ b/storage/myisam/mi_extra.c @@ -279,51 +279,6 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) mi_print_error(info->s, HA_ERR_CRASHED); mi_mark_crashed(info); /* Fatal error found */ } -#ifdef __WIN__REMOVE_OBSOLETE_WORKAROUND - /* Close the isam and data files as Win32 can't drop an open table */ - if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) - { - info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); - error=end_io_cache(&info->rec_cache); - } - if (info->lock_type != F_UNLCK && ! info->was_locked) - { - info->was_locked=info->lock_type; - if (mi_lock_database(info,F_UNLCK)) - error=my_errno; - info->lock_type = F_UNLCK; - } - if (share->kfile >= 0) - { - /* - We don't need to call _mi_decrement_open_count() if we are - dropping the table, as the files will be removed anyway. If we - are aborted before the files is removed, it's better to not - call it as in that case the automatic repair on open will add - the missing index entries - */ - if (function != HA_EXTRA_PREPARE_FOR_DROP) - _mi_decrement_open_count(info); - if (mysql_file_close(share->kfile,MYF(0))) - error=my_errno; - } - { - LIST *list_element ; - for (list_element=myisam_open_list ; - list_element ; - list_element=list_element->next) - { - MI_INFO *tmpinfo=(MI_INFO*) list_element->data; - if (tmpinfo->s == info->s) - { - if (tmpinfo->dfile >= 0 && mysql_file_close(tmpinfo->dfile, MYF(0))) - error = my_errno; - tmpinfo->dfile= -1; - } - } - } - share->kfile= -1; /* Files aren't open anymore */ -#endif mysql_mutex_unlock(&share->intern_lock); mysql_mutex_unlock(&THR_LOCK_myisam); break; From 179515a68cc305f4bb3880de911df0b3f8325b90 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 28 Apr 2024 09:45:16 +0200 Subject: [PATCH 44/74] bugfix: dgcov.pl shows wrong line numbers dgcov.pl was putting gcov execution counters on wrong lines in the report (*.dgcov files were correct), because it was incrementing the new line number for diff lines starting from '-' (lines from the old file, not present in the new) --- mysql-test/dgcov.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl index 94fe48805d1..1da0d6c23b0 100755 --- a/mysql-test/dgcov.pl +++ b/mysql-test/dgcov.pl @@ -112,8 +112,7 @@ sub print_gcov_for_diff { $acc.=sprintf '%9s:%5s:%s', '', $lnum, $' if /^ /; ++$printme, $acc.=sprintf '%9s:%5s:%s', gcov_prefix($fcov->{$lnum}), $lnum, $' if /^\+/; die "$_^^^ dying", unless /^[- +]/; - ++$lnum; - --$cnt; + ++$lnum, --$cnt unless /^-/; } print $acc if $printme; close PIPE or die "command '$cmd' failed: $!: $?"; From 3d75cffa9144606e4cbca1fe4a9bc8059e90c83b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 28 Apr 2024 10:38:32 +0200 Subject: [PATCH 45/74] bugfix: INFORMATION_SCHEMA.STATISTICS doesn't show whether the index is disabled --- mysql-test/main/information_schema2.result | 11 +++++++++++ mysql-test/main/information_schema2.test | 9 +++++++++ sql/sql_show.cc | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/mysql-test/main/information_schema2.result b/mysql-test/main/information_schema2.result index 75217cf58bd..fa4d71bf227 100644 --- a/mysql-test/main/information_schema2.result +++ b/mysql-test/main/information_schema2.result @@ -25,3 +25,14 @@ t3 t4 drop table t1, t2, t3, t4; # End of 5.5 tests +# INFORMATION_SCHEMA.STATISTICS doesn't show if the index is disabled +create table t1 (a int, key(a)); +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +index_name comment +a +alter table t1 disable keys; +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +index_name comment +a disabled +drop table t1; +# End of 10.5 tests diff --git a/mysql-test/main/information_schema2.test b/mysql-test/main/information_schema2.test index bd9350a3031..50ceec2c5d3 100644 --- a/mysql-test/main/information_schema2.test +++ b/mysql-test/main/information_schema2.test @@ -19,3 +19,12 @@ select * from t4 order by table_name; drop table t1, t2, t3, t4; --echo # End of 5.5 tests + +--echo # INFORMATION_SCHEMA.STATISTICS doesn't show if the index is disabled +create table t1 (a int, key(a)); +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +alter table t1 disable keys; +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +drop table t1; + +--echo # End of 10.5 tests diff --git a/sql/sql_show.cc b/sql/sql_show.cc index a6b307ac8a4..3ed8e108f8d 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -9400,7 +9400,7 @@ ST_FIELD_INFO stat_fields_info[]= Column("PACKED", Varchar(10), NULLABLE, "Packed", OPEN_FRM_ONLY), Column("NULLABLE", Varchar(3), NOT_NULL, "Null", OPEN_FRM_ONLY), Column("INDEX_TYPE", Varchar(16), NOT_NULL, "Index_type", OPEN_FULL_TABLE), - Column("COMMENT", Varchar(16), NULLABLE, "Comment", OPEN_FRM_ONLY), + Column("COMMENT", Varchar(16), NULLABLE, "Comment", OPEN_FULL_TABLE), Column("INDEX_COMMENT", Varchar(INDEX_COMMENT_MAXLEN), NOT_NULL, "Index_comment",OPEN_FRM_ONLY), CEnd() From 4045a87bcb37763670cec4aad7f5b7afaf42717a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 28 Apr 2024 10:39:37 +0200 Subject: [PATCH 46/74] test for Bug #16051817 GOT ERROR 124 FROM STORAGE ENGINE ON DELETE FROM A PARTITIONED TABLE followup for c5896384bda5 --- mysql-test/suite/parts/r/alter_table.result | 21 +++++++++++++++++++++ mysql-test/suite/parts/t/alter_table.test | 13 +++++++++++++ 2 files changed, 34 insertions(+) diff --git a/mysql-test/suite/parts/r/alter_table.result b/mysql-test/suite/parts/r/alter_table.result index a16959d04aa..ac8eba12f1b 100644 --- a/mysql-test/suite/parts/r/alter_table.result +++ b/mysql-test/suite/parts/r/alter_table.result @@ -38,4 +38,25 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ; ERROR 42000: Can't open table DROP VIEW v1; DROP TABLE t1, t2; +# +# MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS +# +create table t1 (i1 int primary key, i2 int, d1 date, key(i2)) +partition by hash(i1) partitions 3; +insert into t1 values(0, 1, '2010-10-10'); +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +index_name comment +PRIMARY +i2 +alter table t1 disable keys; +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +index_name comment +PRIMARY +i2 disabled +alter table t1 add partition (partition p4); +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +index_name comment +PRIMARY +i2 disabled +drop table t1; # End of 10.5 tests diff --git a/mysql-test/suite/parts/t/alter_table.test b/mysql-test/suite/parts/t/alter_table.test index 61b2539dac1..37adb424d75 100644 --- a/mysql-test/suite/parts/t/alter_table.test +++ b/mysql-test/suite/parts/t/alter_table.test @@ -39,4 +39,17 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ; DROP VIEW v1; DROP TABLE t1, t2; +--echo # +--echo # MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS +--echo # +create table t1 (i1 int primary key, i2 int, d1 date, key(i2)) +partition by hash(i1) partitions 3; +insert into t1 values(0, 1, '2010-10-10'); +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +alter table t1 disable keys; +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +alter table t1 add partition (partition p4); +select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; +drop table t1; + --echo # End of 10.5 tests From 52c45332a8424bfe2e767202ff1c821c8c1951da Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Fri, 3 May 2024 15:16:25 +0200 Subject: [PATCH 47/74] MDEV-34071: Failure during the galera_3nodes_sr.GCF-336 test This commit fixes sporadic failures in galera_3nodes_sr.GCF-336 test. The following changes have been made here: 1) A small addition to the test itself which should make it more deterministic by waiting for non-primary state before COMMIT; 2) More careful handling of the wsrep_ready variable in the server code (it should always be protected with mutex). No additional tests are required. --- mysql-test/suite/galera_3nodes_sr/r/GCF-336.result | 2 ++ mysql-test/suite/galera_3nodes_sr/t/GCF-336.test | 6 ++++++ sql/slave.cc | 2 +- sql/wsrep_mysqld.cc | 2 +- sql/wsrep_notify.cc | 2 +- sql/wsrep_server_service.cc | 1 - 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result index eeccfa3b5a3..8fc853f8425 100644 --- a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result @@ -25,6 +25,8 @@ SET SESSION wsrep_sync_wait=0; connection node_2; INSERT INTO t1 VALUES (2); ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_2a; +connection node_2; COMMIT; ERROR 08S01: WSREP has not yet prepared node for application use connection node_2a; diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test index ba85aa5291c..20d5955e4fc 100644 --- a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test +++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test @@ -27,6 +27,12 @@ SET SESSION wsrep_sync_wait=0; --connection node_2 --error ER_LOCK_DEADLOCK INSERT INTO t1 VALUES (2); + +--connection node_2a +--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + +--connection node_2 --error ER_UNKNOWN_COM_ERROR COMMIT; diff --git a/sql/slave.cc b/sql/slave.cc index 66b42cabcd4..6032256c60c 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3895,7 +3895,7 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi, if (thd->system_thread == SYSTEM_THREAD_SLAVE_SQL && ((rli->mi->using_parallel() && rli->mi->parallel_mode <= SLAVE_PARALLEL_CONSERVATIVE) || - wsrep_ready == 0)) { + !wsrep_ready_get())) { rli->abort_slave= 1; rli->report(ERROR_LEVEL, ER_UNKNOWN_COM_ERROR, rgi->gtid_info(), "Node has dropped from cluster"); diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 8bd953e98b2..e584c2cc144 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -3456,7 +3456,7 @@ void wsrep_ready_set(bool ready_value) mysql_mutex_lock(&LOCK_wsrep_ready); wsrep_ready= ready_value; // Signal if we have reached ready state - if (wsrep_ready) + if (ready_value) mysql_cond_signal(&COND_wsrep_ready); mysql_mutex_unlock(&LOCK_wsrep_ready); } diff --git a/sql/wsrep_notify.cc b/sql/wsrep_notify.cc index 1c8b2b47bfe..bd2919a223e 100644 --- a/sql/wsrep_notify.cc +++ b/sql/wsrep_notify.cc @@ -24,7 +24,7 @@ void wsrep_notify_status(enum wsrep::server_state::state status, if (!view) { WSREP_DEBUG("wsrep_notify_status server not yet ready : wsrep_ready=%d status %d", - wsrep_ready, (int)status); + (int) wsrep_ready_get(), (int)status); return; } diff --git a/sql/wsrep_server_service.cc b/sql/wsrep_server_service.cc index e6cfb7948b9..af2c3efd214 100644 --- a/sql/wsrep_server_service.cc +++ b/sql/wsrep_server_service.cc @@ -340,7 +340,6 @@ void Wsrep_server_service::log_state_change( switch (current_state) { case Wsrep_server_state::s_synced: - wsrep_ready= TRUE; WSREP_INFO("Synchronized with group, ready for connections"); wsrep_ready_set(true); /* fall through */ From be607821037a7b071575f5a5915ae45599cbd2e4 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Mon, 6 May 2024 13:06:14 +0300 Subject: [PATCH 48/74] MDEV-33789: rocksdb.bloomfilter2 failed on ... : Disable it. --- storage/rocksdb/mysql-test/rocksdb/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def index 627d7da4171..681e6ffa450 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def +++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def @@ -87,6 +87,7 @@ compact_deletes: MDEV-12663 : rocksdb.compact_deletes times out and causes other blind_delete_without_tx_api: MDEV-12286: rocksdb.blind_delete_without_tx_api test fails information_schema: MDEV-14372: unstable testcase +bloomfilter2: MDEV-33789: rocksdb.bloomfilter2 failed on amd64-debian-12-rocksdb ## ## Tests that fail for some other reason ## From f90fcefdb2eada4e8c507eefc5d5e620b34c94d2 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Mon, 6 May 2024 13:31:31 +0300 Subject: [PATCH 49/74] MDEV-33866: rocksdb.write_sync fails on windows ... : Disable it --- storage/rocksdb/mysql-test/rocksdb/t/disabled.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def index 681e6ffa450..824d07935b7 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def +++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def @@ -88,6 +88,8 @@ blind_delete_without_tx_api: MDEV-12286: rocksdb.blind_delete_without_tx_api tes information_schema: MDEV-14372: unstable testcase bloomfilter2: MDEV-33789: rocksdb.bloomfilter2 failed on amd64-debian-12-rocksdb +write_sync: MDEV-33866: rocksdb.write_sync fails on amd64-windows-packages + ## ## Tests that fail for some other reason ## From 55754be20ca2807a54bbfd5a23eb690617f57d53 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Mon, 6 May 2024 13:34:39 +0300 Subject: [PATCH 50/74] MDEV-33781: rocksdb.locking_issues_case5_rc fails windows ... : Disable it --- storage/rocksdb/mysql-test/rocksdb/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def index 824d07935b7..c16c1021141 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def +++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def @@ -89,6 +89,7 @@ information_schema: MDEV-14372: unstable testcase bloomfilter2: MDEV-33789: rocksdb.bloomfilter2 failed on amd64-debian-12-rocksdb write_sync: MDEV-33866: rocksdb.write_sync fails on amd64-windows-packages +locking_issues_case5_rc: MDEV-33781: rocksdb.locking_issues_case5_rc fails on amd64-windows-packages ## ## Tests that fail for some other reason From 16394f1aa1b4097f897b8ab01ea2064726cca059 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 6 May 2024 16:14:11 +0200 Subject: [PATCH 51/74] update C/C 3.1 --- libmariadb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb b/libmariadb index 9155b19b462..51b2a621b3d 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit 9155b19b462ac15fc69d0b58ae51370b7523ced5 +Subproject commit 51b2a621b3d5ef949098dcb7912048caaf878793 From 9b2bf09b9513222ec959c7df92926c8ef4b6ebe5 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Mon, 6 May 2024 19:49:11 +0530 Subject: [PATCH 52/74] MDEV-33980 mariadb-backup --backup is missing retry logic for undo tablespaces - This is a merge of commit f378e7643459f0baa6c4149a795463f2f46b6871 from 10.4 to 10.5. --- storage/innobase/os/os0file.cc | 8 -------- storage/innobase/srv/srv0start.cc | 28 +++++++++++++--------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 14c2f865aa3..4ef6799e9a6 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -4264,15 +4264,7 @@ invalid: } aligned_free(page); - DBUG_EXECUTE_IF("undo_space_read_fail", - if (space_id == srv_undo_space_id_start) { - goto wrong_space_id; - }); - if (UNIV_UNLIKELY(space_id != space->id)) { -#ifndef DBUG_OFF -wrong_space_id: -#endif ib::error() << "Expected tablespace id " << space->id << " but found " << space_id << " in the file " << name; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 5af1ccb2ebb..9d64d4ce57f 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -489,7 +489,6 @@ static ulint srv_undo_tablespace_open(bool create, const char* name, ulint i) char undo_name[sizeof "innodb_undo000"]; ulint space_id= 0; ulint fsp_flags= 0; - ulint n_retries= 5; if (create) { @@ -506,7 +505,6 @@ static ulint srv_undo_tablespace_open(bool create, const char* name, ulint i) } } -undo_retry: pfs_os_file_t fh= os_file_create(innodb_data_file_key, name, OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT | OS_FILE_ON_ERROR_SILENT, @@ -516,6 +514,7 @@ undo_retry: if (!success) return 0; + ulint n_retries = 5; os_offset_t size= os_file_get_size(fh); ut_a(size != os_offset_t(-1)); @@ -523,15 +522,25 @@ undo_retry: { page_t *page= static_cast(aligned_malloc(srv_page_size, srv_page_size)); +undo_retry: if (os_file_read(IORequestRead, fh, page, 0, srv_page_size) != DB_SUCCESS) { err_exit: + if (n_retries && srv_operation == SRV_OPERATION_BACKUP) + { + sql_print_information("InnoDB: Retrying to read undo " + "tablespace %s", name); + n_retries--; + goto undo_retry; + } ib::error() << "Unable to read first page of file " << name; aligned_free(page); return ULINT_UNDEFINED; } + DBUG_EXECUTE_IF("undo_space_read_fail", goto err_exit;); + uint32_t id= mach_read_from_4(FIL_PAGE_SPACE_ID + page); if (id == 0 || id >= SRV_SPACE_ID_UPPER_BOUND || memcmp_aligned<2>(FIL_PAGE_SPACE_ID + page, @@ -576,7 +585,7 @@ err_exit: space->set_sizes(SRV_UNDO_TABLESPACE_SIZE_IN_PAGES); space->size= file->size= uint32_t(size >> srv_page_size_shift); } - else if (!(success = file->read_page0())) + else if (!file->read_page0()) { os_file_close(file->handle); file->handle= OS_FILE_CLOSED; @@ -585,18 +594,7 @@ err_exit: } mutex_exit(&fil_system.mutex); - - if (!success && n_retries && - srv_operation == SRV_OPERATION_BACKUP) - { - sql_print_information("InnoDB: Retrying to read undo " - "tablespace %s", undo_name); - fil_space_free(space_id, false); - n_retries--; - goto undo_retry; - } - - return success ? space_id : ULINT_UNDEFINED; + return space_id; } /** Check if undo tablespaces and redo log files exist before creating a From 22b3ba93121581db1cca4d2f9bfaf8d889cb2b32 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 27 Apr 2024 15:15:37 +0200 Subject: [PATCH 53/74] MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS on disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE) the engine does not know that the long unique is logically unique, because on the engine level it is not. And the engine disables it, Change the disable_indexes/enable_indexes API. Instead of the enum mode, send a key_map of indexes that should be enabled. This way the server will decide what is unique, not the engine. --- mysql-test/main/long_unique_bugs.result | 12 + mysql-test/main/long_unique_bugs.test | 13 + .../suite/galera/r/galera_load_data.result | 2 - sql/ha_partition.cc | 29 +- sql/ha_partition.h | 7 +- sql/handler.cc | 24 +- sql/handler.h | 14 +- sql/sql_select.cc | 2 +- sql/sql_table.cc | 18 +- sql/sql_union.cc | 8 +- sql/table.cc | 3 +- storage/heap/ha_heap.cc | 32 +- storage/heap/ha_heap.h | 4 +- storage/maria/ha_maria.cc | 70 ++-- storage/maria/ha_maria.h | 4 +- storage/maria/ma_extra.c | 16 +- storage/mroonga/ha_mroonga.cpp | 358 ++++++++---------- storage/mroonga/ha_mroonga.hpp | 16 +- storage/myisam/ha_myisam.cc | 58 ++- storage/myisam/ha_myisam.h | 4 +- storage/myisam/mi_extra.c | 13 +- storage/spider/ha_spider.cc | 24 +- storage/spider/ha_spider.h | 4 +- 23 files changed, 354 insertions(+), 381 deletions(-) diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index afa14310153..c85f5d5b21e 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -717,4 +717,16 @@ a b update t1 set b='A' where a=1; ERROR 23000: Duplicate entry 'A' for key 'b' drop table t1; +# +# MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS +# +create table t1 (i int, unique key (i) using hash); +alter table t1 disable keys; +insert into t1 values (1),(2); +insert into t1 values (1); +ERROR 23000: Duplicate entry '1' for key 'i' +alter table t1 enable keys; +insert into t1 values (2); +ERROR 23000: Duplicate entry '2' for key 'i' +drop table t1; # End of 10.5 tests diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index a0da2cd1873..aa89a78e0bd 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -685,4 +685,17 @@ select * from t1; update t1 set b='A' where a=1; drop table t1; +--echo # +--echo # MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS +--echo # +create table t1 (i int, unique key (i) using hash); +alter table t1 disable keys; +insert into t1 values (1),(2); +--error ER_DUP_ENTRY +insert into t1 values (1); +alter table t1 enable keys; +--error ER_DUP_ENTRY +insert into t1 values (2); +drop table t1; + --echo # End of 10.5 tests diff --git a/mysql-test/suite/galera/r/galera_load_data.result b/mysql-test/suite/galera/r/galera_load_data.result index 80bea22480f..c275eb02ca5 100644 --- a/mysql-test/suite/galera/r/galera_load_data.result +++ b/mysql-test/suite/galera/r/galera_load_data.result @@ -26,8 +26,6 @@ PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1324 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED; LOCK TABLES cardtest_tbl WRITE; ALTER TABLE cardtest_tbl DISABLE KEYS; -Warnings: -Note 1031 Storage engine InnoDB of the table `cardtest02`.`cardtest_tbl` doesn't have this option INSERT INTO cardtest_tbl VALUES (1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), (2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL), diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 8ab9c346ca6..735d5c4442d 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1664,10 +1664,10 @@ bool ha_partition::is_crashed() const int ha_partition::prepare_new_partition(TABLE *tbl, HA_CREATE_INFO *create_info, handler *file, const char *part_name, - partition_element *p_elem, - uint disable_non_uniq_indexes) + partition_element *p_elem) { int error; + key_map keys_in_use= table->s->keys_in_use; DBUG_ENTER("prepare_new_partition"); /* @@ -1723,8 +1723,8 @@ int ha_partition::prepare_new_partition(TABLE *tbl, goto error_external_lock; DBUG_PRINT("info", ("partition %s external locked", part_name)); - if (disable_non_uniq_indexes) - file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE); + if (!keys_in_use.is_prefix(table->s->keys)) + file->ha_disable_indexes(keys_in_use, true); DBUG_RETURN(0); error_external_lock: @@ -2020,13 +2020,6 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, calls */ - /* - Before creating new partitions check whether indexes are disabled - in the partitions. - */ - - uint disable_non_uniq_indexes= indexes_are_disabled(); - i= 0; part_count= 0; part_it.rewind(); @@ -2068,8 +2061,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, prepare_new_partition(table, create_info, new_file_array[part], (const char *)part_name_buff, - sub_elem, - disable_non_uniq_indexes)))) + sub_elem)))) { cleanup_new_partition(part_count); DBUG_RETURN(error); @@ -2095,8 +2087,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, prepare_new_partition(table, create_info, new_file_array[i], (const char *)part_name_buff, - part_elem, - disable_non_uniq_indexes)))) + part_elem)))) { cleanup_new_partition(part_count); DBUG_RETURN(error); @@ -11054,7 +11045,7 @@ int ha_partition::calculate_checksum() != 0 Error */ -int ha_partition::disable_indexes(uint mode) +int ha_partition::disable_indexes(key_map map, bool persist) { handler **file; int error= 0; @@ -11062,7 +11053,7 @@ int ha_partition::disable_indexes(uint mode) DBUG_ASSERT(bitmap_is_set_all(&(m_part_info->lock_partitions))); for (file= m_file; *file; file++) { - if (unlikely((error= (*file)->ha_disable_indexes(mode)))) + if (unlikely((error= (*file)->ha_disable_indexes(map, persist)))) break; } return error; @@ -11079,7 +11070,7 @@ int ha_partition::disable_indexes(uint mode) != 0 Error */ -int ha_partition::enable_indexes(uint mode) +int ha_partition::enable_indexes(key_map map, bool persist) { handler **file; int error= 0; @@ -11087,7 +11078,7 @@ int ha_partition::enable_indexes(uint mode) DBUG_ASSERT(bitmap_is_set_all(&(m_part_info->lock_partitions))); for (file= m_file; *file; file++) { - if (unlikely((error= (*file)->ha_enable_indexes(mode)))) + if (unlikely((error= (*file)->ha_enable_indexes(map, persist)))) break; } return error; diff --git a/sql/ha_partition.h b/sql/ha_partition.h index a38aca2691b..e86928ce2d9 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -575,8 +575,7 @@ private: void cleanup_new_partition(uint part_count); int prepare_new_partition(TABLE *table, HA_CREATE_INFO *create_info, handler *file, const char *part_name, - partition_element *p_elem, - uint disable_non_uniq_indexes); + partition_element *p_elem); /* delete_table and rename_table uses very similar logic which is packed into this routine. @@ -1578,8 +1577,8 @@ public: Enable/Disable Indexes are only supported by HEAP and MyISAM. ------------------------------------------------------------------------- */ - int disable_indexes(uint mode) override; - int enable_indexes(uint mode) override; + int disable_indexes(key_map map, bool persist) override; + int enable_indexes(key_map map, bool persist) override; int indexes_are_disabled() override; /* diff --git a/sql/handler.cc b/sql/handler.cc index 4d03fcce8cd..b12014b55ec 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4909,32 +4909,48 @@ handler::ha_check_and_repair(THD *thd) /** Disable indexes: public interface. + @param map has 0 for all indexes that should be disabled + @param persist indexes should stay disabled after server restart + + Currently engines don't support disabling an arbitrary subset of indexes. + + In particular, if the change is persistent: + * auto-increment index should not be disabled + * unique indexes should not be disabled + + if unique or auto-increment indexes are disabled (non-persistently), + the caller should only insert data that does not require + auto-inc generation and does not violate uniqueness + @sa handler::disable_indexes() */ int -handler::ha_disable_indexes(uint mode) +handler::ha_disable_indexes(key_map map, bool persist) { DBUG_ASSERT(table->s->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK); mark_trx_read_write(); - return disable_indexes(mode); + return disable_indexes(map, persist); } /** Enable indexes: public interface. + @param map has 1 for all indexes that should be enabled + @param persist indexes should stay enabled after server restart + @sa handler::enable_indexes() */ int -handler::ha_enable_indexes(uint mode) +handler::ha_enable_indexes(key_map map, bool persist) { DBUG_ASSERT(table->s->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK); mark_trx_read_write(); - return enable_indexes(mode); + return enable_indexes(map, persist); } diff --git a/sql/handler.h b/sql/handler.h index f858553c7b7..2be0b3372f3 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -445,12 +445,6 @@ enum chf_create_flags { #define HA_FAST_CHANGE_PARTITION (1UL << 13) #define HA_PARTITION_ONE_PHASE (1UL << 14) -/* operations for disable/enable indexes */ -#define HA_KEY_SWITCH_NONUNIQ 0 -#define HA_KEY_SWITCH_ALL 1 -#define HA_KEY_SWITCH_NONUNIQ_SAVE 2 -#define HA_KEY_SWITCH_ALL_SAVE 3 - /* Note: the following includes binlog and closing 0. TODO remove the limit, use dynarrays @@ -3439,8 +3433,8 @@ public: int ha_optimize(THD* thd, HA_CHECK_OPT* check_opt); int ha_analyze(THD* thd, HA_CHECK_OPT* check_opt); bool ha_check_and_repair(THD *thd); - int ha_disable_indexes(uint mode); - int ha_enable_indexes(uint mode); + int ha_disable_indexes(key_map map, bool persist); + int ha_enable_indexes(key_map map, bool persist); int ha_discard_or_import_tablespace(my_bool discard); int ha_rename_table(const char *from, const char *to); void ha_drop_table(const char *name); @@ -4950,8 +4944,8 @@ public: virtual int analyze(THD* thd, HA_CHECK_OPT* check_opt) { return HA_ADMIN_NOT_IMPLEMENTED; } virtual bool check_and_repair(THD *thd) { return TRUE; } - virtual int disable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; } - virtual int enable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; } + virtual int disable_indexes(key_map map, bool persist) { return HA_ERR_WRONG_COMMAND; } + virtual int enable_indexes(key_map map, bool persist) { return HA_ERR_WRONG_COMMAND; } virtual int discard_or_import_tablespace(my_bool discard) { return (my_errno=HA_ERR_WRONG_COMMAND); } virtual void drop_table(const char *name); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3b30c2f1789..54251e2d3ad 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -20401,7 +20401,7 @@ create_internal_tmp_table_from_heap(THD *thd, TABLE *table, if (open_tmp_table(&new_table)) goto err1; if (table->file->indexes_are_disabled()) - new_table.file->ha_disable_indexes(HA_KEY_SWITCH_ALL); + new_table.file->ha_disable_indexes(key_map(0), false); table->file->ha_index_or_rnd_end(); if (table->file->ha_rnd_init_with_error(1)) DBUG_RETURN(1); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 2af1194074a..7941f1de78c 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -7955,14 +7955,28 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled, switch (keys_onoff) { case Alter_info::ENABLE: DEBUG_SYNC(table->in_use, "alter_table_enable_indexes"); - error= table->file->ha_enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE); + error= table->file->ha_enable_indexes(key_map(table->s->keys), true); break; case Alter_info::LEAVE_AS_IS: if (!indexes_were_disabled) break; /* fall through */ case Alter_info::DISABLE: - error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE); + { + key_map map= table->s->keys_in_use; + bool do_clear= false; + for (uint i=0; i < table->s->keys; i++) + { + if (!(table->s->key_info[i].flags & HA_NOSAME) && + i != table->s->next_number_index) + { + map.clear_bit(i); + do_clear= true; + } + } + if (do_clear) + error= table->file->ha_disable_indexes(map, true); + } } if (unlikely(error)) diff --git a/sql/sql_union.cc b/sql/sql_union.cc index c3c4198439a..8cbb35fc9a4 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -485,7 +485,7 @@ bool select_unit_ext::disable_index_if_needed(SELECT_LEX *curr_sl) !curr_sl->next_select()) ) { is_index_enabled= false; - if (table->file->ha_disable_indexes(HA_KEY_SWITCH_ALL)) + if (table->file->ha_disable_indexes(key_map(0), false)) return false; table->no_keyread=1; return true; @@ -2086,7 +2086,7 @@ bool st_select_lex_unit::optimize() /* re-enabling indexes for next subselect iteration */ if ((union_result->force_enable_index_if_needed() || union_distinct)) { - if(table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL)) + if(table->file->ha_enable_indexes(key_map(table->s->keys), false)) DBUG_ASSERT(0); else table->no_keyread= 0; @@ -2186,7 +2186,7 @@ bool st_select_lex_unit::exec() union_result->table && union_result->table->is_created()) { union_result->table->file->ha_delete_all_rows(); - union_result->table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL); + union_result->table->file->ha_enable_indexes(key_map(table->s->keys), false); } } @@ -2253,7 +2253,7 @@ bool st_select_lex_unit::exec() { // This is UNION DISTINCT, so there should be a fake_select_lex DBUG_ASSERT(fake_select_lex != NULL); - if (unlikely(table->file->ha_disable_indexes(HA_KEY_SWITCH_ALL))) + if (table->file->ha_disable_indexes(key_map(0), false)) DBUG_RETURN(TRUE); table->no_keyread=1; } diff --git a/sql/table.cc b/sql/table.cc index 72bc7835a3c..cc8fb094e36 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -9226,7 +9226,8 @@ bool TABLE::insert_all_rows_into_tmp_table(THD *thd, } if (file->indexes_are_disabled()) - tmp_table->file->ha_disable_indexes(HA_KEY_SWITCH_ALL); + tmp_table->file->ha_disable_indexes(key_map(0), false); + file->ha_index_or_rnd_end(); if (unlikely(file->ha_rnd_init_with_error(1))) diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 5f7f0c1efa0..404ad22a88a 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -440,31 +440,22 @@ int ha_heap::external_lock(THD *thd, int lock_type) SYNOPSIS disable_indexes() - mode mode of operation: - HA_KEY_SWITCH_NONUNIQ disable all non-unique keys - HA_KEY_SWITCH_ALL disable all keys - HA_KEY_SWITCH_NONUNIQ_SAVE dis. non-uni. and make persistent - HA_KEY_SWITCH_ALL_SAVE dis. all keys and make persistent DESCRIPTION - Disable indexes and clear keys to use for scanning. - - IMPLEMENTATION - HA_KEY_SWITCH_NONUNIQ is not implemented. - HA_KEY_SWITCH_NONUNIQ_SAVE is not implemented with HEAP. - HA_KEY_SWITCH_ALL_SAVE is not implemented with HEAP. + See handler::ha_disable_indexes() RETURN 0 ok HA_ERR_WRONG_COMMAND mode not implemented. */ -int ha_heap::disable_indexes(uint mode) +int ha_heap::disable_indexes(key_map map, bool persist) { int error; - if (mode == HA_KEY_SWITCH_ALL) + if (!persist) { + DBUG_ASSERT(map.is_clear_all()); if (!(error= heap_disable_indexes(file))) set_keys_for_scanning(); } @@ -482,11 +473,6 @@ int ha_heap::disable_indexes(uint mode) SYNOPSIS enable_indexes() - mode mode of operation: - HA_KEY_SWITCH_NONUNIQ enable all non-unique keys - HA_KEY_SWITCH_ALL enable all keys - HA_KEY_SWITCH_NONUNIQ_SAVE en. non-uni. and make persistent - HA_KEY_SWITCH_ALL_SAVE en. all keys and make persistent DESCRIPTION Enable indexes and set keys to use for scanning. @@ -495,10 +481,7 @@ int ha_heap::disable_indexes(uint mode) since the heap storage engine cannot repair the indexes. To be sure, call handler::delete_all_rows() before. - IMPLEMENTATION - HA_KEY_SWITCH_NONUNIQ is not implemented. - HA_KEY_SWITCH_NONUNIQ_SAVE is not implemented with HEAP. - HA_KEY_SWITCH_ALL_SAVE is not implemented with HEAP. + See also handler::ha_enable_indexes() RETURN 0 ok @@ -506,12 +489,13 @@ int ha_heap::disable_indexes(uint mode) HA_ERR_WRONG_COMMAND mode not implemented. */ -int ha_heap::enable_indexes(uint mode) +int ha_heap::enable_indexes(key_map map, bool persist) { int error; - if (mode == HA_KEY_SWITCH_ALL) + if (!persist) { + DBUG_ASSERT(map.is_prefix(table->s->keys)); if (!(error= heap_enable_indexes(file))) set_keys_for_scanning(); } diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h index 18e0d1a92d5..d8636f7fc7e 100644 --- a/storage/heap/ha_heap.h +++ b/storage/heap/ha_heap.h @@ -101,8 +101,8 @@ public: int external_lock(THD *thd, int lock_type); int delete_all_rows(void); int reset_auto_increment(ulonglong value); - int disable_indexes(uint mode); - int enable_indexes(uint mode); + int disable_indexes(key_map map, bool persist); + int enable_indexes(key_map map, bool persist); int indexes_are_disabled(void); ha_rows records_in_range(uint inx, const key_range *start_key, const key_range *end_key, page_range *pages); diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 998255e21e0..fae1cdcd816 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -1924,40 +1924,45 @@ int ha_maria::preload_keys(THD * thd, HA_CHECK_OPT *check_opt) SYNOPSIS disable_indexes() - mode mode of operation: - HA_KEY_SWITCH_NONUNIQ disable all non-unique keys - HA_KEY_SWITCH_ALL disable all keys - HA_KEY_SWITCH_NONUNIQ_SAVE dis. non-uni. and make persistent - HA_KEY_SWITCH_ALL_SAVE dis. all keys and make persistent - IMPLEMENTATION - HA_KEY_SWITCH_NONUNIQ is not implemented. - HA_KEY_SWITCH_ALL_SAVE is not implemented. + DESCRIPTION + See handler::ha_disable_indexes() RETURN 0 ok HA_ERR_WRONG_COMMAND mode not implemented. */ -int ha_maria::disable_indexes(uint mode) +int ha_maria::disable_indexes(key_map map, bool persist) { int error; - if (mode == HA_KEY_SWITCH_ALL) + if (!persist) { /* call a storage engine function to switch the key map */ + DBUG_ASSERT(map.is_clear_all()); error= maria_disable_indexes(file); } - else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE) - { - maria_extra(file, HA_EXTRA_NO_KEYS, 0); - info(HA_STATUS_CONST); // Read new key info - error= 0; - } else { - /* mode not implemented */ - error= HA_ERR_WRONG_COMMAND; + /* auto-inc key cannot be disabled */ + if (table->s->next_number_index < MAX_KEY) + DBUG_ASSERT(map.is_set(table->s->next_number_index)); + + /* unique keys cannot be disabled either */ + for (uint i=0; i < table->s->keys; i++) + DBUG_ASSERT(!(table->key_info[i].flags & HA_NOSAME) || map.is_set(i)); + + ulonglong ullmap= map.to_ulonglong(); + + /* make sure auto-inc key is enabled even if it's > 64 */ + if (map.length() > MARIA_KEYMAP_BITS && + table->s->next_number_index < MAX_KEY) + maria_set_key_active(ullmap, table->s->next_number_index); + + maria_extra(file, HA_EXTRA_NO_KEYS, &ullmap); + info(HA_STATUS_CONST); // Read new key info + error= 0; } return error; } @@ -1968,21 +1973,14 @@ int ha_maria::disable_indexes(uint mode) SYNOPSIS enable_indexes() - mode mode of operation: - HA_KEY_SWITCH_NONUNIQ enable all non-unique keys - HA_KEY_SWITCH_ALL enable all keys - HA_KEY_SWITCH_NONUNIQ_SAVE en. non-uni. and make persistent - HA_KEY_SWITCH_ALL_SAVE en. all keys and make persistent DESCRIPTION Enable indexes, which might have been disabled by disable_index() before. - The modes without _SAVE work only if both data and indexes are empty, - since the MARIA repair would enable them persistently. + If persist=false, it works only if both data and indexes are empty, + since the Aria repair would enable them persistently. To be sure in these cases, call handler::delete_all_rows() before. - IMPLEMENTATION - HA_KEY_SWITCH_NONUNIQ is not implemented. - HA_KEY_SWITCH_ALL_SAVE is not implemented. + See also handler::ha_enable_indexes() RETURN 0 ok @@ -1991,18 +1989,19 @@ int ha_maria::disable_indexes(uint mode) HA_ERR_WRONG_COMMAND mode not implemented. */ -int ha_maria::enable_indexes(uint mode) +int ha_maria::enable_indexes(key_map map, bool persist) { int error; ha_rows start_rows= file->state->records; - DBUG_PRINT("info", ("ha_maria::enable_indexes mode: %d", mode)); + DBUG_PRINT("info", ("ha_maria::enable_indexes mode: %d", persist)); if (maria_is_all_keys_active(file->s->state.key_map, file->s->base.keys)) { /* All indexes are enabled already. */ return 0; } - if (mode == HA_KEY_SWITCH_ALL) + DBUG_ASSERT(map.is_prefix(table->s->keys)); + if (!persist) { error= maria_enable_indexes(file); /* @@ -2011,7 +2010,7 @@ int ha_maria::enable_indexes(uint mode) but mode==HA_KEY_SWITCH_ALL forbids it. */ } - else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE) + else { THD *thd= table->in_use; HA_CHECK *param= (HA_CHECK*) thd->alloc(sizeof *param); @@ -2076,11 +2075,6 @@ int ha_maria::enable_indexes(uint mode) info(HA_STATUS_CONST); thd_proc_info(thd, save_proc_info); } - else - { - /* mode not implemented */ - error= HA_ERR_WRONG_COMMAND; - } DBUG_EXECUTE_IF("maria_flush_whole_log", { DBUG_PRINT("maria_flush_whole_log", ("now")); @@ -2292,7 +2286,7 @@ int ha_maria::end_bulk_insert() } if (!abort && can_enable_indexes) - if ((error= enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE))) + if ((error= enable_indexes(key_map(table->s->keys), true))) first_error= first_error ? first_error : error; if (bulk_insert_single_undo != BULK_INSERT_NONE) diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h index 2b8b5dc9742..41f644364bd 100644 --- a/storage/maria/ha_maria.h +++ b/storage/maria/ha_maria.h @@ -122,8 +122,8 @@ public: int external_lock(THD * thd, int lock_type) override; int start_stmt(THD *thd, thr_lock_type lock_type) override final; int delete_all_rows(void) override final; - int disable_indexes(uint mode) override final; - int enable_indexes(uint mode) override final; + int disable_indexes(key_map map, bool persist) override final; + int enable_indexes(key_map map, bool persist) override final; int indexes_are_disabled(void) override final; void start_bulk_insert(ha_rows rows, uint flags) override final; int end_bulk_insert() override final; diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c index 3ab150862a2..6be1edbc5ce 100644 --- a/storage/maria/ma_extra.c +++ b/storage/maria/ma_extra.c @@ -239,25 +239,17 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function, break; /* we're going to modify pieces of the state, stall Checkpoint */ - mysql_mutex_lock(&share->intern_lock); if (info->lock_type == F_UNLCK) { - mysql_mutex_unlock(&share->intern_lock); error= 1; /* Not possibly if not lock */ break; } + mysql_mutex_lock(&share->intern_lock); if (maria_is_any_key_active(share->state.key_map)) { - MARIA_KEYDEF *key= share->keyinfo; - uint i; - for (i =0 ; i < share->base.keys ; i++,key++) - { - if (!(key->flag & HA_NOSAME) && info->s->base.auto_key != i+1) - { - maria_clear_key_active(share->state.key_map, i); - info->update|= HA_STATE_CHANGED; - } - } + if (share->state.key_map != *(ulonglong*)extra_arg) + info->update|= HA_STATE_CHANGED; + share->state.key_map= *(ulonglong*)extra_arg; if (!share->changed) { diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index 5c04add0dab..2077b0b8863 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -4337,9 +4337,9 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint open_options) // TODO: implemented by "reindex" instead of "remove and recreate". // Because "remove and recreate" invalidates opened indexes by // other threads. - error = wrapper_disable_indexes_mroonga(HA_KEY_SWITCH_ALL); + error = wrapper_disable_indexes_mroonga(key_map(table->s->keys), false); if (!error) { - error = wrapper_enable_indexes_mroonga(HA_KEY_SWITCH_ALL); + error = wrapper_enable_indexes_mroonga(key_map(table->s->keys), false); } } } @@ -13625,197 +13625,184 @@ int ha_mroonga::generic_disable_index(int i, KEY *key_info) DBUG_RETURN(error); } -int ha_mroonga::wrapper_disable_indexes_mroonga(uint mode) +int ha_mroonga::wrapper_disable_indexes_mroonga(key_map map, bool persist) { int error = 0; MRN_DBUG_ENTER_METHOD(); - if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { - uint i; - for (i = 0; i < table_share->keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (share->wrap_key_nr[i] < MAX_KEY) { - continue; - } - if (!grn_index_tables[i]) { - DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); - DBUG_RETURN(0); - } + uint i; + for (i = 0; i < table_share->keys; i++) { + if (i == table->s->primary_key) { + continue; + } + if (share->wrap_key_nr[i] < MAX_KEY) { + continue; + } + if (!grn_index_tables[i]) { + DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); + DBUG_RETURN(0); + } + } + KEY *key_info = table_share->key_info; + for (i = 0; i < table_share->keys; i++) { + if (!(key_info[i].flags & HA_FULLTEXT) && + !mrn_is_geo_key(&key_info[i])) { + continue; } - KEY *key_info = table_share->key_info; - for (i = 0; i < table_share->keys; i++) { - if (!(key_info[i].flags & HA_FULLTEXT) && - !mrn_is_geo_key(&key_info[i])) { - continue; - } - int sub_error = generic_disable_index(i, key_info); - if (error != 0 && sub_error != 0) { - error = sub_error; - } + int sub_error = generic_disable_index(i, key_info); + if (error != 0 && sub_error != 0) { + error = sub_error; } - } else { - error = HA_ERR_WRONG_COMMAND; } DBUG_RETURN(error); } -int ha_mroonga::wrapper_disable_indexes(uint mode) +int ha_mroonga::wrapper_disable_indexes(key_map map, bool persist) { int error = 0; MRN_DBUG_ENTER_METHOD(); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); - error = wrap_handler->ha_disable_indexes(mode); + error = wrap_handler->ha_disable_indexes(map, persist); MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); if (error == HA_ERR_WRONG_COMMAND) { error = 0; } if (!error) { - error = wrapper_disable_indexes_mroonga(mode); + error = wrapper_disable_indexes_mroonga(map, persist); } DBUG_RETURN(error); } -int ha_mroonga::storage_disable_indexes(uint mode) +int ha_mroonga::storage_disable_indexes(key_map map, bool persist) { int error = 0; MRN_DBUG_ENTER_METHOD(); - if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { - uint i; - for (i = 0; i < table_share->keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (!grn_index_tables[i]) { - DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); - DBUG_RETURN(0); - } + uint i; + for (i = 0; i < table_share->keys; i++) { + if (i == table->s->primary_key) { + continue; + } + if (!grn_index_tables[i]) { + DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); + DBUG_RETURN(0); + } + } + KEY *key_info = table_share->key_info; + for (i = 0; i < table_share->keys; i++) { + if (i == table->s->primary_key) { + continue; + } + if (map.is_set(i)) { + continue; } - KEY *key_info = table_share->key_info; - for (i = 0; i < table_share->keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE && - (key_info[i].flags & HA_NOSAME)) { - continue; - } - int sub_error = generic_disable_index(i, key_info); - if (error != 0 && sub_error != 0) { - error = sub_error; - } + int sub_error = generic_disable_index(i, key_info); + if (error != 0 && sub_error != 0) { + error = sub_error; } - } else { - DBUG_RETURN(HA_ERR_WRONG_COMMAND); } DBUG_RETURN(error); } -int ha_mroonga::disable_indexes(uint mode) +int ha_mroonga::disable_indexes(key_map map, bool persist) { int error = 0; MRN_DBUG_ENTER_METHOD(); if (share->wrapper_mode) { - error = wrapper_disable_indexes(mode); + error = wrapper_disable_indexes(map, persist); } else { - error = storage_disable_indexes(mode); + error = storage_disable_indexes(map, persist); } DBUG_RETURN(error); } -int ha_mroonga::wrapper_enable_indexes_mroonga(uint mode) +int ha_mroonga::wrapper_enable_indexes_mroonga(key_map map, bool persist) { int error = 0; MRN_DBUG_ENTER_METHOD(); - if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { - uint i, j; - for (i = 0; i < table_share->keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (share->wrap_key_nr[i] < MAX_KEY) { - continue; - } - if (!grn_index_columns[i]) { - break; - } + uint i, j; + for (i = 0; i < table_share->keys; i++) { + if (i == table->s->primary_key) { + continue; } - if (i == table_share->keys) { - DBUG_PRINT("info", ("mroonga: keys are enabled already")); - DBUG_RETURN(0); + if (share->wrap_key_nr[i] < MAX_KEY) { + continue; + } + if (!grn_index_columns[i]) { + break; + } + } + if (i == table_share->keys) { + DBUG_PRINT("info", ("mroonga: keys are enabled already")); + DBUG_RETURN(0); + } + KEY *p_key_info = &table->key_info[table_share->primary_key]; + KEY *key_info = table_share->key_info; + uint n_keys = table_share->keys; + MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, n_keys); + MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, n_keys); + bitmap_clear_all(table->read_set); + mrn_set_bitmap_by_key(table->read_set, p_key_info); + mrn::PathMapper mapper(share->table_name); + for (i = 0, j = 0; i < n_keys; i++) { + if (!(key_info[i].flags & HA_FULLTEXT) && + !mrn_is_geo_key(&key_info[i])) { + j++; + continue; } - KEY *p_key_info = &table->key_info[table_share->primary_key]; - KEY *key_info = table_share->key_info; - uint n_keys = table_share->keys; - MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, n_keys); - MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, n_keys); - bitmap_clear_all(table->read_set); - mrn_set_bitmap_by_key(table->read_set, p_key_info); - mrn::PathMapper mapper(share->table_name); - for (i = 0, j = 0; i < n_keys; i++) { - if (!(key_info[i].flags & HA_FULLTEXT) && - !mrn_is_geo_key(&key_info[i])) { - j++; - continue; - } - if ((error = mrn_add_index_param(share, &key_info[i], i))) - { - break; - } - index_tables[i] = NULL; - index_columns[i] = NULL; - if (!grn_index_columns[i]) { - if ( - (key_info[i].flags & HA_FULLTEXT) && - (error = wrapper_create_index_fulltext(mapper.table_name(), - i, &key_info[i], - index_tables, index_columns, - share)) - ) { - break; - } else if ( - mrn_is_geo_key(&key_info[i]) && - (error = wrapper_create_index_geo(mapper.table_name(), - i, &key_info[i], - index_tables, index_columns, - share)) - ) { - break; - } - grn_index_columns[i] = index_columns[i]; - } - mrn_set_bitmap_by_key(table->read_set, &key_info[i]); - } - if (!error && i > j) + if ((error = mrn_add_index_param(share, &key_info[i], i))) { - error = wrapper_fill_indexes(ha_thd(), table->key_info, index_columns, - n_keys); + break; } - bitmap_set_all(table->read_set); - MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); - MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); - } else { - error = HA_ERR_WRONG_COMMAND; + index_tables[i] = NULL; + index_columns[i] = NULL; + if (!grn_index_columns[i]) { + if ( + (key_info[i].flags & HA_FULLTEXT) && + (error = wrapper_create_index_fulltext(mapper.table_name(), + i, &key_info[i], + index_tables, index_columns, + share)) + ) { + break; + } else if ( + mrn_is_geo_key(&key_info[i]) && + (error = wrapper_create_index_geo(mapper.table_name(), + i, &key_info[i], + index_tables, index_columns, + share)) + ) { + break; + } + grn_index_columns[i] = index_columns[i]; + } + mrn_set_bitmap_by_key(table->read_set, &key_info[i]); } + if (!error && i > j) + { + error = wrapper_fill_indexes(ha_thd(), table->key_info, index_columns, + n_keys); + } + bitmap_set_all(table->read_set); + MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); + MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); DBUG_RETURN(error); } -int ha_mroonga::wrapper_enable_indexes(uint mode) +int ha_mroonga::wrapper_enable_indexes(key_map map, bool persist) { int error = 0; MRN_DBUG_ENTER_METHOD(); - int mroonga_error = wrapper_enable_indexes_mroonga(mode); + int mroonga_error = wrapper_enable_indexes_mroonga(map, persist); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); - error = wrap_handler->ha_enable_indexes(mode); + error = wrap_handler->ha_enable_indexes(map, persist); MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); if (error == HA_ERR_WRONG_COMMAND) { @@ -13824,95 +13811,86 @@ int ha_mroonga::wrapper_enable_indexes(uint mode) DBUG_RETURN(error); } -int ha_mroonga::storage_enable_indexes(uint mode) +int ha_mroonga::storage_enable_indexes(key_map map, bool persist) { int error = 0; uint n_keys = table_share->keys; MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, n_keys); MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, n_keys); bool have_multiple_column_index = false; - bool skip_unique_key = (mode == HA_KEY_SWITCH_NONUNIQ_SAVE); MRN_DBUG_ENTER_METHOD(); - if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { - uint i; - for (i = 0; i < table_share->keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (!grn_index_columns[i]) { - break; - } + uint i; + for (i = 0; i < n_keys; i++) { + if (i == table->s->primary_key) { + continue; } - if (i == table_share->keys) { - DBUG_PRINT("info", ("mroonga: keys are enabled already")); - MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); - MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); - DBUG_RETURN(0); + if (!grn_index_columns[i]) { + break; + } + } + if (i == n_keys) { + DBUG_PRINT("info", ("mroonga: keys are enabled already")); + MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); + MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); + DBUG_RETURN(0); + } + KEY *key_info = table->key_info; + bitmap_clear_all(table->read_set); + mrn::PathMapper mapper(share->table_name); + for (; i < n_keys; i++) { + if (!map.is_set(i)) { + continue; } - KEY *key_info = table->key_info; - bitmap_clear_all(table->read_set); - mrn::PathMapper mapper(share->table_name); - for (i = 0; i < n_keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (skip_unique_key && (key_info[i].flags & HA_NOSAME)) { - continue; - } - if ((error = mrn_add_index_param(share, &key_info[i], i))) + if ((error = mrn_add_index_param(share, &key_info[i], i))) + { + break; + } + index_tables[i] = NULL; + if (!grn_index_columns[i]) { + if ((error = storage_create_index(table, mapper.table_name(), grn_table, + share, &key_info[i], index_tables, + index_columns, i))) { break; } - index_tables[i] = NULL; - if (!grn_index_columns[i]) { - if ((error = storage_create_index(table, mapper.table_name(), grn_table, - share, &key_info[i], index_tables, - index_columns, i))) - { - break; - } - if ( - KEY_N_KEY_PARTS(&(key_info[i])) != 1 && - !(key_info[i].flags & HA_FULLTEXT) - ) { - mrn_set_bitmap_by_key(table->read_set, &key_info[i]); - have_multiple_column_index = true; - } - grn_index_tables[i] = index_tables[i]; - grn_index_columns[i] = index_columns[i]; - } else { - index_columns[i] = NULL; + if ( + KEY_N_KEY_PARTS(&(key_info[i])) != 1 && + !(key_info[i].flags & HA_FULLTEXT) + ) { + mrn_set_bitmap_by_key(table->read_set, &key_info[i]); + have_multiple_column_index = true; } + grn_index_tables[i] = index_tables[i]; + grn_index_columns[i] = index_columns[i]; + } else { + index_columns[i] = NULL; } - if (!error && have_multiple_column_index) - { - error = storage_add_index_multiple_columns(key_info, n_keys, - index_tables, - index_columns, - skip_unique_key); - } - bitmap_set_all(table->read_set); - } else { - MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); - MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); - DBUG_RETURN(HA_ERR_WRONG_COMMAND); } + if (!error && have_multiple_column_index) + { + bool skip_unique_key= !table->s->keys_in_use.is_clear_all(); + error = storage_add_index_multiple_columns(key_info, n_keys, + index_tables, + index_columns, + skip_unique_key); + } + bitmap_set_all(table->read_set); MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); DBUG_RETURN(error); } -int ha_mroonga::enable_indexes(uint mode) +int ha_mroonga::enable_indexes(key_map map, bool persist) { int error = 0; MRN_DBUG_ENTER_METHOD(); share->disable_keys = false; if (share->wrapper_mode) { - error = wrapper_enable_indexes(mode); + error = wrapper_enable_indexes(map, persist); } else { - error = storage_enable_indexes(mode); + error = storage_enable_indexes(map, persist); } DBUG_RETURN(error); } diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp index 66767899e21..6bf971aa347 100644 --- a/storage/mroonga/ha_mroonga.hpp +++ b/storage/mroonga/ha_mroonga.hpp @@ -542,8 +542,8 @@ public: bool is_crashed() const mrn_override; bool auto_repair(int error) const mrn_override; bool auto_repair() const; - int disable_indexes(uint mode) mrn_override; - int enable_indexes(uint mode) mrn_override; + int disable_indexes(key_map map, bool persist) mrn_override; + int enable_indexes(key_map map, bool persist) mrn_override; int check(THD* thd, HA_CHECK_OPT* check_opt) mrn_override; int repair(THD* thd, HA_CHECK_OPT* check_opt) mrn_override; bool check_and_repair(THD *thd) mrn_override; @@ -1140,12 +1140,12 @@ private: bool wrapper_auto_repair(int error) const; bool storage_auto_repair(int error) const; int generic_disable_index(int i, KEY *key_info); - int wrapper_disable_indexes_mroonga(uint mode); - int wrapper_disable_indexes(uint mode); - int storage_disable_indexes(uint mode); - int wrapper_enable_indexes_mroonga(uint mode); - int wrapper_enable_indexes(uint mode); - int storage_enable_indexes(uint mode); + int wrapper_disable_indexes_mroonga(key_map map, bool persist); + int wrapper_disable_indexes(key_map map, bool persist); + int storage_disable_indexes(key_map map, bool persist); + int wrapper_enable_indexes_mroonga(key_map map, bool persist); + int wrapper_enable_indexes(key_map map, bool persist); + int storage_enable_indexes(key_map map, bool persist); int wrapper_check(THD* thd, HA_CHECK_OPT* check_opt); int storage_check(THD* thd, HA_CHECK_OPT* check_opt); int wrapper_fill_indexes(THD *thd, KEY *key_info, diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 59171cfcbcd..022a7bb6819 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1569,40 +1569,37 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt) SYNOPSIS disable_indexes() - mode mode of operation: - HA_KEY_SWITCH_NONUNIQ disable all non-unique keys - HA_KEY_SWITCH_ALL disable all keys - HA_KEY_SWITCH_NONUNIQ_SAVE dis. non-uni. and make persistent - HA_KEY_SWITCH_ALL_SAVE dis. all keys and make persistent - IMPLEMENTATION - HA_KEY_SWITCH_NONUNIQ is not implemented. - HA_KEY_SWITCH_ALL_SAVE is not implemented. + DESCRIPTION + See handler::ha_disable_indexes() RETURN 0 ok HA_ERR_WRONG_COMMAND mode not implemented. */ -int ha_myisam::disable_indexes(uint mode) +int ha_myisam::disable_indexes(key_map map, bool persist) { int error; - if (mode == HA_KEY_SWITCH_ALL) + if (!persist) { /* call a storage engine function to switch the key map */ + DBUG_ASSERT(map.is_clear_all()); error= mi_disable_indexes(file); } - else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE) - { - mi_extra(file, HA_EXTRA_NO_KEYS, 0); - info(HA_STATUS_CONST); // Read new key info - error= 0; - } else { - /* mode not implemented */ - error= HA_ERR_WRONG_COMMAND; + ulonglong ullmap= map.to_ulonglong(); + + /* make sure auto-inc key is enabled even if it's > 64 */ + if (map.length() > MI_KEYMAP_BITS && + table->s->next_number_index < MAX_KEY) + mi_set_key_active(ullmap, table->s->next_number_index); + + mi_extra(file, HA_EXTRA_NO_KEYS, &ullmap); + info(HA_STATUS_CONST); // Read new key info + error= 0; } return error; } @@ -1613,21 +1610,14 @@ int ha_myisam::disable_indexes(uint mode) SYNOPSIS enable_indexes() - mode mode of operation: - HA_KEY_SWITCH_NONUNIQ enable all non-unique keys - HA_KEY_SWITCH_ALL enable all keys - HA_KEY_SWITCH_NONUNIQ_SAVE en. non-uni. and make persistent - HA_KEY_SWITCH_ALL_SAVE en. all keys and make persistent DESCRIPTION Enable indexes, which might have been disabled by disable_index() before. - The modes without _SAVE work only if both data and indexes are empty, + If persist=false, it works only if both data and indexes are empty, since the MyISAM repair would enable them persistently. To be sure in these cases, call handler::delete_all_rows() before. - IMPLEMENTATION - HA_KEY_SWITCH_NONUNIQ is not implemented. - HA_KEY_SWITCH_ALL_SAVE is not implemented. + See also handler::ha_enable_indexes() RETURN 0 ok @@ -1636,7 +1626,7 @@ int ha_myisam::disable_indexes(uint mode) HA_ERR_WRONG_COMMAND mode not implemented. */ -int ha_myisam::enable_indexes(uint mode) +int ha_myisam::enable_indexes(key_map map, bool persist) { int error; DBUG_ENTER("ha_myisam::enable_indexes"); @@ -1650,7 +1640,8 @@ int ha_myisam::enable_indexes(uint mode) DBUG_RETURN(0); } - if (mode == HA_KEY_SWITCH_ALL) + DBUG_ASSERT(map.is_prefix(table->s->keys)); + if (!persist) { error= mi_enable_indexes(file); /* @@ -1659,7 +1650,7 @@ int ha_myisam::enable_indexes(uint mode) but mode==HA_KEY_SWITCH_ALL forbids it. */ } - else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE) + else { THD *thd= table->in_use; int was_error= thd->is_error(); @@ -1719,11 +1710,6 @@ int ha_myisam::enable_indexes(uint mode) restore_vcos_after_repair(); } - else - { - /* mode not implemented */ - error= HA_ERR_WRONG_COMMAND; - } DBUG_RETURN(error); } @@ -1886,7 +1872,7 @@ int ha_myisam::end_bulk_insert() setting the indexes as active and trying to recreate them. */ - if (((first_error= enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE)) != 0) && + if (((first_error= enable_indexes(key_map(table->s->keys), true))) && table->in_use->killed) { delete_all_rows(); diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h index c4c46a63afa..e0121dbeb51 100644 --- a/storage/myisam/ha_myisam.h +++ b/storage/myisam/ha_myisam.h @@ -109,8 +109,8 @@ class ha_myisam final : public handler int external_lock(THD *thd, int lock_type); int delete_all_rows(void); int reset_auto_increment(ulonglong value); - int disable_indexes(uint mode); - int enable_indexes(uint mode); + int disable_indexes(key_map map, bool persist); + int enable_indexes(key_map map, bool persist); int indexes_are_disabled(void); void start_bulk_insert(ha_rows rows, uint flags); int end_bulk_insert(); diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c index 4f3326098f6..4ce138e888c 100644 --- a/storage/myisam/mi_extra.c +++ b/storage/myisam/mi_extra.c @@ -225,16 +225,9 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) } if (mi_is_any_key_active(share->state.key_map)) { - MI_KEYDEF *key=share->keyinfo; - uint i; - for (i=0 ; i < share->base.keys ; i++,key++) - { - if (!(key->flag & HA_NOSAME) && info->s->base.auto_key != i+1) - { - mi_clear_key_active(share->state.key_map, i); - info->update|= HA_STATE_CHANGED; - } - } + if (share->state.key_map != *(ulonglong*)extra_arg) + info->update|= HA_STATE_CHANGED; + share->state.key_map= *(ulonglong*)extra_arg; if (!share->changed) { diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index ba0fd150dcf..997f57ab6c8 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -11774,27 +11774,35 @@ bool ha_spider::auto_repair() const } int ha_spider::disable_indexes( - uint mode + key_map map, bool persist ) { int error_num; backup_error_status(); DBUG_ENTER("ha_spider::disable_indexes"); DBUG_PRINT("info",("spider this=%p", this)); - if ((error_num = spider_db_disable_keys(this))) - DBUG_RETURN(check_error_mode(error_num)); - DBUG_RETURN(0); + if (persist) + { + if ((error_num = spider_db_disable_keys(this))) + DBUG_RETURN(check_error_mode(error_num)); + DBUG_RETURN(0); + } + DBUG_RETURN(HA_ERR_WRONG_COMMAND); } int ha_spider::enable_indexes( - uint mode + key_map map, bool persist ) { int error_num; backup_error_status(); DBUG_ENTER("ha_spider::enable_indexes"); DBUG_PRINT("info",("spider this=%p", this)); - if ((error_num = spider_db_enable_keys(this))) - DBUG_RETURN(check_error_mode(error_num)); - DBUG_RETURN(0); + if (persist) + { + if ((error_num = spider_db_enable_keys(this))) + DBUG_RETURN(check_error_mode(error_num)); + DBUG_RETURN(0); + } + DBUG_RETURN(HA_ERR_WRONG_COMMAND); } diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index b1301d91cab..89b39d585fa 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -791,10 +791,10 @@ public: bool auto_repair() const; #endif int disable_indexes( - uint mode + key_map map, bool persist ); int enable_indexes( - uint mode + key_map map, bool persist ); int check( THD* thd, From 98b157fdee40f74f935f24efff65e66dbe421b5a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 4 May 2024 17:05:29 +0200 Subject: [PATCH 54/74] cleanup: unused OPT_xxx and client_priv.h --- client/client_priv.h | 74 +++++++-------------------------- client/mysql.cc | 47 ++++++++++----------- client/mysql_upgrade.c | 10 ++--- client/mysqladmin.cc | 18 ++++---- client/mysqlbinlog.cc | 33 +++++++-------- client/mysqlcheck.c | 24 +++++------ client/mysqldump.c | 73 ++++++++++++++++---------------- client/mysqlimport.c | 30 ++++++------- client/mysqlshow.c | 14 +++---- client/mysqlslap.c | 57 ++++++++++++------------- extra/mariabackup/xtrabackup.cc | 4 +- include/sslopt-longopts.h | 10 ++--- 12 files changed, 169 insertions(+), 225 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index 16547494d03..ae5701d28b3 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -1,6 +1,6 @@ /* Copyright (c) 2001, 2012, Oracle and/or its affiliates. - Copyright (c) 2009, 2022, MariaDB + Copyright (c) 2009, 2024, MariaDB 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 @@ -38,74 +38,32 @@ enum options_client { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_PAGER, OPT_TEE, - OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS, - OPT_DROP, OPT_LOCKS, OPT_KEYWORDS, OPT_DELAYED, OPT_OPTIMIZE, - OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES, - OPT_MASTER_DATA, OPT_AUTOCOMMIT, OPT_AUTO_REHASH, - OPT_LINE_NUMBERS, OPT_COLUMN_NAMES, OPT_CONNECT_TIMEOUT, - OPT_MAX_ALLOWED_PACKET, OPT_NET_BUFFER_LENGTH, - OPT_SELECT_LIMIT, OPT_MAX_JOIN_SIZE, OPT_SSL_SSL, + OPT_OPTIMIZE, + OPT_TABLES, + OPT_MASTER_DATA, OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH, - OPT_SSL_CIPHER, OPT_TLS_VERSION, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE, - OPT_DELETE_MASTER_LOGS, OPT_COMPACT, - OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, - OPT_FRM, OPT_SKIP_OPTIMIZATION, - OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH, - OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG, - OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, - OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT, - OPT_FLUSH_TABLES, - OPT_TRIGGERS, - OPT_MYSQL_ONLY_PRINT, - OPT_MYSQL_LOCK_DIRECTORY, - OPT_USE_THREADS, - OPT_IMPORT_USE_THREADS, - OPT_MYSQL_NUMBER_OF_QUERY, + OPT_SSL_CIPHER, OPT_LOCAL_INFILE, + OPT_COMPACT, + OPT_MYSQL_PROTOCOL, + OPT_SKIP_OPTIMIZATION, + OPT_COMPATIBLE, OPT_DELIMITER, + OPT_SERVER_ARG, + OPT_START_DATETIME, OPT_STOP_DATETIME, OPT_IGNORE_DATABASE, - OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE, - OPT_TZ_UTC, OPT_CREATE_SLAP_SCHEMA, - OPT_MYSQLDUMP_SLAVE_APPLY, + OPT_IGNORE_TABLE, OPT_MYSQLDUMP_SLAVE_DATA, - OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT, -#ifdef WHEN_FLASHBACK_REVIEW_READY - OPT_REVIEW, - OPT_REVIEW_DBNAME, OPT_REVIEW_TABLENAME, -#endif - OPT_SLAP_CSV, OPT_SLAP_CREATE_STRING, - OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, OPT_SLAP_AUTO_GENERATE_WRITE_NUM, - OPT_SLAP_AUTO_GENERATE_ADD_AUTO, - OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY, - OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES, - OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES, - OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM, - OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM, - OPT_SLAP_PRE_QUERY, - OPT_SLAP_POST_QUERY, - OPT_SLAP_PRE_SYSTEM, - OPT_SLAP_POST_SYSTEM, - OPT_SLAP_COMMIT, - OPT_SLAP_DETACH, - OPT_SLAP_NO_DROP, - OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT_MODE, OPT_SERVER_ID, - OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, - OPT_AUTO_VERTICAL_OUTPUT, - OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, - OPT_WRITE_BINLOG, OPT_DUMP_DATE, - OPT_INIT_COMMAND, + OPT_SLAP_CSV, + OPT_BASE64_OUTPUT_MODE, + OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, + OPT_WRITE_BINLOG, OPT_PLUGIN_DIR, OPT_DEFAULT_AUTH, - OPT_ABORT_SOURCE_ON_ERROR, OPT_REWRITE_DB, - OPT_REPORT_PROGRESS, - OPT_SKIP_ANNOTATE_ROWS_EVENTS, OPT_SSL_CRL, OPT_SSL_CRLPATH, OPT_IGNORE_DATA, OPT_PRINT_ROW_COUNT, OPT_PRINT_ROW_EVENT_POSITIONS, OPT_CHECK_IF_UPGRADE_NEEDED, OPT_COMPATIBILTY_CLEARTEXT_PLUGIN, - OPT_SHUTDOWN_WAIT_FOR_SLAVES, - OPT_COPY_S3_TABLES, - OPT_PRINT_TABLE_METADATA, OPT_MAX_CLIENT_OPTION /* should be always the last */ }; diff --git a/client/mysql.cc b/client/mysql.cc index a598ab7e5ff..c6f1a4662cf 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2018, Oracle and/or its affiliates. - Copyright (c) 2009, 2022, MariaDB Corporation. + Copyright (c) 2009, 2024, 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 @@ -1500,11 +1500,11 @@ static struct my_option my_long_options[] = 0, 0, 0, 0, 0}, {"help", 'I', "Synonym for -?", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"abort-source-on-error", OPT_ABORT_SOURCE_ON_ERROR, + {"abort-source-on-error", 0, "Abort 'source filename' operations in case of errors", &batch_abort_on_error, &batch_abort_on_error, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-rehash", OPT_AUTO_REHASH, + {"auto-rehash", 0, "Enable automatic rehashing. One doesn't need to use 'rehash' to get table " "and field completion, but startup and reconnecting may take a longer time. " "Disable with --disable-auto-rehash.", @@ -1515,7 +1515,7 @@ static struct my_option my_long_options[] = "completion. This gives a quicker start of mysql and disables rehashing " "on reconnect.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-vertical-output", OPT_AUTO_VERTICAL_OUTPUT, + {"auto-vertical-output", 0, "Automatically switch to vertical output mode if the result is wider " "than the terminal width.", &auto_vertical_output, &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0, @@ -1528,7 +1528,7 @@ static struct my_option my_long_options[] = {"character-sets-dir", OPT_CHARSETS_DIR, "Directory for character set files.", &charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"column-type-info", OPT_COLUMN_TYPES, "Display column type information.", + {"column-type-info", 0, "Display column type information.", &column_types_flag, &column_types_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"comments", 'c', "Preserve comments. Send comments to the server." @@ -1545,14 +1545,14 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log.", &default_dbug_option, &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"database", 'D', "Database to use.", ¤t_db, ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default-character-set", OPT_DEFAULT_CHARSET, + {"default-character-set", 0, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str, @@ -1578,7 +1578,7 @@ static struct my_option my_long_options[] = {"ignore-spaces", 'i', "Ignore space after function names.", &ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"init-command", OPT_INIT_COMMAND, + {"init-command", 0, "SQL Command to execute when connecting to MariaDB server. Will " "automatically be re-executed when reconnecting.", &opt_init_command, &opt_init_command, 0, @@ -1593,20 +1593,20 @@ static struct my_option my_long_options[] = 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.", + {"line-numbers", 0, "Write line numbers for errors.", &line_numbers, &line_numbers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered, &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"column-names", OPT_COLUMN_NAMES, "Write column names in results.", + {"column-names", 0, "Write column names in results.", &column_names, &column_names, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"skip-column-names", 'N', "Don't write column names in results.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C).", + {"sigint-ignore", 0, "Ignore SIGINT (CTRL-C).", &opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"one-database", 'o', @@ -1637,11 +1637,11 @@ static struct my_option my_long_options[] = "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", &opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"progress-reports", OPT_REPORT_PROGRESS, + {"progress-reports", 0, "Get progress reports for long running commands (like ALTER TABLE)", &opt_progress_reports, &opt_progress_reports, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"prompt", OPT_PROMPT, "Set the command line prompt to this value.", + {"prompt", 0, "Set the command line prompt to this value.", ¤t_prompt, ¤t_prompt, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).", @@ -1654,7 +1654,7 @@ static struct my_option my_long_options[] = {"raw", 'r', "Write fields without conversion. Used with --batch.", &opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable " + {"reconnect", 0, "Reconnect if the connection is lost. Disable " "with --disable-reconnect. This option is enabled by default.", &opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"silent", 's', "Be more silent. Print results with a tab as separator, " @@ -1686,39 +1686,38 @@ static struct my_option my_long_options[] = GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"connect_timeout", OPT_CONNECT_TIMEOUT, - "Number of seconds before connection timeout.", + {"connect_timeout", 0, "Number of seconds before connection timeout.", &opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0, 0, 0}, - {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, + {"max_allowed_packet", 0, "The maximum packet length to send to or receive from server.", &opt_max_allowed_packet, &opt_max_allowed_packet, 0, GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096, (longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, - {"net_buffer_length", OPT_NET_BUFFER_LENGTH, + {"net_buffer_length", 0, "The buffer size for TCP/IP and socket communication.", &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG, REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0}, - {"select_limit", OPT_SELECT_LIMIT, + {"select_limit", 0, "Automatic limit for SELECT when using --safe-updates.", &select_limit, &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX, 0, 1, 0}, - {"max_join_size", OPT_MAX_JOIN_SIZE, + {"max_join_size", 0, "Automatic limit for rows in a join when using --safe-updates.", &max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ULONG_MAX, 0, 1, 0}, - {"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it" + {"secure-auth", 0, "Refuse client connecting to server if it" " uses old (pre-4.1.1) protocol.", &opt_secure_auth, &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.", + {"show-warnings", 0, "Show warnings after every statement.", &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 36c73f69716..b303ffd099a 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -1,6 +1,6 @@ /* Copyright (c) 2006, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2017, MariaDB + Copyright (c) 2010, 2024, MariaDB 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 @@ -87,10 +87,10 @@ static struct my_option my_long_options[]= {"basedir", 'b', "Not used by mysql_upgrade. Only for backward compatibility.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"character-sets-dir", OPT_CHARSETS_DIR, + {"character-sets-dir", 0, "Not used by mysql_upgrade. Only for backward compatibility.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, - {"compress", OPT_COMPRESS, + {"compress", 0, "Not used by mysql_upgrade. Only for backward compatibility.", ¬_used, ¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"datadir", 'd', @@ -103,12 +103,12 @@ static struct my_option my_long_options[]= {"debug", '#', "Output debug log.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"default-character-set", OPT_DEFAULT_CHARSET, + {"default-character-set", 0, "Not used by mysql_upgrade. Only for backward compatibility.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"default_auth", OPT_DEFAULT_AUTH, diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 3f73d7c38fd..098e7ef7c83 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2010, 2019, MariaDB + Copyright (c) 2010, 2024, MariaDB 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 @@ -141,10 +141,10 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", + {"debug-info", 0, "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"force", 'f', @@ -158,7 +158,7 @@ static struct my_option my_long_options[] = {"character-sets-dir", OPT_CHARSETS_DIR, "Directory for character set files.", &charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default-character-set", OPT_DEFAULT_CHARSET, + {"default-character-set", 0, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, @@ -214,21 +214,21 @@ static struct my_option my_long_options[] = 0, 0, 0}, {"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"connect_timeout", OPT_CONNECT_TIMEOUT, "", &opt_connect_timeout, + {"connect_timeout", 0, "", &opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0, 3600*12, 0, 1, 0}, - {"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout, + {"shutdown_timeout", 0, "", &opt_shutdown_timeout, &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG, SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0}, - {"wait_for_all_slaves", OPT_SHUTDOWN_WAIT_FOR_SLAVES, + {"wait_for_all_slaves", 0, "Defers shutdown until after all binlogged events have been sent to " "all connected slaves", &opt_shutdown_wait_for_slaves, &opt_shutdown_wait_for_slaves, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 6abfd32208d..6324e5a7242 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2020, MariaDB + Copyright (c) 2009, 2024, MariaDB 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 @@ -1530,7 +1530,7 @@ static struct my_option my_options[] = like this: SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`; */ - {"character-sets-dir", OPT_CHARSETS_DIR, + {"character-sets-dir", 0, "Directory for character set files.", &charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"database", 'd', "List entries for just this database (local log only).", @@ -1540,13 +1540,13 @@ static struct my_option my_options[] = {"debug", '#', "Output debug log.", ¤t_dbug_option, ¤t_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", 0, "Check memory and open file usage at exit .", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", + {"debug-info", 0, "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1582,7 +1582,7 @@ static struct my_option my_options[] = 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', "Password to connect to remote server.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugindir, &opt_plugindir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection or 0 for default to, in " @@ -1608,14 +1608,14 @@ static struct my_option my_options[] = &result_file_name, &result_file_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #ifdef WHEN_FLASHBACK_REVIEW_READY - {"review", opt_flashback_review, "Print review sql in output file.", + {"review", 0, "Print review sql in output file.", &opt_flashback_review, &opt_flashback_review, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"review-dbname", opt_flashback_flashback_review_dbname, + {"review-dbname", 0, "Writing flashback original row data into this db", &flashback_review_dbname, &flashback_review_dbname, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"review-tablename", opt_flashback_flashback_review_tablename, + {"review-tablename", 0, "Writing flashback original row data into this table", &flashback_review_tablename, &flashback_review_tablename, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1632,7 +1632,7 @@ static struct my_option my_options[] = "Extract only binlog entries created by the server having the given id.", &server_id, &server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"set-charset", OPT_SET_CHARSET, + {"set-charset", 0, "Add 'SET NAMES character_set' to the output.", &charset, &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"short-form", 's', "Just show regular queries: no extra info, no " @@ -1680,7 +1680,7 @@ static struct my_option my_options[] = "The slave server_id used for --read-from-remote-server --stop-never.", &opt_stop_never_slave_server_id, &opt_stop_never_slave_server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"stop-position", OPT_STOP_POSITION, + {"stop-position", 0, "Stop reading the binlog at position N. Applies to the last binlog " "passed on the command line.", &stop_position, &stop_position, 0, GET_ULL, @@ -1703,7 +1703,7 @@ that may lead to an endless loop.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"open_files_limit", OPT_OPEN_FILES_LIMIT, + {"open_files_limit", 0, "Used to reserve file descriptors for use by this program.", &open_files_limit, &open_files_limit, 0, GET_ULONG, REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0}, @@ -1729,12 +1729,12 @@ that may lead to an endless loop.", "Updates to a database with a different name than the original. \ Example: rewrite-db='from->to'.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"skip-annotate-row-events", OPT_SKIP_ANNOTATE_ROWS_EVENTS, + {"skip-annotate-row-events", 0, "Don't print Annotate_rows events stored in the binary log.", (uchar**) &opt_skip_annotate_row_events, (uchar**) &opt_skip_annotate_row_events, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"print-table-metadata", OPT_PRINT_TABLE_METADATA, + {"print-table-metadata", 0, "Print metadata stored in Table_map_log_event", &opt_print_table_metadata, &opt_print_table_metadata, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -1948,11 +1948,6 @@ get_one_option(const struct my_option *opt, const char *argument, const char *) die(1); } break; -#ifdef WHEN_FLASHBACK_REVIEW_READY - case opt_flashback_review: - opt_flashback_review= 1; - break; -#endif case OPT_START_DATETIME: start_datetime= convert_str_to_timestamp(start_datetime_str); break; diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 34cbcadbdf5..da71656c9e4 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -1,6 +1,6 @@ /* Copyright (c) 2001, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2012, MariaDB + Copyright (c) 2010, 2024, MariaDB 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 @@ -81,11 +81,11 @@ static struct my_option my_long_options[] = "Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.", &opt_all_in_1, &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-repair", OPT_AUTO_REPAIR, + {"auto-repair", 0, "If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.", &opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"character-sets-dir", OPT_CHARSETS_DIR, + {"character-sets-dir", 0, "Directory for character set files.", (char**) &charsets_dir, (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, @@ -96,7 +96,7 @@ static struct my_option my_long_options[] = {"check-upgrade", 'g', "Check tables for version-dependent changes. May be used with --auto-repair to correct tables requiring version-dependent updates.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"compress", OPT_COMPRESS, "Use compression in server/client protocol.", + {"compress", 0, "Use compression in server/client protocol.", &opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"databases", 'B', @@ -110,16 +110,16 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", + {"debug-info", 0, "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"default-character-set", OPT_DEFAULT_CHARSET, + {"default-character-set", 0, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -139,7 +139,7 @@ static struct my_option my_long_options[] = "If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will force using old slow repair with keycache method, instead of much faster repair by sorting.", &opt_extended, &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"flush", OPT_FLUSH_TABLES, "Flush each table after check. This is useful if you don't want to have the checked tables take up space in the caches after the check", + {"flush", 0, "Flush each table after check. This is useful if you don't want to have the checked tables take up space in the caches after the check", &opt_flush_tables, &opt_flush_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG, @@ -149,7 +149,7 @@ static struct my_option my_long_options[] = {"medium-check", 'm', "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"write-binlog", OPT_WRITE_BINLOG, + {"write-binlog", 0, "Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Use --skip-write-binlog " "when commands should not be sent to replication slaves.", &opt_write_binlog, &opt_write_binlog, 0, GET_BOOL, NO_ARG, @@ -167,7 +167,7 @@ static struct my_option my_long_options[] = {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection or 0 for default to, in " @@ -198,7 +198,7 @@ static struct my_option my_long_options[] = #include {"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"use-frm", OPT_FRM, + {"use-frm", 0, "When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.", &opt_frm, &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/client/mysqldump.c b/client/mysqldump.c index 79339fc59b8..06ecc67cc97 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2020, MariaDB Corporation. + Copyright (c) 2010, 2024, 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 @@ -165,7 +165,6 @@ static my_bool server_supports_switching_charsets= TRUE; static ulong opt_compatible_mode= 0; #define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1 #define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2 -#define MYSQL_OPT_MAX_STATEMENT_TIME 0 #define MYSQL_OPT_SLAVE_DATA_EFFECTIVE_SQL 1 #define MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL 2 static uint opt_mysql_port= 0, opt_master_data; @@ -259,26 +258,26 @@ static struct my_option my_long_options[] = "Do not dump any tablespace information.", &opt_notspcs, &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"add-drop-database", OPT_DROP_DATABASE, "Add a DROP DATABASE before each create.", + {"add-drop-database", 0, "Add a DROP DATABASE before each create.", &opt_drop_database, &opt_drop_database, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"add-drop-table", OPT_DROP, "Add a DROP TABLE before each create.", + {"add-drop-table", 0, "Add a DROP TABLE before each create.", &opt_drop, &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"add-drop-trigger", 0, "Add a DROP TRIGGER before each create.", &opt_drop_trigger, &opt_drop_trigger, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"add-locks", OPT_LOCKS, "Add locks around INSERT statements.", + {"add-locks", 0, "Add locks around INSERT statements.", &opt_lock, &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"allow-keywords", OPT_KEYWORDS, + {"allow-keywords", 0, "Allow creation of column names that are keywords.", &opt_keywords, &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"apply-slave-statements", OPT_MYSQLDUMP_SLAVE_APPLY, + {"apply-slave-statements", 0, "Adds 'STOP SLAVE' prior to 'CHANGE MASTER' and 'START SLAVE' to bottom of dump.", &opt_slave_apply, &opt_slave_apply, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"character-sets-dir", OPT_CHARSETS_DIR, + {"character-sets-dir", 0, "Directory for character set files.", (char **)&charsets_dir, (char **)&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"comments", 'i', "Write additional information.", @@ -305,7 +304,7 @@ static struct my_option my_long_options[] = {"compress", 'C', "Use compression in server/client protocol.", &opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"copy_s3_tables", OPT_COPY_S3_TABLES, + {"copy_s3_tables", 0, "If 'no' S3 tables will be ignored, otherwise S3 tables will be copied as " " Aria tables and then altered to S3", &opt_copy_s3_tables, &opt_copy_s3_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, @@ -325,19 +324,19 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log.", (char *)&default_dbug_option, (char *)&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", + {"debug-info", 0, "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"default-character-set", OPT_DEFAULT_CHARSET, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED.", + {"delayed-insert", 0, "Insert rows with INSERT DELAYED.", &opt_delayed, &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"delete-master-logs", OPT_DELETE_MASTER_LOGS, + {"delete-master-logs", 0, "Delete logs on master after backup. This automatically enables --master-data.", &opt_delete_master_logs, &opt_delete_master_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -365,17 +364,17 @@ static struct my_option my_long_options[] = "Use multiple-row INSERT syntax that include several VALUES lists.", &extended_insert, &extended_insert, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"fields-terminated-by", OPT_FTB, + {"fields-terminated-by", 0, "Fields in the output file are terminated by the given string.", &fields_terminated, &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"fields-enclosed-by", OPT_ENC, + {"fields-enclosed-by", 0, "Fields in the output file are enclosed by the given character.", &enclosed, &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0}, - {"fields-optionally-enclosed-by", OPT_O_ENC, + {"fields-optionally-enclosed-by", 0, "Fields in the output file are optionally enclosed by the given character.", &opt_enclosed, &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0}, - {"fields-escaped-by", OPT_ESC, + {"fields-escaped-by", 0, "Fields in the output file are escaped by the given character.", &escaped, &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"flush-logs", 'F', "Flush logs file in server before starting dump. " @@ -389,7 +388,7 @@ static struct my_option my_long_options[] = "--lock-all-tables or --master-data with --flush-logs.", &flush_logs, &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement " + {"flush-privileges", 0, "Emit a FLUSH PRIVILEGES statement " "after dumping the mysql database. This option should be used any " "time the dump contains the mysql database and any other database " "that depends on the data in the mysql database for proper restore. ", @@ -407,7 +406,7 @@ static struct my_option my_long_options[] = 0, 0, 0, 0, 0, 0}, {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, " + {"hex-blob", 0, "Dump binary strings (BINARY, " "VARBINARY, BLOB) in hexadecimal format.", &opt_hex_blob, &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"host", 'h', "Connect to host.", ¤t_host, @@ -429,15 +428,15 @@ static struct my_option my_long_options[] = "be specified with both database and table names, e.g., " "--ignore-table=database.table.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"include-master-host-port", OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT, + {"include-master-host-port", 0, "Adds 'MASTER_HOST=, MASTER_PORT=' to 'CHANGE MASTER TO..' " "in dump produced with --dump-slave.", &opt_include_master_host_port, &opt_include_master_host_port, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.", + {"insert-ignore", 0, "Insert rows with INSERT IGNORE.", &opt_ignore, &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"lines-terminated-by", OPT_LTB, + {"lines-terminated-by", 0, "Lines in the output file are terminated by the given string.", &lines_terminated, &lines_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -448,7 +447,7 @@ static struct my_option my_long_options[] = 0, 0, 0, 0, 0, 0}, {"lock-tables", 'l', "Lock all tables for read.", &lock_tables, &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"log-error", OPT_ERROR_LOG_FILE, "Append warnings and errors to given file.", + {"log-error", 0, "Append warnings and errors to given file.", &log_error_file, &log_error_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"log-queries", 0, "When restoring the dump, the server will, if logging turned on, log the queries to the general and slow query log.", @@ -465,21 +464,21 @@ static struct my_option my_long_options[] = "Option automatically turns --lock-tables off.", &opt_master_data, &opt_master_data, 0, GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0}, - {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, + {"max_allowed_packet", 0, "The maximum packet length to send to or receive from server.", &opt_max_allowed_packet, &opt_max_allowed_packet, 0, GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, (longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, - {"max-statement-time", MYSQL_OPT_MAX_STATEMENT_TIME, + {"max-statement-time", 0, "Max statement execution time. If unset, overrides server default with 0.", &opt_max_statement_time, &opt_max_statement_time, 0, GET_DOUBLE, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"net_buffer_length", OPT_NET_BUFFER_LENGTH, + {"net_buffer_length", 0, "The buffer size for TCP/IP and socket communication.", &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L, MALLOC_OVERHEAD-1024, 1024, 0}, - {"no-autocommit", OPT_AUTOCOMMIT, + {"no-autocommit", 0, "Wrap tables with autocommit/commit statements.", &opt_autocommit, &opt_autocommit, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -502,7 +501,7 @@ static struct my_option my_long_options[] = {"opt", OPT_OPTIMIZE, "Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"order-by-primary", OPT_ORDER_BY_PRIMARY, + {"order-by-primary", 0, "Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.", &opt_order_by_primary, &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', @@ -523,7 +522,7 @@ static struct my_option my_long_options[] = {"quote-names",'Q', "Quote table and column names with backticks (`).", &opt_quoted, &opt_quoted, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"replace", OPT_MYSQL_REPLACE_INTO, "Use REPLACE INTO instead of INSERT INTO.", + {"replace", 0, "Use REPLACE INTO instead of INSERT INTO.", &opt_replace_into, &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"result-file", 'r', @@ -534,7 +533,7 @@ static struct my_option my_long_options[] = {"routines", 'R', "Dump stored routines (functions and procedures).", &opt_routines, &opt_routines, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"set-charset", OPT_SET_CHARSET, + {"set-charset", 0, "Add 'SET NAMES default_character_set' to the output.", &opt_set_charset, &opt_set_charset, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -543,7 +542,7 @@ static struct my_option my_long_options[] = will give bullet-proof binlog position only if server >=4.1.3. That's the old "FLUSH TABLES WITH READ LOCK does not block commit" fixed bug. */ - {"single-transaction", OPT_TRANSACTION, + {"single-transaction", 0, "Creates a consistent snapshot by dumping all tables in a single " "transaction. Works ONLY for tables stored in storage engines which " "support multiversioning (currently only InnoDB does); the dump is NOT " @@ -555,7 +554,7 @@ static struct my_option my_long_options[] = "isolated from them. Option automatically turns off --lock-tables.", &opt_single_transaction, &opt_single_transaction, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"dump-date", OPT_DUMP_DATE, "Put a dump date to the end of the output.", + {"dump-date", 0, "Put a dump date to the end of the output.", &opt_dump_date, &opt_dump_date, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"skip-opt", OPT_SKIP_OPTIMIZATION, @@ -565,7 +564,7 @@ static struct my_option my_long_options[] = &opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #include - {"system", 256, "Dump system tables as portable SQL", + {"system", 0, "Dump system tables as portable SQL", &opt_system, &opt_system, &opt_system_types, GET_SET, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"tab",'T', "Create tab-separated textfile for each table to given path. (Create .sql " @@ -574,10 +573,10 @@ static struct my_option my_long_options[] = &path, &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table.", + {"triggers", 0, "Dump triggers for each dumped table.", &opt_dump_triggers, &opt_dump_triggers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"tz-utc", OPT_TZ_UTC, + {"tz-utc", 0, "SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones.", &opt_tz_utc, &opt_tz_utc, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, #ifndef DONT_ALLOW_USER_CHANGE @@ -593,10 +592,10 @@ static struct my_option my_long_options[] = &where, &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/client/mysqlimport.c b/client/mysqlimport.c index d64e1daac50..b7c507e359d 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2011, 2022, MariaDB + Copyright (c) 2011, 2024, MariaDB 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 @@ -69,10 +69,10 @@ static char **argv_to_free; static struct my_option my_long_options[] = { - {"character-sets-dir", OPT_CHARSETS_DIR, + {"character-sets-dir", 0, "Directory for character set files.", (char**) &charsets_dir, (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default-character-set", OPT_DEFAULT_CHARSET, + {"default-character-set", 0, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"columns", 'c', @@ -84,31 +84,31 @@ static struct my_option my_long_options[] = 0, 0, 0}, {"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", + {"debug-info", 0, "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"delete", 'd', "First delete all rows from table.", &opt_delete, &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"fields-terminated-by", OPT_FTB, + {"fields-terminated-by", 0, "Fields in the input file are terminated by the given string.", &fields_terminated, &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"fields-enclosed-by", OPT_ENC, + {"fields-enclosed-by", 0, "Fields in the import file are enclosed by the given character.", &enclosed, &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"fields-optionally-enclosed-by", OPT_O_ENC, + {"fields-optionally-enclosed-by", 0, "Fields in the input file are optionally enclosed by the given character.", &opt_enclosed, &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"fields-escaped-by", OPT_ESC, + {"fields-escaped-by", 0, "Fields in the input file are escaped by the given character.", &escaped, &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -125,10 +125,10 @@ static struct my_option my_long_options[] = "Disable foreign key checks while importing the data.", &ignore_foreign_keys, &ignore_foreign_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.", + {"ignore-lines", 0, "Ignore first n lines of data infile.", &opt_ignore_lines, &opt_ignore_lines, 0, GET_LL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"lines-terminated-by", OPT_LTB, + {"lines-terminated-by", 0, "Lines in the input file are terminated by the given string.", &lines_terminated, &lines_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -137,7 +137,7 @@ static struct my_option my_long_options[] = {"lock-tables", 'l', "Lock all tables for write (this disables threads).", &lock_tables, &lock_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"low-priority", OPT_LOW_PRIORITY, + {"low-priority", 0, "Use LOW_PRIORITY when updating the table.", &opt_low_priority, &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', @@ -147,7 +147,7 @@ static struct my_option my_long_options[] = {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection or 0 for default to, in " @@ -169,7 +169,7 @@ static struct my_option my_long_options[] = &opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #include - {"use-threads", OPT_USE_THREADS, + {"use-threads", 0, "Load files in parallel. The argument is the number " "of threads to use for loading data.", &opt_use_threads, &opt_use_threads, 0, diff --git a/client/mysqlshow.c b/client/mysqlshow.c index e1dc840cf8f..fdb58b56b30 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2010, 2019, MariaDB + Copyright (c) 2010, 2024, MariaDB 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 @@ -186,10 +186,10 @@ static struct my_option my_long_options[] = {"character-sets-dir", 'c', "Directory for character set files.", (char**) &charsets_dir, (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default-character-set", OPT_DEFAULT_CHARSET, + {"default-character-set", 0, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"count", OPT_COUNT, + {"count", 0, "Show number of rows per table (may be slow for non-MyISAM tables).", &opt_count, &opt_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -198,13 +198,13 @@ static struct my_option my_long_options[] = 0, 0, 0}, {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", + {"debug-info", 0, "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -221,7 +221,7 @@ static struct my_option my_long_options[] = "Password to use when connecting to server. If password is not given, it's " "solicited on the tty.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection or 0 for default to, in " diff --git a/client/mysqlslap.c b/client/mysqlslap.c index f94bb2ad956..8fc59e41c94 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -1,6 +1,6 @@ /* Copyright (c) 2005, 2015, Oracle and/or its affiliates. - Copyright (c) 2010, 2022, MariaDB + Copyright (c) 2010, 2024, MariaDB 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 @@ -532,50 +532,45 @@ static struct my_option my_long_options[] = "Generate SQL where not supplied by file or command line.", &auto_generate_sql, &auto_generate_sql, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO, + {"auto-generate-sql-add-autoincrement", 0, "Add an AUTO_INCREMENT column to auto-generated tables.", - &auto_generate_sql_autoincrement, - &auto_generate_sql_autoincrement, + &auto_generate_sql_autoincrement, &auto_generate_sql_autoincrement, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES, + {"auto-generate-sql-execute-number", 0, "Set this number to generate a set number of queries to run.", &auto_actual_queries, &auto_actual_queries, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY, + {"auto-generate-sql-guid-primary", 0, "Add GUID based primary keys to auto-generated tables.", - &auto_generate_sql_guid_primary, - &auto_generate_sql_guid_primary, + &auto_generate_sql_guid_primary, &auto_generate_sql_guid_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, + {"auto-generate-sql-load-type", 0, "Specify test load type: mixed, update, write, key, or read; default is mixed.", (char**) &auto_generate_sql_type, (char**) &auto_generate_sql_type, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-generate-sql-secondary-indexes", - OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES, + {"auto-generate-sql-secondary-indexes", 0, "Number of secondary indexes to add to auto-generated tables.", &auto_generate_sql_secondary_indexes, &auto_generate_sql_secondary_indexes, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"auto-generate-sql-unique-query-number", - OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM, + {"auto-generate-sql-unique-query-number", 0, "Number of unique queries to generate for automatic tests.", &auto_generate_sql_unique_query_number, &auto_generate_sql_unique_query_number, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, - {"auto-generate-sql-unique-write-number", - OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM, + {"auto-generate-sql-unique-write-number", 0, "Number of unique queries to generate for auto-generate-sql-write-number.", &auto_generate_sql_unique_write_number, &auto_generate_sql_unique_write_number, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, - {"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM, + {"auto-generate-sql-write-number", 0, "Number of row inserts to perform for each thread (default is 100).", &auto_generate_sql_number, &auto_generate_sql_number, 0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0}, {"character-sets-dir", OPT_CHARSETS_DIR, "Directory for character set files.", (char **)&charsets_dir, (char **)&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.", + {"commit", 0, "Commit records every X number of statements.", &commit_rate, &commit_rate, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"compress", 'C', "Use compression in server/client protocol.", @@ -584,10 +579,10 @@ static struct my_option my_long_options[] = {"concurrency", 'c', "Number of clients to simulate for query to run.", (char**) &concurrency_str, (char**) &concurrency_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"create", OPT_SLAP_CREATE_STRING, "File or string to use create tables.", + {"create", 0, "File or string to use create tables.", &create_string, &create_string, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.", + {"create-schema", 0, "Schema to run tests in.", (char**) &create_schema_string, (char**) &create_schema_string, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"csv", OPT_SLAP_CSV, @@ -601,12 +596,12 @@ static struct my_option my_long_options[] = (char**) &default_dbug_option, (char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", + {"debug-check", 0, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", OPT_DEFAULT_AUTH, + {"default_auth", 0, "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -614,7 +609,7 @@ static struct my_option my_long_options[] = "Delimiter to use in SQL statements supplied in file or command line.", (char**) &delimiter, (char**) &delimiter, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"detach", OPT_SLAP_DETACH, + {"detach", 0, "Detach (close and reopen) connections after X number of requests.", &detach_rate, &detach_rate, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -626,14 +621,14 @@ static struct my_option my_long_options[] = GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"host", 'h', "Connect to host.", &host, &host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"init-command", OPT_INIT_COMMAND, + {"init-command", 0, "SQL Command to execute when connecting to MariaDB server. Will " "automatically be re-executed when reconnecting.", &opt_init_command, &opt_init_command, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"iterations", 'i', "Number of times to run the tests.", &iterations, &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0}, - {"no-drop", OPT_SLAP_NO_DROP, "Do not drop the schema after the test.", + {"no-drop", 0, "Do not drop the schema after the test.", &opt_no_drop, &opt_no_drop, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"number-char-cols", 'x', "Number of VARCHAR columns to create in table if specifying --auto-generate-sql.", @@ -643,11 +638,11 @@ static struct my_option my_long_options[] = "Number of INT columns to create in table if specifying --auto-generate-sql.", (char**) &num_int_cols_opt, (char**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY, + {"number-of-queries", 0, "Limit each client to this number of queries (this is not exact).", &num_of_query, &num_of_query, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"only-print", OPT_MYSQL_ONLY_PRINT, + {"only-print", 0, "Do not connect to the databases, but instead print out what would have " "been done.", &opt_only_print, &opt_only_print, 0, GET_BOOL, NO_ARG, @@ -659,25 +654,25 @@ static struct my_option my_long_options[] = {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + {"plugin_dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection.", &opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, - {"post-query", OPT_SLAP_POST_QUERY, + {"post-query", 0, "Query to run or file containing query to execute after tests have completed.", &user_supplied_post_statements, &user_supplied_post_statements, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"post-system", OPT_SLAP_POST_SYSTEM, + {"post-system", 0, "system() string to execute after tests have completed.", &post_system, &post_system, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"pre-query", OPT_SLAP_PRE_QUERY, + {"pre-query", 0, "Query to run or file containing query to execute before running tests.", &user_supplied_pre_statements, &user_supplied_pre_statements, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"pre-system", OPT_SLAP_PRE_SYSTEM, + {"pre-system", 0, "system() string to execute before running tests.", &pre_system, &pre_system, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 90ccd693347..c464c7937d3 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -4,7 +4,7 @@ MariaBackup: hot backup tool for InnoDB Originally Created 3/3/2009 Yasufumi Kinoshita Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko, Yasufumi Kinoshita, Ignacio Nin and Baron Schwartz. -(c) 2017, 2022, MariaDB Corporation. +(c) 2017, 2024, MariaDB Corporation. Portions written by Marko Mäkelä. This program is free software; you can redistribute it and/or modify @@ -1684,7 +1684,7 @@ struct my_option xb_server_options[] = &aria_log_dir_path, &aria_log_dir_path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"open_files_limit", OPT_OPEN_FILES_LIMIT, "the maximum number of file " + {"open_files_limit", 0, "the maximum number of file " "descriptors to reserve with setrlimit().", (G_PTR*) &xb_open_files_limit, (G_PTR*) &xb_open_files_limit, 0, GET_ULONG, REQUIRED_ARG, 0, 0, UINT_MAX, 0, 1, 0}, diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h index ee90d17fb64..53cf1d1a597 100644 --- a/include/sslopt-longopts.h +++ b/include/sslopt-longopts.h @@ -19,13 +19,12 @@ #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) - {"ssl", OPT_SSL_SSL, + {"ssl", 0, "Enable SSL for connection (automatically enabled with other flags).", &opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"ssl-ca", OPT_SSL_CA, "CA file in PEM format (check OpenSSL docs, implies --ssl).", - &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, - 0, 0, 0, 0, 0, 0}, + &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ssl-capath", OPT_SSL_CAPATH, "CA directory (check OpenSSL docs, implies --ssl).", &opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, @@ -46,13 +45,12 @@ "Certificate revocation list path (implies --ssl).", &opt_ssl_crlpath, &opt_ssl_crlpath, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"tls-version", OPT_TLS_VERSION, - "TLS protocol version for secure connection.", + {"tls-version", 0, "TLS protocol version for secure connection.", &opt_tls_version, &opt_tls_version, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #ifdef MYSQL_CLIENT - {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, + {"ssl-verify-server-cert", 0, "Verify server's \"Common Name\" in its cert against hostname used " "when connecting. This option is disabled by default.", &opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert, From 994a0de96b3a77449a5b4274835a308dd04b4912 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 5 May 2024 09:28:25 +0200 Subject: [PATCH 55/74] cleanup: reorder mysql help output --- client/mysql.cc | 220 ++++++++++++++++++++++-------------------------- 1 file changed, 100 insertions(+), 120 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index c6f1a4662cf..b7aaa278763 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -283,11 +283,12 @@ typedef struct { static COMMANDS commands[] = { { "?", '?', com_help, 1, "Synonym for `help'." }, + { "charset", 'C', com_charset, 1, + "Switch to another charset. Might be needed for processing binlog with multi-byte charsets." }, { "clear", 'c', com_clear, 0, "Clear the current input statement."}, { "connect",'r', com_connect,1, "Reconnect to the server. Optional arguments are db and host." }, - { "delimiter", 'd', com_delimiter, 1, - "Set statement delimiter." }, + { "delimiter", 'd', com_delimiter, 1, "Set statement delimiter." }, #ifdef USE_POPEN { "edit", 'e', com_edit, 0, "Edit command with $EDITOR."}, #endif @@ -300,6 +301,8 @@ static COMMANDS commands[] = { { "nopager",'n', com_nopager,0, "Disable pager, print to stdout." }, #endif { "notee", 't', com_notee, 0, "Don't write into outfile." }, + { "nowarning", 'w', com_nowarnings, 0, + "Don't show warnings after every statement." }, #ifdef USE_POPEN { "pager", 'P', com_pager, 1, "Set PAGER [to_pager]. Print the query results via PAGER." }, @@ -318,12 +321,8 @@ static COMMANDS commands[] = { "Set outfile [to_outfile]. Append everything into given outfile." }, { "use", 'u', com_use, 1, "Use another database. Takes database name as argument." }, - { "charset", 'C', com_charset, 1, - "Switch to another charset. Might be needed for processing binlog with multi-byte charsets." }, { "warnings", 'W', com_warnings, 0, "Show warnings after every statement." }, - { "nowarning", 'w', com_nowarnings, 0, - "Don't show warnings after every statement." }, /* Get bash-like expansion for some commands */ { "create table", 0, 0, 0, ""}, { "create database", 0, 0, 0, ""}, @@ -1506,10 +1505,8 @@ static struct my_option my_long_options[] = GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"auto-rehash", 0, "Enable automatic rehashing. One doesn't need to use 'rehash' to get table " - "and field completion, but startup and reconnecting may take a longer time. " - "Disable with --disable-auto-rehash.", - &opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, - 0, 0}, + "and field completion, but startup and reconnecting may take a longer time.", + &opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"no-auto-rehash", 'A', "No automatic rehashing. One has to use 'rehash' to get table and field " "completion. This gives a quicker start of mysql and disables rehashing " @@ -1517,17 +1514,31 @@ static struct my_option my_long_options[] = 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"auto-vertical-output", 0, "Automatically switch to vertical output mode if the result is wider " - "than the terminal width.", - &auto_vertical_output, &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0, - 0, 0, 0, 0, 0}, + "than the terminal width.", &auto_vertical_output, &auto_vertical_output, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"batch", 'B', "Don't use history file. Disable interactive behavior. (Enables --silent.)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"binary-mode", 0, + "Binary mode allows certain character sequences to be processed as data " + "that would otherwise be treated with a special meaning by the parser. " + "Specifically, this switch turns off parsing of all client commands except " + "\\C and DELIMITER in non-interactive mode (i.e., when binary mode is " + "combined with either 1) piped input, 2) the --batch mysql option, or 3) " + "the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and " + "ASCII '\\0' are preserved within strings, whereas by default, '\\r\\n' is " + "translated to '\\n' and '\\0' is disallowed in user input.", + &opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"character-sets-dir", OPT_CHARSETS_DIR, "Directory for character set files.", &charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"column-names", 0, "Write column names in results.", + &column_names, &column_names, 0, GET_BOOL, + NO_ARG, 1, 0, 0, 0, 0, 0}, + {"skip-column-names", 'N', "Don't write column names in results.", 0, 0, 0, + GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"column-type-info", 0, "Display column type information.", &column_types_flag, &column_types_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -1538,6 +1549,16 @@ static struct my_option my_long_options[] = {"compress", 'C', "Use compression in server/client protocol.", &opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"connect-expired-password", 0, + "Notify the server that this client is prepared to handle expired " + "password sandbox mode even if --batch was specified.", + &opt_connect_expired_password, &opt_connect_expired_password, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, + {"connect_timeout", 0, "Number of seconds before connection timeout.", + &opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, + 0, 0, 3600*12, 0, 0, 0}, + {"database", 'D', "Database to use.", ¤t_db, + ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #ifdef DBUG_OFF {"debug", '#', "This is a non-debug version. Catch this and exit.", 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, @@ -1550,65 +1571,59 @@ static struct my_option my_long_options[] = GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag, &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"database", 'D', "Database to use.", ¤t_db, - ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"default-auth", 0, "Default authentication client-side plugin to use.", + &opt_default_auth, &opt_default_auth, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"default-character-set", 0, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str, &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"enable-cleartext-plugin", OPT_COMPATIBILTY_CLEARTEXT_PLUGIN, + "Obsolete option. Exists only for MySQL compatibility.", + 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"enable-cleartext-plugin", OPT_COMPATIBILTY_CLEARTEXT_PLUGIN, "Obsolete option. Exists only for MySQL compatibility.", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"vertical", 'E', "Print the output of a query (rows) vertically.", - &vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, - 0}, - {"force", 'f', "Continue even if we get an SQL error. Sets abort-source-on-error to 0", - &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, - 0, 0, 0, 0}, + {"force", 'f', + "Continue even if we get an SQL error. Sets abort-source-on-error to 0", + &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"host", 'h', "Connect to host.", ¤t_host, + ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"html", 'H', "Produce HTML output.", &opt_html, &opt_html, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"ignore-spaces", 'i', "Ignore space after function names.", + &ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"init-command", 0, + "SQL Command to execute when connecting to MariaDB server. Will " + "automatically be re-executed when reconnecting.", &opt_init_command, + &opt_init_command, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"line-numbers", 0, "Write line numbers for errors.", + &line_numbers, &line_numbers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, + {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, + GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"local-infile", OPT_LOCAL_INFILE, "Enable LOAD DATA LOCAL INFILE.", + &opt_local_infile, &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"max-allowed-packet", 0, + "The maximum packet length to send to or receive from server.", + &opt_max_allowed_packet, &opt_max_allowed_packet, 0, GET_ULONG, + REQUIRED_ARG, 16*1024LL*1024LL, 4096, 2*1024LL*1024LL*1024LL, 0, 1024, 0}, + {"max-join-size", 0, + "Automatic limit for rows in a join when using --safe-updates.", + &max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, + 1, ULONG_MAX, 0, 1, 0}, {"named-commands", 'G', "Enable named commands. Named commands mean this program's internal " "commands; see mysql> help . When enabled, the named commands can be " "used from any line of the query, otherwise only from the first line, " "before an enter. Disable with --disable-named-commands. This option " "is disabled by default.", - &named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, - 0, 0}, - {"ignore-spaces", 'i', "Ignore space after function names.", - &ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0, - 0, 0, 0, 0}, - {"init-command", 0, - "SQL Command to execute when connecting to MariaDB server. Will " - "automatically be re-executed when reconnecting.", - &opt_init_command, &opt_init_command, 0, - GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.", - &opt_local_infile, &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, + &named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"net-buffer-length", 0, + "The buffer size for TCP/IP and socket communication.", + &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG, + REQUIRED_ARG, 16384, 1024, 512*1024ULL*1024ULL, MALLOC_OVERHEAD, 1024, 0}, {"no-beep", 'b', "Turn off beep on error.", &opt_nobeep, &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"host", 'h', "Connect to host.", ¤t_host, - ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"html", 'H', "Produce HTML output.", &opt_html, &opt_html, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0, - GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"line-numbers", 0, "Write line numbers for errors.", - &line_numbers, &line_numbers, 0, GET_BOOL, - NO_ARG, 1, 0, 0, 0, 0, 0}, - {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG, - NO_ARG, 0, 0, 0, 0, 0, 0}, - {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered, - &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"column-names", 0, "Write column names in results.", - &column_names, &column_names, 0, GET_BOOL, - NO_ARG, 1, 0, 0, 0, 0, 0}, - {"skip-column-names", 'N', - "Don't write column names in results.", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"sigint-ignore", 0, "Ignore SIGINT (CTRL-C).", - &opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL, - NO_ARG, 0, 0, 0, 0, 0, 0}, {"one-database", 'o', "Ignore statements except those that occur while the default " "database is the one named at the command line.", @@ -1629,14 +1644,15 @@ static struct my_option my_long_options[] = {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif + {"plugin-dir", 0, "Directory for client-side plugins.", &opt_plugin_dir, + &opt_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection or 0 for default to, in " "order of preference, my.cnf, $MYSQL_TCP_PORT, " #if MYSQL_PORT_DEFAULT == 0 "/etc/services, " #endif - "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", - &opt_mysql_port, - &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", &opt_mysql_port, + &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"progress-reports", 0, "Get progress reports for long running commands (like ALTER TABLE)", &opt_progress_reports, &opt_progress_reports, 0, GET_BOOL, NO_ARG, 1, 0, @@ -1652,11 +1668,25 @@ static struct my_option my_long_options[] = "if the output is suspended. Doesn't use history file.", &quick, &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"raw", 'r', "Write fields without conversion. Used with --batch.", - &opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, - 0, 0, 0}, - {"reconnect", 0, "Reconnect if the connection is lost. Disable " - "with --disable-reconnect. This option is enabled by default.", + &opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"reconnect", 0, "Reconnect if the connection is lost.", &opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, + {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.", + &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.", + &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"secure-auth", 0, "Refuse client connecting to server if it" + " uses old (pre-4.1.1) protocol.", &opt_secure_auth, + &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"select-limit", 0, + "Automatic limit for SELECT when using --safe-updates.", &select_limit, + &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX, 0, 1, 0}, + {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"show-warnings", 0, "Show warnings after every statement.", + &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"sigint-ignore", 0, "Ignore SIGINT (CTRL-C).", &opt_sigint_ignore, + &opt_sigint_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"silent", 's', "Be more silent. Print results with a tab as separator, " "each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "The socket file to use for connection.", @@ -1670,72 +1700,22 @@ static struct my_option my_long_options[] = "Does not work in batch mode. Disable with --disable-tee. " "This option is disabled by default.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered, + &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #ifndef DONT_ALLOW_USER_CHANGE {"user", 'u', "User for login if not current user.", ¤t_user, ¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.", - &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, - 0, 0, 0, 0}, - {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.", - &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, - 0, 0, 0, 0}, {"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"vertical", 'E', "Print the output of a query (rows) vertically.", + &vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"connect_timeout", 0, "Number of seconds before connection timeout.", - &opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, - 0, 0, 3600*12, 0, 0, 0}, - {"max_allowed_packet", 0, - "The maximum packet length to send to or receive from server.", - &opt_max_allowed_packet, &opt_max_allowed_packet, 0, - GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096, - (longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, - {"net_buffer_length", 0, - "The buffer size for TCP/IP and socket communication.", - &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG, - REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0}, - {"select_limit", 0, - "Automatic limit for SELECT when using --safe-updates.", - &select_limit, &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, - 1, ULONG_MAX, 0, 1, 0}, - {"max_join_size", 0, - "Automatic limit for rows in a join when using --safe-updates.", - &max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, - 1, ULONG_MAX, 0, 1, 0}, - {"secure-auth", 0, "Refuse client connecting to server if it" - " uses old (pre-4.1.1) protocol.", &opt_secure_auth, - &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.", - 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"show-warnings", 0, "Show warnings after every statement.", - &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, - 0, 0, 0, 0, 0, 0}, - {"plugin_dir", 0, "Directory for client-side plugins.", - &opt_plugin_dir, &opt_plugin_dir, 0, - GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"default_auth", 0, - "Default authentication client-side plugin to use.", - &opt_default_auth, &opt_default_auth, 0, - GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"binary-mode", 0, - "Binary mode allows certain character sequences to be processed as data " - "that would otherwise be treated with a special meaning by the parser. " - "Specifically, this switch turns off parsing of all client commands except " - "\\C and DELIMITER in non-interactive mode (i.e., when binary mode is " - "combined with either 1) piped input, 2) the --batch mysql option, or 3) " - "the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and " - "ASCII '\\0' are preserved within strings, whereas by default, '\\r\\n' is " - "translated to '\\n' and '\\0' is disallowed in user input.", - &opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"connect-expired-password", 0, - "Notify the server that this client is prepared to handle expired " - "password sandbox mode even if --batch was specified.", - &opt_connect_expired_password, &opt_connect_expired_password, 0, GET_BOOL, - NO_ARG, 0, 0, 0, 0, 0, 0}, + {"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; From 83aedeacc404f5e1000dc8b46e099b4a2cfb1cd0 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 5 May 2024 10:29:41 +0200 Subject: [PATCH 56/74] cleanup: remove __attribute__((unused)) from mysql.cc the client is C++, use a much more concise C++ syntax as a bonus, arguments that are used, are no longer marked "unused" --- client/mysql.cc | 105 +++++++++++++++--------------------------------- 1 file changed, 32 insertions(+), 73 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index b7aaa278763..7ebb46a1a16 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2769,9 +2769,7 @@ static void initialize_readline () array of matches, or NULL if there aren't any. */ -static char **new_mysql_completion(const char *text, - int start __attribute__((unused)), - int end __attribute__((unused))) +static char **new_mysql_completion(const char *text, int, int) { if (!status.batch && !quick) #if defined(USE_NEW_READLINE_INTERFACE) @@ -3094,8 +3092,7 @@ static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat, char *las } -static int com_server_help(String *buffer __attribute__((unused)), - char *line __attribute__((unused)), char *help_arg) +static int com_server_help(String *buffer, char *, char *help_arg) { MYSQL_ROW cur; const char *server_cmd; @@ -3197,18 +3194,16 @@ err: return error; } -static int -com_help(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_help(String *buffer, char *line) { int i, j; char * help_arg= strchr(line,' '), buff[32], *end; if (help_arg) { - while (my_isspace(charset_info,*help_arg)) + while (my_isspace(charset_info, *help_arg)) help_arg++; if (*help_arg) - return com_server_help(buffer,line,help_arg); + return com_server_help(buffer, line, help_arg); } put_info("\nGeneral information about MariaDB can be found at\n" @@ -3231,9 +3226,7 @@ com_help(String *buffer __attribute__((unused)), } - /* ARGSUSED */ -static int -com_clear(String *buffer,char *line __attribute__((unused))) +static int com_clear(String *buffer,char *) { #ifdef HAVE_READLINE if (status.add_to_history) @@ -3243,9 +3236,7 @@ com_clear(String *buffer,char *line __attribute__((unused))) return 0; } - /* ARGSUSED */ -static int -com_charset(String *buffer __attribute__((unused)), char *line) +static int com_charset(String *, char *line) { char buff[256], *param; CHARSET_INFO * new_cs; @@ -3276,8 +3267,7 @@ com_charset(String *buffer __attribute__((unused)), char *line) */ -static int -com_go(String *buffer,char *line __attribute__((unused))) +static int com_go(String *buffer, char *) { char buff[200]; /* about 110 chars used so far */ char time_buff[53+3+1]; /* time max + space & parens + NUL */ @@ -3856,9 +3846,7 @@ tee_print_sized_data(const char *data, unsigned int data_length, unsigned int to } - -static void -print_table_data_html(MYSQL_RES *result) +static void print_table_data_html(MYSQL_RES *result) { MYSQL_ROW cur; MYSQL_FIELD *field; @@ -4154,15 +4142,13 @@ print_tab_data(MYSQL_RES *result) } } -static int -com_tee(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_tee(String *, char *line) { char file_name[FN_REFLEN], *end, *param; if (status.batch) return 0; - while (my_isspace(charset_info,*line)) + while (my_isspace(charset_info, *line)) line++; if (!(param = strchr(line, ' '))) // if outfile wasn't given, use the default { @@ -4199,9 +4185,7 @@ com_tee(String *buffer __attribute__((unused)), } -static int -com_notee(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_notee(String *, char *) { if (opt_outfile) end_tee(); @@ -4214,9 +4198,7 @@ com_notee(String *buffer __attribute__((unused)), */ #ifdef USE_POPEN -static int -com_pager(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_pager(String *, char *line) { char pager_name[FN_REFLEN], *end, *param; @@ -4258,9 +4240,7 @@ com_pager(String *buffer __attribute__((unused)), } -static int -com_nopager(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_nopager(String *, char *) { strmov(pager, "stdout"); opt_nopager=1; @@ -4272,7 +4252,7 @@ com_nopager(String *buffer __attribute__((unused)), #ifdef USE_POPEN static int -com_edit(String *buffer,char *line __attribute__((unused))) +com_edit(String *buffer,char *) { char filename[FN_REFLEN],buff[160]; int fd,tmp,error; @@ -4319,17 +4299,15 @@ err: /* If arg is given, exit without errors. This happens on command 'quit' */ -static int -com_quit(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_quit(String *, char *) { status.exit_status=0; return 1; } static int -com_rehash(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +com_rehash(String *, + char *) { #ifdef HAVE_READLINE build_completion_hash(1, 0); @@ -4339,9 +4317,7 @@ com_rehash(String *buffer __attribute__((unused)), #ifdef USE_POPEN -static int -com_shell(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_shell(String *, char *line) { char *shell_cmd; @@ -4367,8 +4343,7 @@ com_shell(String *buffer __attribute__((unused)), #endif -static int -com_print(String *buffer,char *line __attribute__((unused))) +static int com_print(String *buffer,char *) { tee_puts("--------------", stdout); (void) tee_fputs(buffer->c_ptr(), stdout); @@ -4378,9 +4353,8 @@ com_print(String *buffer,char *line __attribute__((unused))) return 0; /* If empty buffer */ } - /* ARGSUSED */ -static int -com_connect(String *buffer, char *line) + +static int com_connect(String *buffer, char *line) { char *tmp, buff[256]; my_bool save_rehash= opt_rehash; @@ -4433,8 +4407,7 @@ com_connect(String *buffer, char *line) } -static int com_source(String *buffer __attribute__((unused)), - char *line) +static int com_source(String *, char *line) { char source_name[FN_REFLEN], *end, *param; LINE_BUFFER *line_buff; @@ -4498,9 +4471,7 @@ static int com_source(String *buffer __attribute__((unused)), } - /* ARGSUSED */ -static int -com_delimiter(String *buffer __attribute__((unused)), char *line) +static int com_delimiter(String *, char *line) { char buff[256], *tmp; @@ -4527,9 +4498,7 @@ com_delimiter(String *buffer __attribute__((unused)), char *line) return 0; } - /* ARGSUSED */ -static int -com_use(String *buffer __attribute__((unused)), char *line) +static int com_use(String *, char *line) { char *tmp, buff[FN_REFLEN + 1]; int select_db; @@ -4602,18 +4571,14 @@ com_use(String *buffer __attribute__((unused)), char *line) return 0; } -static int -com_warnings(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_warnings(String *, char *) { show_warnings = 1; put_info("Show warnings enabled.",INFO_INFO); return 0; } -static int -com_nowarnings(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_nowarnings(String *, char *) { show_warnings = 0; put_info("Show warnings disabled.",INFO_INFO); @@ -4858,10 +4823,7 @@ sql_connect(char *host,char *database,char *user,char *password,uint silent) } - -static int -com_status(String *buffer __attribute__((unused)), - char *line __attribute__((unused))) +static int com_status(String *, char *) { const char *status_str; char buff[40]; @@ -4985,8 +4947,7 @@ select_limit, max_join_size); return 0; } -static const char * -server_version_string(MYSQL *con) +static const char * server_version_string(MYSQL *con) { /* Only one thread calls this, so no synchronization is needed */ if (server_version == NULL) @@ -5111,8 +5072,7 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate) } -static int -put_error(MYSQL *con) +static int put_error(MYSQL *con) { return put_info(mysql_error(con), INFO_ERROR, mysql_errno(con), mysql_sqlstate(con)); @@ -5178,7 +5138,7 @@ void tee_putc(int c, FILE *file) len("4294967296 days, 23 hours, 59 minutes, 60.000 seconds") -> 53 */ -static void nice_time(double sec,char *buff,bool part_second) +static void nice_time(double sec, char *buff, bool part_second) { ulong tmp; if (sec >= 3600.0*24) @@ -5429,8 +5389,7 @@ static void init_username() } } -static int com_prompt(String *buffer __attribute__((unused)), - char *line) +static int com_prompt(String *, char *line) { char *ptr=strchr(line, ' '); prompt_counter = 0; From 2025597c0bc4fc1aa076af2476e0f8c4ce056168 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 5 May 2024 09:44:10 +0200 Subject: [PATCH 57/74] MDEV-21778 Disable system commands in mysql/mariadb client mysql --sandbox disables system (\!), tee (\T), pager with an argument(\P foo), source (\.) does *not* disable edit (\e). Use EDITOR=/bin/false to disable or, for example, EDITOR=rnano for something more useful does *not* disable pager (\P) without an argument. Use PAGER=cat or, for example PAGER=less LESSSECURE=1 for something more useful using a disabled command is an error, which can be ignored with --force Also, a "sandbox" command (\-) - enables the sandbox mode until EOF (current file or the session, if interactive) --- client/mysql.cc | 29 +++++++++++++++++++++++--- mysql-test/main/mysql.result | 24 ++++++++++++++++++++++ mysql-test/main/mysql.test | 40 ++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 3 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 7ebb46a1a16..5c79dd7890b 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -136,7 +136,7 @@ typedef struct st_status ulong query_start_line; char *file_name; LINE_BUFFER *line_buff; - bool batch,add_to_history; + bool batch, add_to_history, sandbox; } STATUS; @@ -154,7 +154,7 @@ static my_bool ignore_errors=0,wait_flag=0,quick=0, vertical=0, line_numbers=1, column_names=1,opt_html=0, opt_xml=0,opt_nopager=1, opt_outfile=0, named_cmds= 0, tty_password= 0, opt_nobeep=0, opt_reconnect=1, - opt_secure_auth= 0, + opt_secure_auth= 0, default_pager_set= 0, opt_sigint_ignore= 0, auto_vertical_output= 0, show_warnings= 0, executing_query= 0, @@ -235,7 +235,8 @@ static int com_quit(String *str,char*), com_rehash(String *str, char*), com_tee(String *str, char*), com_notee(String *str, char*), com_charset(String *str,char*), com_prompt(String *str, char*), com_delimiter(String *str, char*), - com_warnings(String *str, char*), com_nowarnings(String *str, char*); + com_warnings(String *str, char*), com_nowarnings(String *str, char*), + com_sandbox(String *str, char*); #ifdef USE_POPEN static int com_nopager(String *str, char*), com_pager(String *str, char*), @@ -311,6 +312,8 @@ static COMMANDS commands[] = { { "prompt", 'R', com_prompt, 1, "Change your mysql prompt."}, { "quit", 'q', com_quit, 0, "Quit mysql." }, { "rehash", '#', com_rehash, 0, "Rebuild completion hash." }, + { "sandbox", '-', com_sandbox, 0, + "Disallow commands that access the file system (except \\P without an argument and \\e)." }, { "source", '.', com_source, 1, "Execute an SQL script file. Takes a file name as an argument."}, { "status", 's', com_status, 0, "Get status information from the server."}, @@ -1675,6 +1678,8 @@ static struct my_option my_long_options[] = &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.", &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"sandbox", 0, "Disallow commands that access the file system (except \\P without an argument and \\e).", + &status.sandbox, &status.sandbox, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"secure-auth", 0, "Refuse client connecting to server if it" " uses old (pre-4.1.1) protocol.", &opt_secure_auth, &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -4146,6 +4151,8 @@ static int com_tee(String *, char *line) { char file_name[FN_REFLEN], *end, *param; + if (status.sandbox) + return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0); if (status.batch) return 0; while (my_isspace(charset_info, *line)) @@ -4226,6 +4233,8 @@ static int com_pager(String *, char *line) } else { + if (status.sandbox) + return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0); end= strmake_buf(pager_name, param); while (end > pager_name && (my_isspace(charset_info,end[-1]) || my_iscntrl(charset_info,end[-1]))) @@ -4321,6 +4330,9 @@ static int com_shell(String *, char *line) { char *shell_cmd; + if (status.sandbox) + return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0); + /* Skip space from line begin */ while (my_isspace(charset_info, *line)) line++; @@ -4416,6 +4428,9 @@ static int com_source(String *, char *line) FILE *sql_file; my_bool save_ignore_errors; + if (status.sandbox) + return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0); + /* Skip space from file name */ while (my_isspace(charset_info,*line)) line++; @@ -4450,6 +4465,7 @@ static int com_source(String *, char *line) bfill((char*) &status,sizeof(status),(char) 0); status.batch=old_status.batch; // Run in batch mode + status.sandbox=old_status.sandbox; status.line_buff=line_buff; status.file_name=source_name; glob_buffer.length(0); // Empty command buffer @@ -4571,6 +4587,13 @@ static int com_use(String *, char *line) return 0; } +static int com_sandbox(String *, char *) +{ + status.sandbox= 1; + put_info("Sandbox mode.", INFO_INFO); + return 0; +} + static int com_warnings(String *, char *) { show_warnings = 1; diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result index 48e0a9335ff..b168f1b57d5 100644 --- a/mysql-test/main/mysql.result +++ b/mysql-test/main/mysql.result @@ -633,3 +633,27 @@ drop table t1; WARNING: option '--enable-cleartext-plugin' is obsolete. 1 1 +# End of 10.3 tests +# +# MDEV-21778 Disable system commands in mysql/mariadb client +# +ERROR at line 1: Not allowed in the sandbox mode +1 +ERROR at line 1: Not allowed in the sandbox mode +2 +ERROR at line 1: Not allowed in the sandbox mode +3 +1 +entering sandbox +system +tee +source +^^^ +2 +entering sandbox +system +tee +source +^^^ +3 +# End of 10.5 tests diff --git a/mysql-test/main/mysql.test b/mysql-test/main/mysql.test index 0f41add821a..d71c0b59575 100644 --- a/mysql-test/main/mysql.test +++ b/mysql-test/main/mysql.test @@ -716,3 +716,43 @@ drop table t1; # --echo --exec $MYSQL test --enable-cleartext-plugin -e "select 1" + +--echo # End of 10.3 tests + +--echo # +--echo # MDEV-21778 Disable system commands in mysql/mariadb client +--echo # + +--error 1 +--exec $MYSQL --sandbox -Ne "select 1; \! echo foo; select 0" 2>&1 +--error 1 +--exec $MYSQL --sandbox -Ne "select 2; \T echo foo; select 0" 2>&1 +--error 1 +--exec $MYSQL --sandbox -Ne "select 3; \. echo.foo; select 0" 2>&1 + +--write_file $MYSQL_TMP_DIR/mysql_in +select 'entering sandbox'; +\- +select 'system'; +\! echo foo +select 'tee'; +\T echo foo +select 'source'; +\. echo.foo +select '^^^'; +EOF + +write_line "select 1; +source $MYSQL_TMP_DIR/mysql_in; +select 2; +source $MYSQL_TMP_DIR/mysql_in; +sandbox; +select 3; +source $MYSQL_TMP_DIR/mysql_in;" $MYSQL_TMP_DIR/mysql_in2; + +--exec $MYSQL -fN <$MYSQL_TMP_DIR/mysql_in2 + +--remove_file $MYSQL_TMP_DIR/mysql_in +--remove_file $MYSQL_TMP_DIR/mysql_in2 + +--echo # End of 10.5 tests From 13663cb5c4558383e9dab96e501d72ceb7a0a158 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 5 May 2024 17:37:37 +0200 Subject: [PATCH 58/74] MDEV-33727 mariadb-dump trusts the server and does not validate the data safety first - tell mariadb client not to execute dangerous cli commands, they cannot be present in the dump anyway. wrapping the command in /*!999999 ..... */ guarantees that if a non-mariadb-cli client loads the dump and sends it to the server - the server will ignore the command it doesn't understand --- client/mysqldump.c | 91 +++++++------- mysql-test/main/ddl_i18n_koi8r.result | 6 + mysql-test/main/ddl_i18n_utf8.result | 6 + mysql-test/main/lock_view.result | 2 + mysql-test/main/mysql.result | 8 +- mysql-test/main/mysqldump-compat-102.result | 1 + mysql-test/main/mysqldump-max.result | 2 + mysql-test/main/mysqldump-nl.result | 2 + mysql-test/main/mysqldump-no-binlog.result | 1 + mysql-test/main/mysqldump-system.result | 3 + mysql-test/main/mysqldump-timing.result | 2 + mysql-test/main/mysqldump-utf8mb4.result | 1 + mysql-test/main/mysqldump.result | 118 +++++++++++++++++- mysql-test/main/mysqldump.test | 23 +++- mysql-test/main/openssl_1.result | 3 + mysql-test/main/plugin_auth.result | 1 + mysql-test/main/rpl_mysqldump_slave.result | 17 +++ mysql-test/main/trigger_wl3253.result | 2 + .../suite/archive/archive_bitfield.result | 1 + .../r/mysqldump_restore_func_qualified.result | 1 + .../oracle/r/sp-package-mysqldump.result | 1 + mysql-test/suite/federated/federatedx.result | 1 + mysql-test/suite/roles/definer.result | 1 + .../suite/sql_sequence/mysqldump.result | 5 + .../connect/mysql-test/connect/r/mysql.result | 1 + 25 files changed, 246 insertions(+), 54 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 06ecc67cc97..d3d6851b65a 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -753,56 +753,59 @@ static void write_header(FILE *sql_file, const char *db_name) fputs(">\n", sql_file); check_io(sql_file); } - else if (!opt_compact) + else { - print_comment(sql_file, 0, - "-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n", - DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, - MACHINE_TYPE); - print_comment(sql_file, 0, "-- Host: %s ", - fix_for_comment(current_host ? current_host : "localhost")); - print_comment(sql_file, 0, "Database: %s\n", - fix_for_comment(db_name ? db_name : "")); - print_comment(sql_file, 0, - "-- ------------------------------------------------------\n" - ); - print_comment(sql_file, 0, "-- Server version\t%s\n", - mysql_get_server_info(&mysql_connection)); - - if (!opt_logging) - fprintf(sql_file, -"\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); - - if (opt_set_charset) - fprintf(sql_file, -"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;" -"\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;" -"\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;" -"\n/*!40101 SET NAMES %s */;\n",default_charset); - - if (opt_tz_utc) + fprintf(sql_file, "/*!999999\\- enable the sandbox mode */ \n"); + if (!opt_compact) { - fprintf(sql_file, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); - fprintf(sql_file, "/*!40103 SET TIME_ZONE='+00:00' */;\n"); - } + print_comment(sql_file, 0, + "-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n", + DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, + MACHINE_TYPE); + print_comment(sql_file, 0, "-- Host: %s ", + fix_for_comment(current_host ? current_host : "localhost")); + print_comment(sql_file, 0, "Database: %s\n", + fix_for_comment(db_name ? db_name : "")); + print_comment(sql_file, 0, + "-- ------------------------------------------------------\n" + ); + print_comment(sql_file, 0, "-- Server version\t%s\n", + mysql_get_server_info(&mysql_connection)); - if (!path) - { - if (!opt_no_create_info) + if (!opt_logging) + fprintf(sql_file, + "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); + + if (opt_set_charset) + fprintf(sql_file, + "\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;" + "\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;" + "\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;" + "\n/*!40101 SET NAMES %s */;\n",default_charset); + + if (opt_tz_utc) { - /* We don't need unique checks as the table is created just before */ - fprintf(md_result_file,"\ -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"); + fprintf(sql_file, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); + fprintf(sql_file, "/*!40103 SET TIME_ZONE='+00:00' */;\n"); } - fprintf(md_result_file,"\ -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n\ -"); + + if (!path) + { + if (!opt_no_create_info) + { + /* We don't need unique checks as the table is created just before */ + fprintf(md_result_file, + "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"); + } + fprintf(md_result_file, + "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n"); + } + fprintf(sql_file, + "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n" + "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n", + path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",", + compatible_mode_normal_str); } - fprintf(sql_file, - "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n" - "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n", - path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",", - compatible_mode_normal_str); check_io(sql_file); } } /* write_header */ diff --git a/mysql-test/main/ddl_i18n_koi8r.result b/mysql-test/main/ddl_i18n_koi8r.result index 9fd6e2c968f..ab5104123a0 100644 --- a/mysql-test/main/ddl_i18n_koi8r.result +++ b/mysql-test/main/ddl_i18n_koi8r.result @@ -719,6 +719,7 @@ ca cb utf8_general_ci utf8_general_ci ---> Dump of mysqltest1 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -795,6 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.sp.mysqltest1.sql ---> Dump of mysqltest2 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1723,6 +1725,7 @@ koi8r_general_ci utf8_general_ci koi8r_general_ci koi8r_general_ci utf8_general_ DELETE FROM mysqltest2.log| ---> Dump of mysqltest1 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1802,6 +1805,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.triggers.mysqltest1.sql ---> Dump of mysqltest2 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2485,6 +2489,7 @@ COLLATION( ' END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci ---> Dump of mysqltest1 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2552,6 +2557,7 @@ DELIMITER ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.events.mysqltest1.sql ---> Dump of mysqltest2 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; diff --git a/mysql-test/main/ddl_i18n_utf8.result b/mysql-test/main/ddl_i18n_utf8.result index c2bca0cdf78..457f68a33af 100644 --- a/mysql-test/main/ddl_i18n_utf8.result +++ b/mysql-test/main/ddl_i18n_utf8.result @@ -719,6 +719,7 @@ ca cb utf8_general_ci utf8_general_ci ---> Dump of mysqltest1 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -795,6 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql ---> Dump of mysqltest2 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1723,6 +1725,7 @@ utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci DELETE FROM mysqltest2.log| ---> Dump of mysqltest1 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1802,6 +1805,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql ---> Dump of mysqltest2 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2485,6 +2489,7 @@ COLLATION( 'текст') AS c4, END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci ---> Dump of mysqltest1 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2552,6 +2557,7 @@ DELIMITER ; ---> Dumping mysqltest1 to ddl_i18n_utf8events.mysqltest1.sql ---> Dump of mysqltest2 +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; diff --git a/mysql-test/main/lock_view.result b/mysql-test/main/lock_view.result index 47a7e58ea0d..3d710f38936 100644 --- a/mysql-test/main/lock_view.result +++ b/mysql-test/main/lock_view.result @@ -16,6 +16,7 @@ create definer=definer@localhost view mysqltest3.v3is as select schema_name from create definer=definer@localhost view mysqltest3.v3ps as select user from performance_schema.users where current_connections>0 order by user; create definer=definer@localhost view mysqltest3.v3nt as select 1; create definer=definer@localhost sql security invoker view mysqltest3.v3i as select * from mysqltest1.t1; +/*!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */; @@ -235,6 +236,7 @@ create view v1 as select * from (select * from t1) dt; lock table v1 read; disconnect con1; connection default; +/*!999999\- enable the sandbox mode */ SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE VIEW `v1` AS SELECT diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result index b168f1b57d5..c6834d0fc20 100644 --- a/mysql-test/main/mysql.result +++ b/mysql-test/main/mysql.result @@ -552,6 +552,7 @@ Table Create Table a1\`b1 CREATE TABLE `a1\``b1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +/*!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `a1\``b1` ( @@ -581,6 +582,7 @@ Table Create Table a1\"b1 CREATE TABLE "a1\""b1" ( "a" int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +/*!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "a1\""b1" ( @@ -603,11 +605,11 @@ set sql_mode=default; create table t1 (a text); select count(*) from t1; count(*) -41 +42 truncate table t1; select count(*) from t1; count(*) -41 +42 truncate table t1; select count(*) from t1; count(*) @@ -619,7 +621,7 @@ count(*) truncate table t1; select count(*) from t1; count(*) -41 +42 truncate table t1; select count(*) from t1; count(*) diff --git a/mysql-test/main/mysqldump-compat-102.result b/mysql-test/main/mysqldump-compat-102.result index 86a2ebc47e0..d5ed54570e2 100644 --- a/mysql-test/main/mysqldump-compat-102.result +++ b/mysql-test/main/mysqldump-compat-102.result @@ -58,6 +58,7 @@ BEGIN log(0, 'Session ' || connection_id() || ' ' || current_user || ' started'); END; $$ +/*!999999\- enable the sandbox mode */ -- MariaDB dump DUMPVERSION Distrib DISTVERSION, for OS -- -- Host: localhost Database: db1_mdev17429 diff --git a/mysql-test/main/mysqldump-max.result b/mysql-test/main/mysqldump-max.result index 4a53a5f3328..28c111d37b7 100644 --- a/mysql-test/main/mysqldump-max.result +++ b/mysql-test/main/mysqldump-max.result @@ -77,6 +77,7 @@ id name 3 first value 4 first value 5 first value +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -174,6 +175,7 @@ INSERT IGNORE INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first val /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-nl.result b/mysql-test/main/mysqldump-nl.result index 66902492934..1e9928308fc 100644 --- a/mysql-test/main/mysqldump-nl.result +++ b/mysql-test/main/mysqldump-nl.result @@ -12,6 +12,7 @@ create procedure sp() select * from `v1 1v`; flush tables; use test; +/*!999999\- enable the sandbox mode */ -- -- Current Database: `mysqltest1 @@ -134,6 +135,7 @@ test\` \! ls # test` +/*!999999\- enable the sandbox mode */ -- -- Current Database: `test``` diff --git a/mysql-test/main/mysqldump-no-binlog.result b/mysql-test/main/mysqldump-no-binlog.result index 223034d8401..669675ff21b 100644 --- a/mysql-test/main/mysqldump-no-binlog.result +++ b/mysql-test/main/mysqldump-no-binlog.result @@ -1 +1,2 @@ mariadb-dump: Error: Binlogging on server not active +/*!999999\- enable the sandbox mode */ diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result index bc8229ff42f..98cdd16abef 100644 --- a/mysql-test/main/mysqldump-system.result +++ b/mysql-test/main/mysqldump-system.result @@ -38,6 +38,7 @@ CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB"; # # mysqldump of system tables with --system=all # +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -162,6 +163,7 @@ UNLOCK TABLES; # # mysqldump of system tables with --system=all --replace # +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -307,6 +309,7 @@ UNLOCK TABLES; # # mysqldump of system tables with --system=all --insert-ignore # +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-timing.result b/mysql-test/main/mysqldump-timing.result index fe44a1eadd4..e70aaf3b0f8 100644 --- a/mysql-test/main/mysqldump-timing.result +++ b/mysql-test/main/mysqldump-timing.result @@ -7,6 +7,7 @@ CREATE TABLE t1 (i INT); INSERT INTO t1 VALUES (0); LOCK TABLE t1 WRITE; timeout without t1 contents expected +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -30,6 +31,7 @@ SET @save_max_statement_time=@@max_statement_time; SET GLOBAL max_statement_time=0.1; UNLOCK TABLES;; This would be a race condition otherwise, but default max_statement_time=0 makes it succeed +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-utf8mb4.result b/mysql-test/main/mysqldump-utf8mb4.result index 3bafd6da6c9..ce321a59361 100644 --- a/mysql-test/main/mysqldump-utf8mb4.result +++ b/mysql-test/main/mysqldump-utf8mb4.result @@ -32,6 +32,7 @@ Testing XML format output ---- Testing text format output ---- +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index a23bf87833d..1541a4e6f72 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -31,6 +31,7 @@ DROP TABLE t1; CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); +/*!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -46,6 +47,7 @@ CREATE TABLE t1 (a double); INSERT IGNORE INTO t1 VALUES ('-9e999999'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 +/*!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -67,6 +69,7 @@ INSERT INTO t1 VALUES ('1.2345', 2.3456); INSERT INTO t1 VALUES ("1.2345", 2.3456); ERROR 42S22: Unknown column '1.2345' in 'field list' SET SQL_MODE=@OLD_SQL_MODE; +/*!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -75,6 +78,7 @@ CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); +/*!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -83,6 +87,7 @@ CREATE TABLE `t1` ( ); /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -118,6 +123,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -194,6 +200,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r; INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -235,6 +242,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a int) ENGINE=MYISAM; INSERT INTO t1 VALUES (1), (2); +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -258,6 +266,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -286,6 +295,7 @@ DROP TABLE t1; # Bug#2592 mysqldump doesn't quote "tricky" names correctly # create table ```a` (i int); +/*!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE ```a` ( @@ -297,6 +307,7 @@ drop table ```a`; # Bug#2591 mysqldump quotes names inconsistently # create table t1(a int); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -330,6 +341,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -356,6 +368,7 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; set global sql_mode='ANSI_QUOTES'; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -389,6 +402,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -421,6 +435,7 @@ drop table t1; # create table t1(a int); insert into t1 values (1),(2),(3); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -453,6 +468,7 @@ drop table t1; # # Bug#6101 create database problem # +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -479,6 +495,7 @@ USE `test`; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; create database mysqldump_test_db character set latin2 collate latin2_bin; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -513,6 +530,7 @@ drop database mysqldump_test_db; # if it is explicitly set. CREATE TABLE t1 (a CHAR(10)); INSERT INTO t1 VALUES (_latin1 ''); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -554,6 +572,7 @@ UNLOCK TABLES; # If the future we can move this command into a separate test with # checking that "mysqldump" is compiled with "latin1" # +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -577,6 +596,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -600,6 +620,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -631,6 +652,7 @@ CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t2 VALUES (4),(5),(6); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -672,6 +694,7 @@ DROP TABLE t2; # CREATE TABLE t1 (`b` blob); INSERT INTO `t1` VALUES (0x602010000280100005E71A); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -713,6 +736,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (4),(5),(6); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -747,6 +771,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1116,6 +1141,7 @@ F_cd00692c3bfe59267d5ecfac5310286c int, F_6faa8040da20ef399b63a72d0e4ab575 int, F_fe73f687e5bc5280214e0486b273a5f9 int); insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1485,6 +1511,7 @@ drop table t1; # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1),(2),(3); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1535,6 +1562,7 @@ CREATE TABLE t1 ( a INT ); CREATE TABLE t2 ( a INT ); INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1), (2); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1570,6 +1598,7 @@ CREATE TABLE `t2` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1642,21 +1671,35 @@ create table t3(a varchar(30) primary key, b int not null); test_sequence ------ Testing with illegal table names ------ mariadb-dump: Couldn't find table: "\d-2-1.sql" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\t1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\t1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\\t1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t\1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t\1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t/1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T%1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T'1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_1" +/*!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_" +/*!999999\- enable the sandbox mode */ test_sequence ------ Testing with illegal database names ------ mariadb-dump: Got error: 1049: "Unknown database 'mysqldump_test_d'" when selecting the database +/*!999999\- enable the sandbox mode */ mariadb-dump: Got error: 1049: "Unknown database 'mysqld\ump_test_db'" when selecting the database +/*!999999\- enable the sandbox mode */ drop table t1, t2, t3; drop database mysqldump_test_db; use test; @@ -1718,6 +1761,7 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1749,6 +1793,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1867,6 +1912,7 @@ create table t1(a int); create table t2(a int); create table t3(a int); mariadb-dump: Couldn't find table: "non_existing" +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1916,6 +1962,7 @@ drop table t1, t2, t3; create table t1 (a int); mariadb-dump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ `a` FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064) mariadb-dump: Got error: 1064: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1" when retrieving data from server +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1957,6 +2004,7 @@ CREATE TABLE `t1` ( PRIMARY KEY (`a b`, `c"d`, `e``f`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; insert into t1 values (0815, 4711, 2006); +/*!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1986,6 +2034,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2040,6 +2089,7 @@ INSERT INTO t2 VALUES ('bingo'); INSERT INTO t2 VALUES ('waffle'); INSERT INTO t2 VALUES ('lemon'); create view v2 as select * from t2 where a like 'a%' with check option; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2134,6 +2184,7 @@ drop database db1; use test; create table t1(a int); create view v1 as select * from t1; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2204,6 +2255,7 @@ INSERT INTO t2 VALUES ('bingo'); INSERT INTO t2 VALUES ('waffle'); INSERT INTO t2 VALUES ('lemon'); create view v2 as select * from t2 where a like 'a%' with check option; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2269,6 +2321,7 @@ use test; # CREATE TABLE t1 (a char(10)); INSERT INTO t1 VALUES ('\''); +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2315,6 +2368,7 @@ create view v1 as select * from v3 where b in (1, 2, 3, 4, 5, 6, 7); create view v2 as select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2464,6 +2518,7 @@ end if; end AFTER 0000-00-00 00:00:00 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci INSERT INTO t1 (a) VALUES (1),(2),(3),(22); update t1 set a = 4 where a=3; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2593,6 +2648,7 @@ DELIMITER ; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2740,6 +2796,7 @@ Warning 1287 '