diff options
285 files changed, 2180 insertions, 1546 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index ba7579a06ca..3f386d2b63f 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -314,8 +314,8 @@ class Load_log_processor } public: - Load_log_processor() {} - ~Load_log_processor() {} + Load_log_processor() = default; + ~Load_log_processor() = default; int init() { diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 1cc215f1c82..bad6e6eecf0 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -97,13 +97,6 @@ fi case "${LSBNAME}" in # Debian - stretch) - # MDEV-16525 libzstd-dev-1.1.3 minimum version - sed -e '/libzstd-dev/d' \ - -e 's/libcurl4/libcurl3/g' -i debian/control - remove_rocksdb_tools - disable_pmem - ;& buster) replace_uring_with_aio if [ ! "$architecture" = amd64 ] diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 977ac46062b..4d2a96d8a21 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -1294,7 +1294,7 @@ struct my_option xb_client_options[]= { {"rsync", OPT_RSYNC, "Uses the rsync utility to optimize local file " - "transfers. When this option is specified, innobackupex uses rsync " + "transfers. When this option is specified, " XB_TOOL_NAME " uses rsync " "to copy all non-InnoDB files instead of spawning a separate cp for " "each file, which can be much faster for servers with a large number " "of databases or tables. This option cannot be used together with " @@ -1402,7 +1402,7 @@ struct my_option xb_client_options[]= { {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, "This option specifies which types of queries are allowed to complete " - "before innobackupex will issue the global lock. Default is all.", + "before " XB_TOOL_NAME " will issue the global lock. Default is all.", (uchar *) &opt_lock_wait_query_type, (uchar *) &opt_lock_wait_query_type, &query_type_typelib, GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0}, @@ -1422,26 +1422,26 @@ struct my_option xb_client_options[]= { NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT, - "This option specifies the number of seconds innobackupex waits " + "This option specifies the number of seconds " XB_TOOL_NAME " waits " "between starting FLUSH TABLES WITH READ LOCK and killing those " "queries that block it. Default is 0 seconds, which means " - "innobackupex will not attempt to kill any queries.", + XB_TOOL_NAME " will not attempt to kill any queries.", (uchar *) &opt_kill_long_queries_timeout, (uchar *) &opt_kill_long_queries_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT, - "This option specifies time in seconds that innobackupex should wait " + "This option specifies time in seconds that " XB_TOOL_NAME " should wait " "for queries that would block FTWRL before running it. If there are " - "still such queries when the timeout expires, innobackupex terminates " - "with an error. Default is 0, in which case innobackupex does not " + "still such queries when the timeout expires, " XB_TOOL_NAME " terminates " + "with an error. Default is 0, in which case " XB_TOOL_NAME " does not " "wait for queries to complete and starts FTWRL immediately.", (uchar *) &opt_lock_wait_timeout, (uchar *) &opt_lock_wait_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD, "This option specifies the query run time threshold which is used by " - "innobackupex to detect long-running queries with a non-zero value " + XB_TOOL_NAME " to detect long-running queries with a non-zero value " "of --ftwrl-wait-timeout. FTWRL is not started until such " "long-running queries exist. This option has no effect if " "--ftwrl-wait-timeout is 0. Default value is 60 seconds.", @@ -1919,6 +1919,17 @@ xb_get_one_option(const struct my_option *opt, break; case OPT_INNODB_FLUSH_METHOD: +#ifdef _WIN32 + /* From: storage/innobase/handler/ha_innodb.cc:innodb_init_params */ + switch (srv_file_flush_method) { + case SRV_ALL_O_DIRECT_FSYNC + 1 /* "async_unbuffered"="unbuffered" */: + srv_file_flush_method= SRV_ALL_O_DIRECT_FSYNC; + break; + case SRV_ALL_O_DIRECT_FSYNC + 2 /* "normal"="fsync" */: + srv_file_flush_method= SRV_FSYNC; + break; + } +#endif ut_a(srv_file_flush_method <= IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT_NO_FSYNC)); ADD_PRINT_PARAM_OPT(innodb_flush_method_names[srv_file_flush_method]); @@ -3076,7 +3087,9 @@ static bool xtrabackup_copy_logfile(bool last = false) ut_ad(start_lsn == log_sys.log.scanned_lsn); - msg(">> log scanned up to (" LSN_PF ")", start_lsn); + if (verbose) { + msg(">> log scanned up to (" LSN_PF ")", start_lsn); + } /* update global variable*/ pthread_mutex_lock(&backup_mutex); diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h index 37cc54e5abb..ff7adf49252 100644 --- a/extra/mariabackup/xtrabackup.h +++ b/extra/mariabackup/xtrabackup.h @@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA #include "changed_page_bitmap.h" #include <set> +#define XB_TOOL_NAME "mariadb-backup" + struct xb_delta_info_t { xb_delta_info_t(ulint page_size, ulint zip_size, ulint space_id) diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt index 5f446663dc8..390a618ac91 100644 --- a/extra/wolfssl/CMakeLists.txt +++ b/extra/wolfssl/CMakeLists.txt @@ -12,6 +12,9 @@ IF(MSVC_INTEL) SET(WOLFSSL_X86_64_BUILD 1) SET(HAVE_INTEL_RDSEED 1) SET(HAVE_INTEL_RDRAND 1) +ELSEIF(CMAKE_ASM_COMPILER_ID MATCHES "Clang" AND CMAKE_VERSION VERSION_LESS 3.16) + + # WolfSSL 5.5.4 bug workaround below does not work, due to some CMake bug ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") SET(WOLFSSL_X86_64_BUILD 1) IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) diff --git a/include/ilist.h b/include/ilist.h index 45c0bbf7d2c..dc8be5d5044 100644 --- a/include/ilist.h +++ b/include/ilist.h @@ -27,12 +27,11 @@ // Derive your class from this struct to insert to a linked list. template <class Tag= void> struct ilist_node { - ilist_node() noexcept #ifndef DBUG_OFF - : next(NULL), prev(NULL) + ilist_node() noexcept : next(NULL), prev(NULL) {} +#else + ilist_node() = default; #endif - { - } ilist_node(ilist_node *next, ilist_node *prev) noexcept : next(next), prev(prev) diff --git a/include/my_atomic_wrapper.h b/include/my_atomic_wrapper.h index e45aba9d22b..7b35b14d3b7 100644 --- a/include/my_atomic_wrapper.h +++ b/include/my_atomic_wrapper.h @@ -39,7 +39,7 @@ public: Atomic_relaxed(const Atomic_relaxed<Type> &rhs) { m.store(rhs, std::memory_order_relaxed); } Atomic_relaxed(Type val) : m(val) {} - Atomic_relaxed() {} + Atomic_relaxed() = default; Type load(std::memory_order o= std::memory_order_relaxed) const { return m.load(o); } diff --git a/include/my_counter.h b/include/my_counter.h index c5cbe296df0..f85b8e80bd7 100644 --- a/include/my_counter.h +++ b/include/my_counter.h @@ -31,7 +31,7 @@ public: Atomic_counter(const Atomic_counter<Type> &rhs) { m_counter.store(rhs, std::memory_order_relaxed); } Atomic_counter(Type val): m_counter(val) {} - Atomic_counter() {} + Atomic_counter() = default; Type operator++(int) { return add(1); } Type operator--(int) { return sub(1); } diff --git a/include/span.h b/include/span.h index 0e8516933c6..4ea200f5494 100644 --- a/include/span.h +++ b/include/span.h @@ -81,7 +81,7 @@ public: span(const span &other) : data_(other.data_), size_(other.size_) {} - ~span(){}; + ~span() = default; span &operator=(const span &other) { diff --git a/mysql-test/include/ctype_casefolding.inc b/mysql-test/include/ctype_casefolding.inc new file mode 100644 index 00000000000..4ee402c95ad --- /dev/null +++ b/mysql-test/include/ctype_casefolding.inc @@ -0,0 +1,18 @@ +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +# Uncode code points that have a variable length case mapping in utf8 +# (e.g. LOWER('2-byte-character') -> '3-byte-character' +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +DROP TABLE case_folding; diff --git a/mysql-test/main/ctype_ldml.result b/mysql-test/main/ctype_ldml.result index 05b31a4ea70..74989a53daa 100644 --- a/mysql-test/main/ctype_ldml.result +++ b/mysql-test/main/ctype_ldml.result @@ -3036,9 +3036,57 @@ SELECT 'chž'< 'i'; SELECT 'a' COLLATE utf8_czech_test_bad_w2; ERROR HY000: Unknown collation: 'utf8_czech_test_bad_w2' # +# End of 10.2 tests +# +# +# Start of 10.3 tests +# +# +# MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8 +# +SET NAMES utf8mb4 COLLATE utf8mb4_test_520_nopad_ci; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_test_520_nopad_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +# +# End of 10.3 tests +# +# # MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO # SHOW COLLATION LIKE 'latin1_test_replace'; Collation Charset Id Default Compiled Sortlen SELECT 'foo' = 'foo ' COLLATE latin1_test_replace; ERROR HY000: Unknown collation: 'latin1_test_replace' +# +# End of 10.5 tests +# diff --git a/mysql-test/main/ctype_ldml.test b/mysql-test/main/ctype_ldml.test index 2da99e89de5..2e38c092d27 100644 --- a/mysql-test/main/ctype_ldml.test +++ b/mysql-test/main/ctype_ldml.test @@ -610,6 +610,27 @@ SELECT 'chž'< 'i'; --error ER_UNKNOWN_COLLATION SELECT 'a' COLLATE utf8_czech_test_bad_w2; +--echo # +--echo # End of 10.2 tests +--echo # + + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8 +--echo # + +SET NAMES utf8mb4 COLLATE utf8mb4_test_520_nopad_ci; +--source include/ctype_casefolding.inc + + +--echo # +--echo # End of 10.3 tests +--echo # + --echo # --echo # MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO @@ -618,3 +639,7 @@ SELECT 'a' COLLATE utf8_czech_test_bad_w2; SHOW COLLATION LIKE 'latin1_test_replace'; --error ER_UNKNOWN_COLLATION SELECT 'foo' = 'foo ' COLLATE latin1_test_replace; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/mysql-test/main/ctype_uca.result b/mysql-test/main/ctype_uca.result index a2f9822131b..b567137df1e 100644 --- a/mysql-test/main/ctype_uca.result +++ b/mysql-test/main/ctype_uca.result @@ -8204,7 +8204,7 @@ INSERT INTO t1 VALUES (_utf32 0x2CEE); SELECT hex(c), hex(lower(c)), hex(upper(c)), hex(weight_string(c)), c FROM t1 ORDER BY c, BINARY c; hex(c) hex(lower(c)) hex(upper(c)) hex(weight_string(c)) c -C8BA C8BA 1214 Ⱥ +C8BA E2B1A5 C8BA 1214 Ⱥ E2B1A5 E2B1A5 C8BA 1214 ⱥ C680 C680 C983 122D ƀ C983 C680 C983 122D Ƀ @@ -8229,7 +8229,7 @@ E2B1AA E2B1AA E2B1A9 1328 ⱪ C8BD C69A C8BD 133B Ƚ E2B1A0 E2B1A1 E2B1A0 133F Ⱡ E2B1A1 E2B1A1 E2B1A0 133F ⱡ -C9AB C9AB 1340 ɫ +C9AB C9AB E2B1A2 1340 ɫ E2B1A2 C9AB E2B1A2 1340 Ɫ E1B5BD E1B5BD E2B1A3 13B8 ᵽ E2B1A3 E1B5BD E2B1A3 13B8 Ᵽ @@ -8237,11 +8237,11 @@ C98A C98B C98A 13D2 Ɋ C98B C98B C98A 13D2 ɋ C98C C98D C98C 13E4 Ɍ C98D C98D C98C 13E4 ɍ -C9BD C9BD 13FC ɽ +C9BD C9BD E2B1A4 13FC ɽ E2B1A4 C9BD E2B1A4 13FC Ɽ EA9CA8 EA9CA9 EA9CA8 143314AD Ꜩ EA9CA9 EA9CA9 EA9CA8 143314AD ꜩ -C8BE C8BE 143C Ⱦ +C8BE E2B1A6 C8BE 143C Ⱦ E2B1A6 E2B1A6 C8BE 143C ⱦ C984 CA89 C984 145B Ʉ CA89 CA89 C984 145B ʉ diff --git a/mysql-test/main/ctype_utf8_uca.result b/mysql-test/main/ctype_utf8_uca.result index b1be3c23bda..d5a2950747e 100644 --- a/mysql-test/main/ctype_utf8_uca.result +++ b/mysql-test/main/ctype_utf8_uca.result @@ -587,3 +587,177 @@ DROP TABLE t1; # # End of 10.2 tests # +# +# Start of 10.3 tests +# +# +# MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8 +# +SET NAMES utf8mb3 COLLATE utf8mb3_unicode_ci /*Unicode-4.0 folding*/; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A C8BA C8BA Ⱥ +23E C8BE C8BE Ⱦ +23F C8BF C8BF ȿ +240 C980 C980 ɀ +250 C990 C990 ɐ +251 C991 C991 ɑ +252 C992 C992 ɒ +26B C9AB C9AB ɫ +271 C9B1 C9B1 ɱ +27D C9BD C9BD ɽ +DROP TABLE case_folding; +SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_ci; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_520_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_nopad_ci; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_520_nopad_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +SET NAMES utf8mb3 COLLATE utf8mb3_myanmar_ci; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_myanmar_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +SET NAMES utf8mb3 COLLATE utf8mb3_thai_520_w2; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_thai_520_w2 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +# +# End of 10.3 tests +# diff --git a/mysql-test/main/ctype_utf8_uca.test b/mysql-test/main/ctype_utf8_uca.test index 0879b4d2810..38bcce8f4ba 100644 --- a/mysql-test/main/ctype_utf8_uca.test +++ b/mysql-test/main/ctype_utf8_uca.test @@ -21,3 +21,32 @@ SET NAMES utf8 COLLATE utf8_unicode_nopad_ci; --echo # --echo # End of 10.2 tests --echo # + + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8 +--echo # + +SET NAMES utf8mb3 COLLATE utf8mb3_unicode_ci /*Unicode-4.0 folding*/; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_ci; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_nopad_ci; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb3 COLLATE utf8mb3_myanmar_ci; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb3 COLLATE utf8mb3_thai_520_w2; +--source include/ctype_casefolding.inc + + +--echo # +--echo # End of 10.3 tests +--echo # diff --git a/mysql-test/main/ctype_utf8mb4_uca.result b/mysql-test/main/ctype_utf8mb4_uca.result index 8b19412a69b..65d8a07a3f3 100644 --- a/mysql-test/main/ctype_utf8mb4_uca.result +++ b/mysql-test/main/ctype_utf8mb4_uca.result @@ -6605,3 +6605,177 @@ SET NAMES utf8mb4; # # End of 10.2 tests # +# +# Start of 10.3 tests +# +# +# MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8 +# +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci /*Unicode-4.0 folding*/; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A C8BA C8BA Ⱥ +23E C8BE C8BE Ⱦ +23F C8BF C8BF ȿ +240 C980 C980 ɀ +250 C990 C990 ɐ +251 C991 C991 ɑ +252 C992 C992 ɒ +26B C9AB C9AB ɫ +271 C9B1 C9B1 ɱ +27D C9BD C9BD ɽ +DROP TABLE case_folding; +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +SET NAMES utf8mb4 COLLATE utf8mb4_myanmar_ci; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_myanmar_ci DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +SET NAMES utf8mb4 COLLATE utf8mb4_thai_520_w2; +CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0; +SHOW CREATE TABLE case_folding; +Table Create Table +case_folding CREATE TABLE `case_folding` ( + `code` int(1) NOT NULL, + `c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +INSERT INTO case_folding (code) VALUES +(0x23A), +(0x23E), +(0x23F), +(0x240), +(0x250), +(0x251), +(0x252), +(0x26B), +(0x271), +(0x27D); +UPDATE case_folding SET c=CHAR(code USING ucs2); +SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding; +HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c +23A E2B1A5 C8BA Ⱥ +23E E2B1A6 C8BE Ⱦ +23F C8BF E2B1BE ȿ +240 C980 E2B1BF ɀ +250 C990 E2B1AF ɐ +251 C991 E2B1AD ɑ +252 C992 E2B1B0 ɒ +26B C9AB E2B1A2 ɫ +271 C9B1 E2B1AE ɱ +27D C9BD E2B1A4 ɽ +DROP TABLE case_folding; +# +# End of 10.3 tests +# diff --git a/mysql-test/main/ctype_utf8mb4_uca.test b/mysql-test/main/ctype_utf8mb4_uca.test index 7a95da8468c..81f07d7e03f 100644 --- a/mysql-test/main/ctype_utf8mb4_uca.test +++ b/mysql-test/main/ctype_utf8mb4_uca.test @@ -108,3 +108,32 @@ SET NAMES utf8mb4; --echo # --echo # End of 10.2 tests --echo # + + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8 +--echo # + +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci /*Unicode-4.0 folding*/; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb4 COLLATE utf8mb4_myanmar_ci; +--source include/ctype_casefolding.inc + +SET NAMES utf8mb4 COLLATE utf8mb4_thai_520_w2; +--source include/ctype_casefolding.inc + + +--echo # +--echo # End of 10.3 tests +--echo # diff --git a/mysql-test/main/delete.result b/mysql-test/main/delete.result index ed3683d52f9..7a9963abc71 100644 --- a/mysql-test/main/delete.result +++ b/mysql-test/main/delete.result @@ -525,3 +525,35 @@ DELETE v2 FROM v2; ERROR HY000: Can not delete from join view 'test.v2' DROP VIEW v2, v1; DROP TABLE t1, t2; +End of 5.5 tests +# +# MDEV-30586: DELETE with WHERE containing nested subquery +# with set function aggregated in outer subquery +# +create table t1 (a int); +insert into t1 values (3), (7), (1); +create table t2 (b int); +insert into t2 values (2), (1), (4), (7); +create table t3 (a int, b int); +insert into t3 values (2,10), (7,30), (2,30), (1,10), (7,40); +select * from t1 +where t1.a in (select t3.a from t3 group by t3.a +having t3.a > any (select t2.b from t2 +where t2.b*10 < sum(t3.b))); +a +7 +delete from t1 +where t1.a in (select t3.a from t3 group by t3.a +having t3.a > any (select t2.b from t2 +where t2.b*10 < sum(t3.b))); +select * from t1 +where t1.a in (select t3.a from t3 group by t3.a +having t3.a > any (select t2.b from t2 +where t2.b*10 < sum(t3.b))); +a +update t1 set t1.a=t1.a+10 +where t1.a in (select t3.a from t3 group by t3.a +having t3.a > any (select t2.b from t2 +where t2.b*10 < sum(t3.b))); +drop table t1,t2,t3; +End of 10.4 tests diff --git a/mysql-test/main/delete.test b/mysql-test/main/delete.test index c82420640c2..6d898ec769d 100644 --- a/mysql-test/main/delete.test +++ b/mysql-test/main/delete.test @@ -582,3 +582,44 @@ DELETE v2 FROM v2; DROP VIEW v2, v1; DROP TABLE t1, t2; + +--echo End of 5.5 tests + +--echo # +--echo # MDEV-30586: DELETE with WHERE containing nested subquery +--echo # with set function aggregated in outer subquery +--echo # + +create table t1 (a int); +insert into t1 values (3), (7), (1); + +create table t2 (b int); +insert into t2 values (2), (1), (4), (7); + +create table t3 (a int, b int); +insert into t3 values (2,10), (7,30), (2,30), (1,10), (7,40); + +let $c= + t1.a in (select t3.a from t3 group by t3.a + having t3.a > any (select t2.b from t2 + where t2.b*10 < sum(t3.b))); + +eval +select * from t1 + where $c; + +eval +delete from t1 + where $c; + +eval +select * from t1 + where $c; + +eval +update t1 set t1.a=t1.a+10 + where $c; + +drop table t1,t2,t3; + +--echo End of 10.4 tests diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result index 61e04c3d4a9..d6cf9ba685f 100644 --- a/mysql-test/main/multi_update.result +++ b/mysql-test/main/multi_update.result @@ -1251,3 +1251,123 @@ EXPLAIN } } DROP TABLES t1, t2; +# End of 10.3 tests +# +# MDEV-28538: multi-table UPDATE/DELETE with possible exists-to-in +# +create table t1 (c1 int, c2 int, c3 int, index idx(c2)); +insert into t1 values +(1,1,1),(3,2,2),(1,3,3), +(2,1,4),(2,2,5),(4,3,6), +(2,4,7),(2,5,8); +create table t2 (c1 int, c2 int, c3 int, index idx(c2)); +insert into t2 values +(1,7,1),(1,8,2),(1,3,3), +(2,1,4),(2,2,5),(2,3,6), +(2,4,7),(2,5,8); +create table t3 (c1 int, c2 int, c3 int, index idx(c2)); +insert into t3 values +(1,1,1),(1,2,2),(1,3,3), +(2,1,4),(2,2,5),(2,3,6), +(2,4,7),(2,5,8); +insert into t3 select c1+1, c2+2, c3 from t3; +insert into t3 select c1, c2+2, c3 from t3; +analyze table t1,t2,t3 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +explain select * from t1,t3 +where t1.c2 = t3.c2 and +t1.c1 > 1 and +exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL idx NULL NULL NULL 8 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +1 PRIMARY t3 ref idx idx 5 test.t1.c2 3 +2 MATERIALIZED t2 range idx idx 5 NULL 3 Using index condition; Using where +explain delete from t1 using t1,t3 +where t1.c2 = t3.c2 and +t1.c1 > 1 and +exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL idx NULL NULL NULL 8 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +1 PRIMARY t3 ref idx idx 5 test.t1.c2 3 Using index +2 MATERIALIZED t2 range idx idx 5 NULL 3 Using where +explain update t1,t3 set t1.c1 = t1.c1+10 +where t1.c2 = t3.c2 and +t1.c1 > 1 and +exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL idx NULL NULL NULL 8 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +1 PRIMARY t3 ref idx idx 5 test.t1.c2 3 Using index +2 MATERIALIZED t2 range idx idx 5 NULL 3 Using where +create table t as select * from t1; +select * from t1,t3 +where t1.c2 = t3.c2 and +t1.c1 > 1 and +exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4); +c1 c2 c3 c1 c2 c3 +2 1 4 1 1 1 +2 1 4 2 1 4 +2 2 5 1 2 2 +2 2 5 2 2 5 +2 4 7 2 4 7 +2 4 7 2 4 2 +2 4 7 3 4 5 +2 4 7 1 4 2 +2 4 7 2 4 5 +2 5 8 2 5 8 +2 5 8 2 5 3 +2 5 8 3 5 6 +2 5 8 1 5 3 +2 5 8 2 5 6 +2 5 8 2 5 1 +2 5 8 3 5 4 +select * from t1; +c1 c2 c3 +1 1 1 +3 2 2 +1 3 3 +2 1 4 +2 2 5 +4 3 6 +2 4 7 +2 5 8 +delete from t1 using t1,t3 +where t1.c2 = t3.c2 and +t1.c1 > 1 and +exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4); +select * from t1; +c1 c2 c3 +1 1 1 +3 2 2 +1 3 3 +4 3 6 +truncate table t1; +insert into t1 select * from t; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +update t1,t3 set t1.c1 = t1.c1+10 +where t1.c2 = t3.c2 and +t1.c1 > 1 and +exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4); +select * from t1; +c1 c2 c3 +1 1 1 +3 2 2 +1 3 3 +12 1 4 +12 2 5 +4 3 6 +12 4 7 +12 5 8 +drop table t1,t2,t3,t; +# End of 10.4 tests diff --git a/mysql-test/main/multi_update.test b/mysql-test/main/multi_update.test index 54c64918e03..48e6250393b 100644 --- a/mysql-test/main/multi_update.test +++ b/mysql-test/main/multi_update.test @@ -1130,3 +1130,73 @@ EXPLAIN FORMAT=JSON UPDATE t2 JOIN t1 USING(a) SET t2.part=2 WHERE t2.part=1 AND EXPLAIN FORMAT=JSON UPDATE t2 JOIN t1 USING(a) SET t2.part=3 WHERE t2.part=2 AND t1.part=2; DROP TABLES t1, t2; + +--echo # End of 10.3 tests + +--echo # +--echo # MDEV-28538: multi-table UPDATE/DELETE with possible exists-to-in +--echo # + +create table t1 (c1 int, c2 int, c3 int, index idx(c2)); +insert into t1 values +(1,1,1),(3,2,2),(1,3,3), +(2,1,4),(2,2,5),(4,3,6), +(2,4,7),(2,5,8); + +create table t2 (c1 int, c2 int, c3 int, index idx(c2)); +insert into t2 values +(1,7,1),(1,8,2),(1,3,3), +(2,1,4),(2,2,5),(2,3,6), +(2,4,7),(2,5,8); + +create table t3 (c1 int, c2 int, c3 int, index idx(c2)); +insert into t3 values +(1,1,1),(1,2,2),(1,3,3), +(2,1,4),(2,2,5),(2,3,6), +(2,4,7),(2,5,8); +insert into t3 select c1+1, c2+2, c3 from t3; +insert into t3 select c1, c2+2, c3 from t3; + +analyze table t1,t2,t3 persistent for all; + +let $c= + t1.c2 = t3.c2 and + t1.c1 > 1 and + exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4); + +let $q1= +select * from t1,t3 +where $c; + +eval explain $q1; + +let $q2= +delete from t1 using t1,t3 +where $c; + +eval explain $q2; + +let $q3= +update t1,t3 set t1.c1 = t1.c1+10 +where $c; + +eval explain $q3; + +create table t as select * from t1; + +eval $q1; +select * from t1; + +eval $q2; +select * from t1; + +truncate table t1; +insert into t1 select * from t; +analyze table t1 persistent for all; + +eval $q3; +select * from t1; + +drop table t1,t2,t3,t; + +--echo # End of 10.4 tests diff --git a/mysql-test/main/update_use_source.result b/mysql-test/main/update_use_source.result index 2774e7ee92d..5a9e0a7750c 100644 --- a/mysql-test/main/update_use_source.result +++ b/mysql-test/main/update_use_source.result @@ -76,7 +76,8 @@ rollback; explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where -2 DEPENDENT SUBQUERY a ALL NULL NULL NULL NULL 8 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED a ALL NULL NULL NULL NULL 8 start transaction; update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3; affected rows: 4 @@ -317,7 +318,8 @@ rollback; explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where -2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 4 Using index +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED a range t1_c2 t1_c2 5 NULL 2 Using where; Using index start transaction; update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3; affected rows: 4 @@ -558,7 +560,8 @@ rollback; explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where -2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 1 Using index +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED a range t1_c2 t1_c2 5 NULL 2 Using where; Using index start transaction; update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3; affected rows: 4 @@ -800,7 +803,8 @@ rollback; explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where -2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 1 Using index +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED a range t1_c2 t1_c2 5 NULL 2 Using where; Using index start transaction; update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3; affected rows: 4 diff --git a/mysql-test/suite/galera/r/MDEV-24143.result b/mysql-test/suite/galera/r/MDEV-24143.result deleted file mode 100644 index 860d8a35834..00000000000 --- a/mysql-test/suite/galera/r/MDEV-24143.result +++ /dev/null @@ -1,23 +0,0 @@ -connection node_2; -connection node_1; -CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME); -SELECT get_lock ('test2', 0); -get_lock ('test2', 0) -1 -DROP TABLE t1; -CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY); -INSERT INTO t1 VALUES (1); -SET SESSION wsrep_trx_fragment_size=10; -SET SESSION autocommit=0; -SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC; -c1 -INSERT INTO t1 VALUES (4),(3),(1),(2); -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE; -ERROR 42S01: Table 't1' already exists -ALTER TABLE t1 DROP COLUMN c2; -ERROR 42000: Can't DROP COLUMN `c2`; check that it exists -SELECT get_lock ('test', 1.5); -get_lock ('test', 1.5) -1 -DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_backup_start.result b/mysql-test/suite/galera/r/galera_backup_start.result new file mode 100644 index 00000000000..253a0ce7416 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_backup_start.result @@ -0,0 +1,6 @@ +connection node_2; +connection node_1; +BACKUP STAGE START; +START TRANSACTION; +COMMIT; +BACKUP STAGE END; diff --git a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result deleted file mode 100644 index 0ef2a1a72c6..00000000000 --- a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result +++ /dev/null @@ -1,18 +0,0 @@ -connection node_2; -connection node_1; -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; -connection node_2a; -SELECT GET_LOCK("foo", 1000); -GET_LOCK("foo", 1000) -1 -connection node_2; -SET AUTOCOMMIT=OFF; -INSERT INTO t1 VALUES (1); -SELECT GET_LOCK("foo", 1000);; -connection node_1; -INSERT INTO t1 VALUES (1); -connection node_2; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -wsrep_local_aborts_increment -1 -DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_locks_funcs.result b/mysql-test/suite/galera/r/galera_locks_funcs.result new file mode 100644 index 00000000000..25d3bbe28f5 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_locks_funcs.result @@ -0,0 +1,24 @@ +connection node_2; +connection node_1; +CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB; +INSERT INTO t values (1,1); +SELECT GET_LOCK('a',1); +ERROR 42000: This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' +SHOW WARNINGS; +Level Code Message +Error 1235 This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)' +SELECT * FROM t; +c c2 +1 1 +SELECT RELEASE_LOCK('a'); +ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)' +SHOW WARNINGS; +Level Code Message +Error 1235 This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)' +SELECT RELEASE_ALL_LOCKS(); +ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)' +SHOW WARNINGS; +Level Code Message +Error 1235 This version of MariaDB doesn't yet support 'RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)' +COMMIT; +DROP TABLE t; diff --git a/mysql-test/suite/galera/t/MDEV-24143.test b/mysql-test/suite/galera/t/MDEV-24143.test deleted file mode 100644 index e58f147cb7c..00000000000 --- a/mysql-test/suite/galera/t/MDEV-24143.test +++ /dev/null @@ -1,20 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_sequence.inc - -CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME); -SELECT get_lock ('test2', 0); -DROP TABLE t1; -CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY); -INSERT INTO t1 VALUES (1); -SET SESSION wsrep_trx_fragment_size=10; -SET SESSION autocommit=0; -SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC; ---error ER_LOCK_DEADLOCK -INSERT INTO t1 VALUES (4),(3),(1),(2); ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE; ---error ER_CANT_DROP_FIELD_OR_KEY -ALTER TABLE t1 DROP COLUMN c2; -SELECT get_lock ('test', 1.5); -DROP TABLE t1; - diff --git a/mysql-test/suite/galera/t/galera_backup_start.test b/mysql-test/suite/galera/t/galera_backup_start.test new file mode 100644 index 00000000000..4489e9ff582 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_backup_start.test @@ -0,0 +1,6 @@ +--source include/galera_cluster.inc + +BACKUP STAGE START; +START TRANSACTION; +COMMIT; +BACKUP STAGE END; diff --git a/mysql-test/suite/galera/t/galera_bf_abort_get_lock.test b/mysql-test/suite/galera/t/galera_bf_abort_get_lock.test deleted file mode 100644 index 72fc1c5b583..00000000000 --- a/mysql-test/suite/galera/t/galera_bf_abort_get_lock.test +++ /dev/null @@ -1,36 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_innodb.inc - -# -# Test a local transaction being aborted by a slave one while it is running a GET_LOCK() -# - -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; - ---let $galera_connection_name = node_2a ---let $galera_server_number = 2 ---source include/galera_connect.inc ---connection node_2a -SELECT GET_LOCK("foo", 1000); - ---connection node_2 -SET AUTOCOMMIT=OFF; ---let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` -INSERT INTO t1 VALUES (1); ---send SELECT GET_LOCK("foo", 1000); - ---connection node_1 -INSERT INTO t1 VALUES (1); - ---connection node_2 ---error ER_LOCK_DEADLOCK ---reap - ---let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` - -# Check that wsrep_local_bf_aborts has been incremented by exactly 1 ---disable_query_log ---eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment; ---enable_query_log - -DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_locks_funcs.test b/mysql-test/suite/galera/t/galera_locks_funcs.test new file mode 100644 index 00000000000..42838e9585c --- /dev/null +++ b/mysql-test/suite/galera/t/galera_locks_funcs.test @@ -0,0 +1,18 @@ +--source include/galera_cluster.inc + +CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB; +INSERT INTO t values (1,1); +--error ER_NOT_SUPPORTED_YET +SELECT GET_LOCK('a',1); +SHOW WARNINGS; +SELECT * FROM t; +--error ER_NOT_SUPPORTED_YET +SELECT RELEASE_LOCK('a'); +SHOW WARNINGS; +# New in 10.5 +--error ER_NOT_SUPPORTED_YET +SELECT RELEASE_ALL_LOCKS(); +SHOW WARNINGS; +COMMIT; +DROP TABLE t; + diff --git a/mysql-test/suite/mariabackup/full_backup_win.result b/mysql-test/suite/mariabackup/full_backup_win.result new file mode 100644 index 00000000000..940c7056d3f --- /dev/null +++ b/mysql-test/suite/mariabackup/full_backup_win.result @@ -0,0 +1,12 @@ +# +# MDEV-30492 Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered' +# +# xtrabackup backup +# xtrabackup prepare +# shutdown server +# remove datadir +# xtrabackup move back +# restart +# +# End of 10.4 tests +# diff --git a/mysql-test/suite/mariabackup/full_backup_win.test b/mysql-test/suite/mariabackup/full_backup_win.test new file mode 100644 index 00000000000..5a1d1c38026 --- /dev/null +++ b/mysql-test/suite/mariabackup/full_backup_win.test @@ -0,0 +1,24 @@ +--source include/windows.inc + +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; + +--echo # +--echo # MDEV-30492 Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered' +--echo # + +echo # xtrabackup backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --innodb_flush_method=normal --backup --target-dir=$targetdir; +--enable_result_log + +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --innodb-flush-method=async_unbuffered --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +rmdir $targetdir; + +--echo # +--echo # End of 10.4 tests +--echo # diff --git a/mysql-test/suite/plugins/r/locales.result b/mysql-test/suite/plugins/r/locales.result index 2ea88493705..e906d27c21e 100644 --- a/mysql-test/suite/plugins/r/locales.result +++ b/mysql-test/suite/plugins/r/locales.result @@ -1,3 +1,4 @@ +SET names utf8; select * from information_schema.locales; ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOUSAND_SEP ERROR_MESSAGE_LANGUAGE 0 en_US English - United States 9 9 . , english @@ -52,7 +53,7 @@ ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOU 49 ta_IN Tamil - India 10 8 . , english 50 te_IN Telugu - India 10 9 . , english 51 th_TH Thai - Thailand 10 8 . , english -52 tr_TR Turkish - Turkey 7 9 , . english +52 tr_TR Turkish - Türkiye 7 9 , . english 53 uk_UA Ukrainian - Ukraine 8 9 , . ukrainian 54 ur_PK Urdu - Pakistan 6 6 . , english 55 vi_VN Vietnamese - Vietnam 16 11 , . english @@ -165,7 +166,7 @@ Id Name Description Error_Message_Language 49 ta_IN Tamil - India english 50 te_IN Telugu - India english 51 th_TH Thai - Thailand english -52 tr_TR Turkish - Turkey english +52 tr_TR Turkish - Türkiye english 53 uk_UA Ukrainian - Ukraine ukrainian 54 ur_PK Urdu - Pakistan english 55 vi_VN Vietnamese - Vietnam english diff --git a/mysql-test/suite/plugins/t/locales.test b/mysql-test/suite/plugins/t/locales.test index a3afe75046f..2b4d56433d9 100644 --- a/mysql-test/suite/plugins/t/locales.test +++ b/mysql-test/suite/plugins/t/locales.test @@ -2,6 +2,7 @@ if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'lo { --skip LOCALES plugin is not active } +SET names utf8; select * from information_schema.locales; show locales; diff --git a/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result b/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result index f783b1e0783..b00a8a5e1d7 100644 --- a/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result +++ b/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result @@ -35,9 +35,19 @@ connection master; insert into t1 values (1); # Sleep 3 to create gap between events insert into t1 values (2); +include/save_master_pos.inc connection slave; LOCK TABLES t1 WRITE; +SET @@global.debug_dbug="+d,pause_sql_thread_on_next_event"; START SLAVE IO_THREAD; +# Before we start processing the events, we ensure both transactions +# were written into the relay log. Otherwise, if the IO thread takes too +# long to queue the events, the sql thread can think it has caught up +# too quickly. +SET DEBUG_SYNC='now WAIT_FOR paused_on_event'; +include/sync_io_with_master.inc +SET @@global.debug_dbug="-d,pause_sql_thread_on_next_event"; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; # Wait for first transaction to complete SQL delay and begin execution.. # Validate SBM calculation doesn't use the second transaction because SQL thread shouldn't have gone idle.. # ..and that SBM wasn't calculated using prior committed transactions @@ -50,6 +60,8 @@ UNLOCK TABLES; include/stop_slave.inc CHANGE MASTER TO master_delay=0; set @@GLOBAL.slave_parallel_threads=4; +SET @@global.debug_dbug=""; +SET DEBUG_SYNC='RESET'; include/start_slave.inc connection master; DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test b/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test index 4bcb7ad9e3f..1ac1bc14468 100644 --- a/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test +++ b/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test @@ -12,9 +12,12 @@ # --source include/master-slave.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc --connection slave --source include/stop_slave.inc +--let $old_debug_dbug= `SELECT @@global.debug_dbug` --let $master_delay= 3 --eval change master to master_delay=$master_delay, master_use_gtid=Slave_Pos --let $old_slave_threads= `SELECT @@GLOBAL.slave_parallel_threads` @@ -82,12 +85,24 @@ sleep 3; --eval insert into t1 values ($insert_ctr) --inc $insert_ctr --let $ts_trx_after_ins= `SELECT UNIX_TIMESTAMP()` +--source include/save_master_pos.inc --connection slave LOCK TABLES t1 WRITE; +SET @@global.debug_dbug="+d,pause_sql_thread_on_next_event"; + START SLAVE IO_THREAD; +--echo # Before we start processing the events, we ensure both transactions +--echo # were written into the relay log. Otherwise, if the IO thread takes too +--echo # long to queue the events, the sql thread can think it has caught up +--echo # too quickly. +SET DEBUG_SYNC='now WAIT_FOR paused_on_event'; +--source include/sync_io_with_master.inc +SET @@global.debug_dbug="-d,pause_sql_thread_on_next_event"; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; + --echo # Wait for first transaction to complete SQL delay and begin execution.. --let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting for table metadata lock%' AND command LIKE 'Slave_Worker'; --source include/wait_condition.inc @@ -120,6 +135,8 @@ UNLOCK TABLES; --source include/stop_slave.inc --eval CHANGE MASTER TO master_delay=0 --eval set @@GLOBAL.slave_parallel_threads=$old_slave_threads +--eval SET @@global.debug_dbug="$old_debug_dbug" +SET DEBUG_SYNC='RESET'; --source include/start_slave.inc --connection master diff --git a/mysys/charset.c b/mysys/charset.c index 19cad76fdf4..4c02ae5f1fb 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -393,6 +393,8 @@ static int add_collation(struct charset_info_st *cs) &my_charset_utf8mb4_unicode_ci, cs); newcs->m_ctype= my_charset_utf8mb4_unicode_ci.m_ctype; + if (init_state_maps(newcs)) + return MY_XML_ERROR; newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED; #endif } diff --git a/mysys/my_largepage.c b/mysys/my_largepage.c index 0fdc4e17a26..c5fc2a1264e 100644 --- a/mysys/my_largepage.c +++ b/mysys/my_largepage.c @@ -354,7 +354,7 @@ uchar *my_large_malloc(size_t *size, myf my_flags) ptr= NULL; if (my_flags & MY_WME) { - if (large_page_size) + if (large_page_size && errno == ENOMEM) { my_printf_error(EE_OUTOFMEMORY, "Couldn't allocate %zu bytes (Large/HugeTLB memory " diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc index 4d7ebc7bd27..00447e73d79 100644 --- a/mysys_ssl/my_crypt.cc +++ b/mysys_ssl/my_crypt.cc @@ -101,7 +101,7 @@ public: uchar source_tail[MY_AES_BLOCK_SIZE]; MyCTX_nopad() : MyCTX() { } - ~MyCTX_nopad() { } + ~MyCTX_nopad() = default; int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, const uchar *iv, uint ivlen) diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp index 937b1177ae4..db24e33a141 100644 --- a/plugin/handler_socket/handlersocket/database.cpp +++ b/plugin/handler_socket/handlersocket/database.cpp @@ -189,9 +189,7 @@ database::database(const config& c) { } -database::~database() -{ -} +database::~database() = default; dbcontext_ptr database::create_context(bool for_write) volatile @@ -226,9 +224,7 @@ dbcontext::dbcontext(volatile database *d, bool for_write) user_level_lock_timeout = d->get_conf().get_int("wrlock_timeout", 12); } -dbcontext::~dbcontext() -{ -} +dbcontext::~dbcontext() = default; namespace { diff --git a/plugin/handler_socket/handlersocket/database.hpp b/plugin/handler_socket/handlersocket/database.hpp index a4aee0874c7..ed5d00800d9 100644 --- a/plugin/handler_socket/handlersocket/database.hpp +++ b/plugin/handler_socket/handlersocket/database.hpp @@ -27,7 +27,7 @@ struct dbcontext_i; typedef std::auto_ptr<dbcontext_i> dbcontext_ptr; struct database_i { - virtual ~database_i() { } + virtual ~database_i() = default; virtual dbcontext_ptr create_context(bool for_write) volatile = 0; virtual void stop() volatile = 0; virtual const config& get_conf() const volatile = 0; @@ -57,7 +57,7 @@ struct prep_stmt { }; struct dbcallback_i { - virtual ~dbcallback_i () { } + virtual ~dbcallback_i() = default; virtual void dbcb_set_prep_stmt(size_t pst_id, const prep_stmt& v) = 0; virtual const prep_stmt *dbcb_get_prep_stmt(size_t pst_id) const = 0; virtual void dbcb_resp_short(uint32_t code, const char *msg) = 0; @@ -111,7 +111,7 @@ struct cmd_exec_args { }; struct dbcontext_i { - virtual ~dbcontext_i() { } + virtual ~dbcontext_i() = default; virtual void init_thread(const void *stack_bottom, volatile int& shutdown_flag) = 0; virtual void term_thread() = 0; diff --git a/plugin/handler_socket/handlersocket/hstcpsvr.hpp b/plugin/handler_socket/handlersocket/hstcpsvr.hpp index 811bfa25613..5fbed92402b 100644 --- a/plugin/handler_socket/handlersocket/hstcpsvr.hpp +++ b/plugin/handler_socket/handlersocket/hstcpsvr.hpp @@ -47,7 +47,7 @@ struct hstcpsvr_i; typedef std::auto_ptr<hstcpsvr_i> hstcpsvr_ptr; struct hstcpsvr_i { - virtual ~hstcpsvr_i() { } + virtual ~hstcpsvr_i() = default; virtual std::string start_listen() = 0; static hstcpsvr_ptr create(const config& conf); }; diff --git a/plugin/handler_socket/handlersocket/hstcpsvr_worker.hpp b/plugin/handler_socket/handlersocket/hstcpsvr_worker.hpp index 497581c27a7..25612adec0f 100644 --- a/plugin/handler_socket/handlersocket/hstcpsvr_worker.hpp +++ b/plugin/handler_socket/handlersocket/hstcpsvr_worker.hpp @@ -24,7 +24,7 @@ struct hstcpsvr_worker_arg { }; struct hstcpsvr_worker_i { - virtual ~hstcpsvr_worker_i() { } + virtual ~hstcpsvr_worker_i() = default; virtual void run() = 0; static hstcpsvr_worker_ptr create(const hstcpsvr_worker_arg& arg); }; diff --git a/plugin/handler_socket/libhsclient/hstcpcli.hpp b/plugin/handler_socket/libhsclient/hstcpcli.hpp index 11dec8ebb0b..fa0d4db1742 100644 --- a/plugin/handler_socket/libhsclient/hstcpcli.hpp +++ b/plugin/handler_socket/libhsclient/hstcpcli.hpp @@ -33,7 +33,7 @@ struct hstcpcli_i; typedef std::auto_ptr<hstcpcli_i> hstcpcli_ptr; struct hstcpcli_i { - virtual ~hstcpcli_i() { } + virtual ~hstcpcli_i() = default; virtual void close() = 0; virtual int reconnect() = 0; virtual bool stable_point() = 0; diff --git a/plugin/handler_socket/libhsclient/util.hpp b/plugin/handler_socket/libhsclient/util.hpp index 93d78cc7dc0..60b5441703d 100644 --- a/plugin/handler_socket/libhsclient/util.hpp +++ b/plugin/handler_socket/libhsclient/util.hpp @@ -13,7 +13,7 @@ namespace dena { /* boost::noncopyable */ struct noncopyable { - noncopyable() { } + noncopyable() = default; private: noncopyable(const noncopyable&); noncopyable& operator =(const noncopyable&); diff --git a/plugin/query_response_time/query_response_time.cc b/plugin/query_response_time/query_response_time.cc index a669f7d4236..e344f45b392 100644 --- a/plugin/query_response_time/query_response_time.cc +++ b/plugin/query_response_time/query_response_time.cc @@ -153,7 +153,7 @@ class time_collector public: time_collector(utility& u): m_utility(&u) { flush(); } - ~time_collector() { } + ~time_collector() = default; uint32_t count(uint index) { return m_count[index]; } uint64_t total(uint index) { return m_total[index]; } void flush() diff --git a/plugin/type_inet/sql_type_inet.h b/plugin/type_inet/sql_type_inet.h index b0560f1ffe0..69836ca215b 100644 --- a/plugin/type_inet/sql_type_inet.h +++ b/plugin/type_inet/sql_type_inet.h @@ -73,8 +73,8 @@ protected: memcpy(m_buffer, str, length); return false; } - // Non-initializing constructor - Inet4() { } + + Inet4() = default; public: void to_binary(char *dst, size_t dstsize) const { diff --git a/plugin/versioning/versioning.cc b/plugin/versioning/versioning.cc index 6d8f77550f6..c970a9d6561 100644 --- a/plugin/versioning/versioning.cc +++ b/plugin/versioning/versioning.cc @@ -36,8 +36,8 @@ public: static Create_func_trt<TRT_FIELD> s_singleton; protected: - Create_func_trt<TRT_FIELD>() {} - virtual ~Create_func_trt<TRT_FIELD>() {} + Create_func_trt<TRT_FIELD>() = default; + virtual ~Create_func_trt<TRT_FIELD>() = default; }; template<TR_table::field_id_t TRT_FIELD> @@ -132,8 +132,8 @@ public: static Create_func_trt_trx_sees<Item_func_trt_trx_seesX> s_singleton; protected: - Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() {} - virtual ~Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() {} + Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() = default; + virtual ~Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() = default; }; template<class X> diff --git a/sql/derived_handler.h b/sql/derived_handler.h index 171165bbe6f..f6feed8db32 100644 --- a/sql/derived_handler.h +++ b/sql/derived_handler.h @@ -56,7 +56,7 @@ public: derived_handler(THD *thd_arg, handlerton *ht_arg) : thd(thd_arg), ht(ht_arg), derived(0),table(0), tmp_table_param(0), unit(0), select(0) {} - virtual ~derived_handler() {} + virtual ~derived_handler() = default; /* Functions to scan data. All these returns 0 if ok, error code in case diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 3980f248327..bb552aa9de8 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -328,9 +328,7 @@ Event_queue_element::Event_queue_element(): SYNOPSIS Event_queue_element::Event_queue_element() */ -Event_queue_element::~Event_queue_element() -{ -} +Event_queue_element::~Event_queue_element() = default; /* @@ -356,9 +354,7 @@ Event_timed::Event_timed(): Event_timed::~Event_timed() */ -Event_timed::~Event_timed() -{ -} +Event_timed::~Event_timed() = default; /* diff --git a/sql/event_db_repository.h b/sql/event_db_repository.h index b89a1a15155..29b5031bc28 100644 --- a/sql/event_db_repository.h +++ b/sql/event_db_repository.h @@ -71,7 +71,7 @@ class Event_parse_data; class Event_db_repository { public: - Event_db_repository(){} + Event_db_repository() = default; bool create_event(THD *thd, Event_parse_data *parse_data, diff --git a/sql/field.h b/sql/field.h index e09f884b29c..b96eeedddac 100644 --- a/sql/field.h +++ b/sql/field.h @@ -605,7 +605,7 @@ public: name.length= 0; }; Virtual_column_info* clone(THD *thd); - ~Virtual_column_info() {}; + ~Virtual_column_info() = default; enum_vcol_info_type get_vcol_type() const { return vcol_type; @@ -895,7 +895,7 @@ public: Field(uchar *ptr_arg,uint32 length_arg,uchar *null_ptr_arg, uchar null_bit_arg, utype unireg_check_arg, const LEX_CSTRING *field_name_arg); - virtual ~Field() {} + virtual ~Field() = default; virtual Type_numeric_attributes type_numeric_attributes() const { @@ -5824,8 +5824,8 @@ public: Field *from_field,*to_field; String tmp; // For items - Copy_field() {} - ~Copy_field() {} + Copy_field() = default; + ~Copy_field() = default; void set(Field *to,Field *from,bool save); // Field to field void set(uchar *to,Field *from); // Field to string void (*do_copy)(Copy_field *); diff --git a/sql/filesort_utils.h b/sql/filesort_utils.h index 1962f149893..946b1cb4f06 100644 --- a/sql/filesort_utils.h +++ b/sql/filesort_utils.h @@ -238,22 +238,11 @@ public: /** We need an assignment operator, see filesort(). This happens to have the same semantics as the one that would be - generated by the compiler. We still implement it here, to show shallow - assignment explicitly: we have two objects sharing the same array. + generated by the compiler. + Note that this is a shallow copy. We have two objects sharing the same + array. */ - Filesort_buffer &operator=(const Filesort_buffer &rhs) - { - m_next_rec_ptr= rhs.m_next_rec_ptr; - m_rawmem= rhs.m_rawmem; - m_record_pointers= rhs.m_record_pointers; - m_sort_keys= rhs.m_sort_keys; - m_num_records= rhs.m_num_records; - m_record_length= rhs.m_record_length; - m_sort_length= rhs.m_sort_length; - m_size_in_bytes= rhs.m_size_in_bytes; - m_idx= rhs.m_idx; - return *this; - } + Filesort_buffer &operator=(const Filesort_buffer &rhs) = default; uint get_sort_length() const { return m_sort_length; } void set_sort_length(uint val) { m_sort_length= val; } diff --git a/sql/gcalc_slicescan.h b/sql/gcalc_slicescan.h index b5188f29dfd..37e887e87e5 100644 --- a/sql/gcalc_slicescan.h +++ b/sql/gcalc_slicescan.h @@ -344,7 +344,7 @@ public: { return complete_ring() || complete_poly(); } - virtual ~Gcalc_shape_transporter() {} + virtual ~Gcalc_shape_transporter() = default; }; diff --git a/sql/group_by_handler.h b/sql/group_by_handler.h index ff3b204fa56..5457cb778f5 100644 --- a/sql/group_by_handler.h +++ b/sql/group_by_handler.h @@ -77,7 +77,7 @@ public: group_by_handler(THD *thd_arg, handlerton *ht_arg) : thd(thd_arg), ht(ht_arg), table(0) {} - virtual ~group_by_handler() {} + virtual ~group_by_handler() = default; /* Functions to scan data. All these returns 0 if ok, error code in case diff --git a/sql/handler.h b/sql/handler.h index b709d87226b..e3d968808ee 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -885,7 +885,7 @@ struct xid_t { long bqual_length; char data[XIDDATASIZE]; // not \0-terminated ! - xid_t() {} /* Remove gcc warning */ + xid_t() = default; /* Remove gcc warning */ bool eq(struct xid_t *xid) const { return !xid->is_null() && eq(xid->gtrid_length, xid->bqual_length, xid->data); } bool eq(long g, long b, const char *d) const @@ -1651,7 +1651,7 @@ struct handlerton public: virtual bool add_table(const char *tname, size_t tlen) = 0; virtual bool add_file(const char *fname) = 0; - protected: virtual ~discovered_list() {} + protected: virtual ~discovered_list() = default; }; /* @@ -1894,7 +1894,7 @@ struct THD_TRANS m_unsafe_rollback_flags= 0; } bool is_empty() const { return ha_list == NULL; } - THD_TRANS() {} /* Remove gcc warning */ + THD_TRANS() = default; /* Remove gcc warning */ unsigned int m_unsafe_rollback_flags; /* @@ -2135,7 +2135,7 @@ struct Table_period_info: Sql_alloc struct start_end_t { - start_end_t() {}; + start_end_t() = default; start_end_t(const LEX_CSTRING& _start, const LEX_CSTRING& _end) : start(_start), end(_end) {} @@ -2470,9 +2470,9 @@ struct KEY_PAIR class inplace_alter_handler_ctx : public Sql_alloc { public: - inplace_alter_handler_ctx() {} + inplace_alter_handler_ctx() = default; - virtual ~inplace_alter_handler_ctx() {} + virtual ~inplace_alter_handler_ctx() = default; virtual void set_shared_data(const inplace_alter_handler_ctx& ctx) {} }; @@ -2727,8 +2727,8 @@ typedef struct st_key_create_information class TABLEOP_HOOKS { public: - TABLEOP_HOOKS() {} - virtual ~TABLEOP_HOOKS() {} + TABLEOP_HOOKS() = default; + virtual ~TABLEOP_HOOKS() = default; inline void prelock(TABLE **tables, uint count) { @@ -2769,7 +2769,7 @@ typedef class Item COND; typedef struct st_ha_check_opt { - st_ha_check_opt() {} /* Remove gcc warning */ + st_ha_check_opt() = default; /* Remove gcc warning */ uint flags; /* isam layer flags (e.g. for myisamchk) */ uint sql_flags; /* sql layer flags - for something myisamchk cannot do */ time_t start_time; /* When check/repair starts */ @@ -3148,8 +3148,8 @@ uint calculate_key_len(TABLE *, uint, const uchar *, key_part_map); class Handler_share { public: - Handler_share() {} - virtual ~Handler_share() {} + Handler_share() = default; + virtual ~Handler_share() = default; }; enum class Compare_keys : uint32_t @@ -5309,7 +5309,7 @@ public: const LEX_CSTRING *wild_arg); Discovered_table_list(THD *thd_arg, Dynamic_array<LEX_CSTRING*> *tables_arg) : thd(thd_arg), wild(NULL), with_temps(true), tables(tables_arg) {} - ~Discovered_table_list() {} + ~Discovered_table_list() = default; bool add_table(const char *tname, size_t tlen); bool add_file(const char *fname); diff --git a/sql/hash_filo.h b/sql/hash_filo.h index ac84e5ccb7b..4dba104f716 100644 --- a/sql/hash_filo.h +++ b/sql/hash_filo.h @@ -35,7 +35,7 @@ class hash_filo_element private: hash_filo_element *next_used,*prev_used; public: - hash_filo_element() {} + hash_filo_element() = default; hash_filo_element *next() { return next_used; } hash_filo_element *prev() diff --git a/sql/hostname.cc b/sql/hostname.cc index 7b07ab620a6..e23560c7b8c 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -74,8 +74,7 @@ Host_errors::Host_errors() m_local(0) {} -Host_errors::~Host_errors() -{} +Host_errors::~Host_errors() = default; void Host_errors::reset() { diff --git a/sql/item.h b/sql/item.h index 90e102a96af..3ce8adafb33 100644 --- a/sql/item.h +++ b/sql/item.h @@ -326,7 +326,7 @@ private: TABLE_LIST *save_next_local; public: - Name_resolution_context_state() {} /* Remove gcc warning */ + Name_resolution_context_state() = default; /* Remove gcc warning */ public: /* Save the state of a name resolution context. */ @@ -427,7 +427,7 @@ class sp_rcontext; class Sp_rcontext_handler { public: - virtual ~Sp_rcontext_handler() {} + virtual ~Sp_rcontext_handler() = default; /** A prefix used for SP variable names in queries: - EXPLAIN EXTENDED @@ -500,8 +500,8 @@ public: required, otherwise we only reading it and SELECT privilege might be required. */ - Settable_routine_parameter() {} - virtual ~Settable_routine_parameter() {} + Settable_routine_parameter() = default; + virtual ~Settable_routine_parameter() = default; virtual void set_required_privilege(bool rw) {}; /* @@ -583,7 +583,7 @@ class Rewritable_query_parameter limit_clause_param(false) { } - virtual ~Rewritable_query_parameter() { } + virtual ~Rewritable_query_parameter() = default; virtual bool append_for_log(THD *thd, String *str) = 0; }; @@ -743,7 +743,7 @@ public: class Item_const { public: - virtual ~Item_const() {} + virtual ~Item_const() = default; virtual const Type_all_attributes *get_type_all_attributes_from_const() const= 0; virtual bool const_is_null() const { return false; } virtual const longlong *const_ptr_longlong() const { return NULL; } @@ -2912,8 +2912,8 @@ class Field_enumerator { public: virtual void visit_field(Item_field *field)= 0; - virtual ~Field_enumerator() {}; /* purecov: inspected */ - Field_enumerator() {} /* Remove gcc warning */ + virtual ~Field_enumerator() = default;; /* purecov: inspected */ + Field_enumerator() = default; /* Remove gcc warning */ }; class Item_string; @@ -3445,7 +3445,7 @@ public: Item_result_field(THD *thd, Item_result_field *item): Item_fixed_hybrid(thd, item), result_field(item->result_field) {} - ~Item_result_field() {} /* Required with gcc 2.95 */ + ~Item_result_field() = default; Field *get_tmp_table_field() override { return result_field; } Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src, const Tmp_field_param *param) override @@ -7700,7 +7700,7 @@ public: */ virtual void close()= 0; - virtual ~Item_iterator() {} + virtual ~Item_iterator() = default; }; diff --git a/sql/item_buff.cc b/sql/item_buff.cc index 05cef6871be..1079394e830 100644 --- a/sql/item_buff.cc +++ b/sql/item_buff.cc @@ -61,7 +61,7 @@ Cached_item *new_Cached_item(THD *thd, Item *item, bool pass_through_ref) } } -Cached_item::~Cached_item() {} +Cached_item::~Cached_item() = default; /** Compare with old value and replace value with new value. diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 53571c38192..8e0a150f9c0 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -252,8 +252,7 @@ protected: Item_bool_func(thd, a), value(a_value), affirmative(a_affirmative) {} - ~Item_func_truth() - {} + ~Item_func_truth() = default; private: /** True for <code>X IS [NOT] TRUE</code>, @@ -275,7 +274,7 @@ class Item_func_istrue : public Item_func_truth { public: Item_func_istrue(THD *thd, Item *a): Item_func_truth(thd, a, true, true) {} - ~Item_func_istrue() {} + ~Item_func_istrue() = default; LEX_CSTRING func_name_cstring() const override { static LEX_CSTRING name= {STRING_WITH_LEN("istrue") }; @@ -295,7 +294,7 @@ class Item_func_isnottrue : public Item_func_truth public: Item_func_isnottrue(THD *thd, Item *a): Item_func_truth(thd, a, true, false) {} - ~Item_func_isnottrue() {} + ~Item_func_isnottrue() = default; LEX_CSTRING func_name_cstring() const override { static LEX_CSTRING name= {STRING_WITH_LEN("isnottrue") }; @@ -317,7 +316,7 @@ class Item_func_isfalse : public Item_func_truth { public: Item_func_isfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, true) {} - ~Item_func_isfalse() {} + ~Item_func_isfalse() = default; LEX_CSTRING func_name_cstring() const override { static LEX_CSTRING name= {STRING_WITH_LEN("isfalse") }; @@ -337,7 +336,7 @@ class Item_func_isnotfalse : public Item_func_truth public: Item_func_isnotfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, false) {} - ~Item_func_isnotfalse() {} + ~Item_func_isnotfalse() = default; LEX_CSTRING func_name_cstring() const override { static LEX_CSTRING name= {STRING_WITH_LEN("isnotfalse") }; @@ -1460,13 +1459,13 @@ public: CHARSET_INFO *collation; uint count; uint used_count; - in_vector() {} + in_vector() = default; in_vector(THD *thd, uint elements, uint element_length, qsort2_cmp cmp_func, CHARSET_INFO *cmp_coll) :base((char*) thd_calloc(thd, elements * element_length)), size(element_length), compare(cmp_func), collation(cmp_coll), count(elements), used_count(elements) {} - virtual ~in_vector() {} + virtual ~in_vector() = default; virtual void set(uint pos,Item *item)=0; virtual uchar *get_value(Item *item)=0; void sort() @@ -1672,7 +1671,7 @@ class cmp_item :public Sql_alloc public: CHARSET_INFO *cmp_charset; cmp_item() { cmp_charset= &my_charset_bin; } - virtual ~cmp_item() {} + virtual ~cmp_item() = default; virtual void store_value(Item *item)= 0; /** @returns result (TRUE, FALSE or UNKNOWN) of @@ -1701,7 +1700,7 @@ class cmp_item_string : public cmp_item_scalar protected: String *value_res; public: - cmp_item_string () {} + cmp_item_string () = default; cmp_item_string (CHARSET_INFO *cs) { cmp_charset= cs; } void set_charset(CHARSET_INFO *cs) { cmp_charset= cs; } friend class cmp_item_sort_string; @@ -1767,7 +1766,7 @@ class cmp_item_int : public cmp_item_scalar { longlong value; public: - cmp_item_int() {} /* Remove gcc warning */ + cmp_item_int() = default; /* Remove gcc warning */ void store_value(Item *item) { value= item->val_int(); @@ -1800,7 +1799,7 @@ class cmp_item_temporal: public cmp_item_scalar protected: longlong value; public: - cmp_item_temporal() {} + cmp_item_temporal() = default; int compare(cmp_item *ci); }; @@ -1856,7 +1855,7 @@ class cmp_item_real : public cmp_item_scalar { double value; public: - cmp_item_real() {} /* Remove gcc warning */ + cmp_item_real() = default; /* Remove gcc warning */ void store_value(Item *item) { value= item->val_real(); @@ -1886,7 +1885,7 @@ class cmp_item_decimal : public cmp_item_scalar { my_decimal value; public: - cmp_item_decimal() {} /* Remove gcc warning */ + cmp_item_decimal() = default; /* Remove gcc warning */ void store_value(Item *item); int cmp(Item *arg); int cmp_not_null(const Value *val); @@ -3731,8 +3730,8 @@ Item *and_expressions(Item *a, Item *b, Item **org_item); class Comp_creator { public: - Comp_creator() {} /* Remove gcc warning */ - virtual ~Comp_creator() {} /* Remove gcc warning */ + Comp_creator() = default; /* Remove gcc warning */ + virtual ~Comp_creator() = default; /* Remove gcc warning */ /** Create operation with given arguments. */ @@ -3751,8 +3750,8 @@ public: class Eq_creator :public Comp_creator { public: - Eq_creator() {} /* Remove gcc warning */ - virtual ~Eq_creator() {} /* Remove gcc warning */ + Eq_creator() = default; /* Remove gcc warning */ + virtual ~Eq_creator() = default; /* Remove gcc warning */ Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; const char* symbol(bool invert) const { return invert? "<>" : "="; } @@ -3763,8 +3762,8 @@ public: class Ne_creator :public Comp_creator { public: - Ne_creator() {} /* Remove gcc warning */ - virtual ~Ne_creator() {} /* Remove gcc warning */ + Ne_creator() = default; /* Remove gcc warning */ + virtual ~Ne_creator() = default; /* Remove gcc warning */ Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; const char* symbol(bool invert) const { return invert? "=" : "<>"; } @@ -3775,8 +3774,8 @@ public: class Gt_creator :public Comp_creator { public: - Gt_creator() {} /* Remove gcc warning */ - virtual ~Gt_creator() {} /* Remove gcc warning */ + Gt_creator() = default; /* Remove gcc warning */ + virtual ~Gt_creator() = default; /* Remove gcc warning */ Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; const char* symbol(bool invert) const { return invert? "<=" : ">"; } @@ -3787,8 +3786,8 @@ public: class Lt_creator :public Comp_creator { public: - Lt_creator() {} /* Remove gcc warning */ - virtual ~Lt_creator() {} /* Remove gcc warning */ + Lt_creator() = default; /* Remove gcc warning */ + virtual ~Lt_creator() = default; /* Remove gcc warning */ Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; const char* symbol(bool invert) const { return invert? ">=" : "<"; } @@ -3799,8 +3798,8 @@ public: class Ge_creator :public Comp_creator { public: - Ge_creator() {} /* Remove gcc warning */ - virtual ~Ge_creator() {} /* Remove gcc warning */ + Ge_creator() = default; /* Remove gcc warning */ + virtual ~Ge_creator() = default; /* Remove gcc warning */ Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; const char* symbol(bool invert) const { return invert? "<" : ">="; } @@ -3811,8 +3810,8 @@ public: class Le_creator :public Comp_creator { public: - Le_creator() {} /* Remove gcc warning */ - virtual ~Le_creator() {} /* Remove gcc warning */ + Le_creator() = default; /* Remove gcc warning */ + virtual ~Le_creator() = default; /* Remove gcc warning */ Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; const char* symbol(bool invert) const { return invert? ">" : "<="; } diff --git a/sql/item_create.cc b/sql/item_create.cc index 73e3befc9d6..dcc64ef10e8 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -90,9 +90,9 @@ public: protected: /** Constructor. */ - Create_sp_func() {} + Create_sp_func() = default; /** Destructor. */ - virtual ~Create_sp_func() {} + virtual ~Create_sp_func() = default; }; @@ -110,8 +110,8 @@ public: static Create_func_abs s_singleton; protected: - Create_func_abs() {} - virtual ~Create_func_abs() {} + Create_func_abs() = default; + virtual ~Create_func_abs() = default; }; @@ -123,8 +123,8 @@ public: static Create_func_acos s_singleton; protected: - Create_func_acos() {} - virtual ~Create_func_acos() {} + Create_func_acos() = default; + virtual ~Create_func_acos() = default; }; @@ -136,8 +136,8 @@ public: static Create_func_addtime s_singleton; protected: - Create_func_addtime() {} - virtual ~Create_func_addtime() {} + Create_func_addtime() = default; + virtual ~Create_func_addtime() = default; }; @@ -149,8 +149,8 @@ public: static Create_func_aes_encrypt s_singleton; protected: - Create_func_aes_encrypt() {} - virtual ~Create_func_aes_encrypt() {} + Create_func_aes_encrypt() = default; + virtual ~Create_func_aes_encrypt() = default; }; @@ -162,8 +162,8 @@ public: static Create_func_aes_decrypt s_singleton; protected: - Create_func_aes_decrypt() {} - virtual ~Create_func_aes_decrypt() {} + Create_func_aes_decrypt() = default; + virtual ~Create_func_aes_decrypt() = default; }; @@ -175,8 +175,8 @@ public: static Create_func_asin s_singleton; protected: - Create_func_asin() {} - virtual ~Create_func_asin() {} + Create_func_asin() = default; + virtual ~Create_func_asin() = default; }; @@ -189,8 +189,8 @@ public: static Create_func_atan s_singleton; protected: - Create_func_atan() {} - virtual ~Create_func_atan() {} + Create_func_atan() = default; + virtual ~Create_func_atan() = default; }; @@ -202,8 +202,8 @@ public: static Create_func_benchmark s_singleton; protected: - Create_func_benchmark() {} - virtual ~Create_func_benchmark() {} + Create_func_benchmark() = default; + virtual ~Create_func_benchmark() = default; }; @@ -215,8 +215,8 @@ public: static Create_func_bin s_singleton; protected: - Create_func_bin() {} - virtual ~Create_func_bin() {} + Create_func_bin() = default; + virtual ~Create_func_bin() = default; }; @@ -228,8 +228,8 @@ public: static Create_func_binlog_gtid_pos s_singleton; protected: - Create_func_binlog_gtid_pos() {} - virtual ~Create_func_binlog_gtid_pos() {} + Create_func_binlog_gtid_pos() = default; + virtual ~Create_func_binlog_gtid_pos() = default; }; @@ -241,8 +241,8 @@ public: static Create_func_bit_count s_singleton; protected: - Create_func_bit_count() {} - virtual ~Create_func_bit_count() {} + Create_func_bit_count() = default; + virtual ~Create_func_bit_count() = default; }; @@ -254,8 +254,8 @@ public: static Create_func_bit_length s_singleton; protected: - Create_func_bit_length() {} - virtual ~Create_func_bit_length() {} + Create_func_bit_length() = default; + virtual ~Create_func_bit_length() = default; }; @@ -267,8 +267,8 @@ public: static Create_func_ceiling s_singleton; protected: - Create_func_ceiling() {} - virtual ~Create_func_ceiling() {} + Create_func_ceiling() = default; + virtual ~Create_func_ceiling() = default; }; @@ -280,8 +280,8 @@ public: static Create_func_chr s_singleton; protected: - Create_func_chr() {} - virtual ~Create_func_chr() {} + Create_func_chr() = default; + virtual ~Create_func_chr() = default; }; @@ -293,8 +293,8 @@ public: static Create_func_char_length s_singleton; protected: - Create_func_char_length() {} - virtual ~Create_func_char_length() {} + Create_func_char_length() = default; + virtual ~Create_func_char_length() = default; }; @@ -306,8 +306,8 @@ public: static Create_func_coercibility s_singleton; protected: - Create_func_coercibility() {} - virtual ~Create_func_coercibility() {} + Create_func_coercibility() = default; + virtual ~Create_func_coercibility() = default; }; class Create_func_dyncol_check : public Create_func_arg1 @@ -318,8 +318,8 @@ public: static Create_func_dyncol_check s_singleton; protected: - Create_func_dyncol_check() {} - virtual ~Create_func_dyncol_check() {} + Create_func_dyncol_check() = default; + virtual ~Create_func_dyncol_check() = default; }; class Create_func_dyncol_exists : public Create_func_arg2 @@ -330,8 +330,8 @@ public: static Create_func_dyncol_exists s_singleton; protected: - Create_func_dyncol_exists() {} - virtual ~Create_func_dyncol_exists() {} + Create_func_dyncol_exists() = default; + virtual ~Create_func_dyncol_exists() = default; }; class Create_func_dyncol_list : public Create_func_arg1 @@ -342,8 +342,8 @@ public: static Create_func_dyncol_list s_singleton; protected: - Create_func_dyncol_list() {} - virtual ~Create_func_dyncol_list() {} + Create_func_dyncol_list() = default; + virtual ~Create_func_dyncol_list() = default; }; class Create_func_dyncol_json : public Create_func_arg1 @@ -354,8 +354,8 @@ public: static Create_func_dyncol_json s_singleton; protected: - Create_func_dyncol_json() {} - virtual ~Create_func_dyncol_json() {} + Create_func_dyncol_json() = default; + virtual ~Create_func_dyncol_json() = default; }; @@ -367,8 +367,8 @@ public: static Create_func_compress s_singleton; protected: - Create_func_compress() {} - virtual ~Create_func_compress() {} + Create_func_compress() = default; + virtual ~Create_func_compress() = default; }; @@ -381,8 +381,8 @@ public: static Create_func_concat s_singleton; protected: - Create_func_concat() {} - virtual ~Create_func_concat() {} + Create_func_concat() = default; + virtual ~Create_func_concat() = default; }; @@ -395,8 +395,8 @@ public: static Create_func_concat_operator_oracle s_singleton; protected: - Create_func_concat_operator_oracle() {} - virtual ~Create_func_concat_operator_oracle() {} + Create_func_concat_operator_oracle() = default; + virtual ~Create_func_concat_operator_oracle() = default; }; @@ -408,8 +408,8 @@ public: static Create_func_decode_histogram s_singleton; protected: - Create_func_decode_histogram() {} - virtual ~Create_func_decode_histogram() {} + Create_func_decode_histogram() = default; + virtual ~Create_func_decode_histogram() = default; }; @@ -422,8 +422,8 @@ public: static Create_func_decode_oracle s_singleton; protected: - Create_func_decode_oracle() {} - virtual ~Create_func_decode_oracle() {} + Create_func_decode_oracle() = default; + virtual ~Create_func_decode_oracle() = default; }; @@ -436,8 +436,8 @@ public: static Create_func_concat_ws s_singleton; protected: - Create_func_concat_ws() {} - virtual ~Create_func_concat_ws() {} + Create_func_concat_ws() = default; + virtual ~Create_func_concat_ws() = default; }; @@ -449,8 +449,8 @@ public: static Create_func_connection_id s_singleton; protected: - Create_func_connection_id() {} - virtual ~Create_func_connection_id() {} + Create_func_connection_id() = default; + virtual ~Create_func_connection_id() = default; }; @@ -462,8 +462,8 @@ public: static Create_func_nvl2 s_singleton; protected: - Create_func_nvl2() {} - virtual ~Create_func_nvl2() {} + Create_func_nvl2() = default; + virtual ~Create_func_nvl2() = default; }; @@ -475,8 +475,8 @@ public: static Create_func_conv s_singleton; protected: - Create_func_conv() {} - virtual ~Create_func_conv() {} + Create_func_conv() = default; + virtual ~Create_func_conv() = default; }; @@ -488,8 +488,8 @@ public: static Create_func_convert_tz s_singleton; protected: - Create_func_convert_tz() {} - virtual ~Create_func_convert_tz() {} + Create_func_convert_tz() = default; + virtual ~Create_func_convert_tz() = default; }; @@ -501,8 +501,8 @@ public: static Create_func_cos s_singleton; protected: - Create_func_cos() {} - virtual ~Create_func_cos() {} + Create_func_cos() = default; + virtual ~Create_func_cos() = default; }; @@ -514,8 +514,8 @@ public: static Create_func_cot s_singleton; protected: - Create_func_cot() {} - virtual ~Create_func_cot() {} + Create_func_cot() = default; + virtual ~Create_func_cot() = default; }; @@ -527,8 +527,8 @@ public: static Create_func_crc32 s_singleton; protected: - Create_func_crc32() {} - virtual ~Create_func_crc32() {} + Create_func_crc32() = default; + virtual ~Create_func_crc32() = default; }; @@ -540,8 +540,8 @@ public: static Create_func_datediff s_singleton; protected: - Create_func_datediff() {} - virtual ~Create_func_datediff() {} + Create_func_datediff() = default; + virtual ~Create_func_datediff() = default; }; @@ -553,8 +553,8 @@ public: static Create_func_dayname s_singleton; protected: - Create_func_dayname() {} - virtual ~Create_func_dayname() {} + Create_func_dayname() = default; + virtual ~Create_func_dayname() = default; }; @@ -566,8 +566,8 @@ public: static Create_func_dayofmonth s_singleton; protected: - Create_func_dayofmonth() {} - virtual ~Create_func_dayofmonth() {} + Create_func_dayofmonth() = default; + virtual ~Create_func_dayofmonth() = default; }; @@ -579,8 +579,8 @@ public: static Create_func_dayofweek s_singleton; protected: - Create_func_dayofweek() {} - virtual ~Create_func_dayofweek() {} + Create_func_dayofweek() = default; + virtual ~Create_func_dayofweek() = default; }; @@ -592,8 +592,8 @@ public: static Create_func_dayofyear s_singleton; protected: - Create_func_dayofyear() {} - virtual ~Create_func_dayofyear() {} + Create_func_dayofyear() = default; + virtual ~Create_func_dayofyear() = default; }; @@ -605,8 +605,8 @@ public: static Create_func_degrees s_singleton; protected: - Create_func_degrees() {} - virtual ~Create_func_degrees() {} + Create_func_degrees() = default; + virtual ~Create_func_degrees() = default; }; @@ -619,8 +619,8 @@ public: static Create_func_des_decrypt s_singleton; protected: - Create_func_des_decrypt() {} - virtual ~Create_func_des_decrypt() {} + Create_func_des_decrypt() = default; + virtual ~Create_func_des_decrypt() = default; }; @@ -633,8 +633,8 @@ public: static Create_func_des_encrypt s_singleton; protected: - Create_func_des_encrypt() {} - virtual ~Create_func_des_encrypt() {} + Create_func_des_encrypt() = default; + virtual ~Create_func_des_encrypt() = default; }; @@ -647,8 +647,8 @@ public: static Create_func_elt s_singleton; protected: - Create_func_elt() {} - virtual ~Create_func_elt() {} + Create_func_elt() = default; + virtual ~Create_func_elt() = default; }; @@ -660,8 +660,8 @@ public: static Create_func_encode s_singleton; protected: - Create_func_encode() {} - virtual ~Create_func_encode() {} + Create_func_encode() = default; + virtual ~Create_func_encode() = default; }; @@ -674,8 +674,8 @@ public: static Create_func_encrypt s_singleton; protected: - Create_func_encrypt() {} - virtual ~Create_func_encrypt() {} + Create_func_encrypt() = default; + virtual ~Create_func_encrypt() = default; }; @@ -687,8 +687,8 @@ public: static Create_func_exp s_singleton; protected: - Create_func_exp() {} - virtual ~Create_func_exp() {} + Create_func_exp() = default; + virtual ~Create_func_exp() = default; }; @@ -701,8 +701,8 @@ public: static Create_func_export_set s_singleton; protected: - Create_func_export_set() {} - virtual ~Create_func_export_set() {} + Create_func_export_set() = default; + virtual ~Create_func_export_set() = default; }; @@ -715,8 +715,8 @@ public: static Create_func_field s_singleton; protected: - Create_func_field() {} - virtual ~Create_func_field() {} + Create_func_field() = default; + virtual ~Create_func_field() = default; }; @@ -728,8 +728,8 @@ public: static Create_func_find_in_set s_singleton; protected: - Create_func_find_in_set() {} - virtual ~Create_func_find_in_set() {} + Create_func_find_in_set() = default; + virtual ~Create_func_find_in_set() = default; }; @@ -741,8 +741,8 @@ public: static Create_func_floor s_singleton; protected: - Create_func_floor() {} - virtual ~Create_func_floor() {} + Create_func_floor() = default; + virtual ~Create_func_floor() = default; }; @@ -755,8 +755,8 @@ public: static Create_func_format s_singleton; protected: - Create_func_format() {} - virtual ~Create_func_format() {} + Create_func_format() = default; + virtual ~Create_func_format() = default; }; @@ -768,8 +768,8 @@ public: static Create_func_found_rows s_singleton; protected: - Create_func_found_rows() {} - virtual ~Create_func_found_rows() {} + Create_func_found_rows() = default; + virtual ~Create_func_found_rows() = default; }; @@ -781,8 +781,8 @@ public: static Create_func_from_base64 s_singleton; protected: - Create_func_from_base64() {} - virtual ~Create_func_from_base64() {} + Create_func_from_base64() = default; + virtual ~Create_func_from_base64() = default; }; @@ -794,8 +794,8 @@ public: static Create_func_from_days s_singleton; protected: - Create_func_from_days() {} - virtual ~Create_func_from_days() {} + Create_func_from_days() = default; + virtual ~Create_func_from_days() = default; }; @@ -808,8 +808,8 @@ public: static Create_func_from_unixtime s_singleton; protected: - Create_func_from_unixtime() {} - virtual ~Create_func_from_unixtime() {} + Create_func_from_unixtime() = default; + virtual ~Create_func_from_unixtime() = default; }; @@ -821,8 +821,8 @@ public: static Create_func_get_lock s_singleton; protected: - Create_func_get_lock() {} - virtual ~Create_func_get_lock() {} + Create_func_get_lock() = default; + virtual ~Create_func_get_lock() = default; }; @@ -835,8 +835,8 @@ public: static Create_func_greatest s_singleton; protected: - Create_func_greatest() {} - virtual ~Create_func_greatest() {} + Create_func_greatest() = default; + virtual ~Create_func_greatest() = default; }; @@ -848,8 +848,8 @@ public: static Create_func_hex s_singleton; protected: - Create_func_hex() {} - virtual ~Create_func_hex() {} + Create_func_hex() = default; + virtual ~Create_func_hex() = default; }; @@ -861,8 +861,8 @@ public: static Create_func_ifnull s_singleton; protected: - Create_func_ifnull() {} - virtual ~Create_func_ifnull() {} + Create_func_ifnull() = default; + virtual ~Create_func_ifnull() = default; }; @@ -874,8 +874,8 @@ public: static Create_func_instr s_singleton; protected: - Create_func_instr() {} - virtual ~Create_func_instr() {} + Create_func_instr() = default; + virtual ~Create_func_instr() = default; }; @@ -887,8 +887,8 @@ public: static Create_func_is_free_lock s_singleton; protected: - Create_func_is_free_lock() {} - virtual ~Create_func_is_free_lock() {} + Create_func_is_free_lock() = default; + virtual ~Create_func_is_free_lock() = default; }; @@ -900,8 +900,8 @@ public: static Create_func_is_used_lock s_singleton; protected: - Create_func_is_used_lock() {} - virtual ~Create_func_is_used_lock() {} + Create_func_is_used_lock() = default; + virtual ~Create_func_is_used_lock() = default; }; @@ -913,8 +913,8 @@ public: static Create_func_isnull s_singleton; protected: - Create_func_isnull() {} - virtual ~Create_func_isnull() {} + Create_func_isnull() = default; + virtual ~Create_func_isnull() = default; }; @@ -926,8 +926,8 @@ public: static Create_func_json_exists s_singleton; protected: - Create_func_json_exists() {} - virtual ~Create_func_json_exists() {} + Create_func_json_exists() = default; + virtual ~Create_func_json_exists() = default; }; @@ -939,8 +939,8 @@ public: static Create_func_json_valid s_singleton; protected: - Create_func_json_valid() {} - virtual ~Create_func_json_valid() {} + Create_func_json_valid() = default; + virtual ~Create_func_json_valid() = default; }; @@ -952,8 +952,8 @@ public: static Create_func_json_compact s_singleton; protected: - Create_func_json_compact() {} - virtual ~Create_func_json_compact() {} + Create_func_json_compact() = default; + virtual ~Create_func_json_compact() = default; }; @@ -965,8 +965,8 @@ public: static Create_func_json_loose s_singleton; protected: - Create_func_json_loose() {} - virtual ~Create_func_json_loose() {} + Create_func_json_loose() = default; + virtual ~Create_func_json_loose() = default; }; @@ -979,8 +979,8 @@ public: static Create_func_json_detailed s_singleton; protected: - Create_func_json_detailed() {} - virtual ~Create_func_json_detailed() {} + Create_func_json_detailed() = default; + virtual ~Create_func_json_detailed() = default; }; @@ -992,8 +992,8 @@ public: static Create_func_json_type s_singleton; protected: - Create_func_json_type() {} - virtual ~Create_func_json_type() {} + Create_func_json_type() = default; + virtual ~Create_func_json_type() = default; }; @@ -1005,8 +1005,8 @@ public: static Create_func_json_depth s_singleton; protected: - Create_func_json_depth() {} - virtual ~Create_func_json_depth() {} + Create_func_json_depth() = default; + virtual ~Create_func_json_depth() = default; }; @@ -1018,8 +1018,8 @@ public: static Create_func_json_value s_singleton; protected: - Create_func_json_value() {} - virtual ~Create_func_json_value() {} + Create_func_json_value() = default; + virtual ~Create_func_json_value() = default; }; @@ -1031,8 +1031,8 @@ public: static Create_func_json_query s_singleton; protected: - Create_func_json_query() {} - virtual ~Create_func_json_query() {} + Create_func_json_query() = default; + virtual ~Create_func_json_query() = default; }; @@ -1045,8 +1045,8 @@ public: static Create_func_json_keys s_singleton; protected: - Create_func_json_keys() {} - virtual ~Create_func_json_keys() {} + Create_func_json_keys() = default; + virtual ~Create_func_json_keys() = default; }; @@ -1059,8 +1059,8 @@ public: static Create_func_json_contains s_singleton; protected: - Create_func_json_contains() {} - virtual ~Create_func_json_contains() {} + Create_func_json_contains() = default; + virtual ~Create_func_json_contains() = default; }; @@ -1073,8 +1073,8 @@ public: static Create_func_json_contains_path s_singleton; protected: - Create_func_json_contains_path() {} - virtual ~Create_func_json_contains_path() {} + Create_func_json_contains_path() = default; + virtual ~Create_func_json_contains_path() = default; }; @@ -1087,8 +1087,8 @@ public: static Create_func_json_extract s_singleton; protected: - Create_func_json_extract() {} - virtual ~Create_func_json_extract() {} + Create_func_json_extract() = default; + virtual ~Create_func_json_extract() = default; }; @@ -1101,8 +1101,8 @@ public: static Create_func_json_search s_singleton; protected: - Create_func_json_search() {} - virtual ~Create_func_json_search() {} + Create_func_json_search() = default; + virtual ~Create_func_json_search() = default; }; @@ -1115,8 +1115,8 @@ public: static Create_func_json_array s_singleton; protected: - Create_func_json_array() {} - virtual ~Create_func_json_array() {} + Create_func_json_array() = default; + virtual ~Create_func_json_array() = default; }; @@ -1129,8 +1129,8 @@ public: static Create_func_json_array_append s_singleton; protected: - Create_func_json_array_append() {} - virtual ~Create_func_json_array_append() {} + Create_func_json_array_append() = default; + virtual ~Create_func_json_array_append() = default; }; @@ -1143,8 +1143,8 @@ public: static Create_func_json_array_insert s_singleton; protected: - Create_func_json_array_insert() {} - virtual ~Create_func_json_array_insert() {} + Create_func_json_array_insert() = default; + virtual ~Create_func_json_array_insert() = default; }; @@ -1157,8 +1157,8 @@ public: static Create_func_json_insert s_singleton; protected: - Create_func_json_insert() {} - virtual ~Create_func_json_insert() {} + Create_func_json_insert() = default; + virtual ~Create_func_json_insert() = default; }; @@ -1171,8 +1171,8 @@ public: static Create_func_json_set s_singleton; protected: - Create_func_json_set() {} - virtual ~Create_func_json_set() {} + Create_func_json_set() = default; + virtual ~Create_func_json_set() = default; }; @@ -1185,8 +1185,8 @@ public: static Create_func_json_replace s_singleton; protected: - Create_func_json_replace() {} - virtual ~Create_func_json_replace() {} + Create_func_json_replace() = default; + virtual ~Create_func_json_replace() = default; }; @@ -1199,8 +1199,8 @@ public: static Create_func_json_remove s_singleton; protected: - Create_func_json_remove() {} - virtual ~Create_func_json_remove() {} + Create_func_json_remove() = default; + virtual ~Create_func_json_remove() = default; }; @@ -1213,8 +1213,8 @@ public: static Create_func_json_object s_singleton; protected: - Create_func_json_object() {} - virtual ~Create_func_json_object() {} + Create_func_json_object() = default; + virtual ~Create_func_json_object() = default; }; @@ -1227,8 +1227,8 @@ public: static Create_func_json_length s_singleton; protected: - Create_func_json_length() {} - virtual ~Create_func_json_length() {} + Create_func_json_length() = default; + virtual ~Create_func_json_length() = default; }; @@ -1241,8 +1241,8 @@ public: static Create_func_json_merge s_singleton; protected: - Create_func_json_merge() {} - virtual ~Create_func_json_merge() {} + Create_func_json_merge() = default; + virtual ~Create_func_json_merge() = default; }; @@ -1255,8 +1255,8 @@ public: static Create_func_json_merge_patch s_singleton; protected: - Create_func_json_merge_patch() {} - virtual ~Create_func_json_merge_patch() {} + Create_func_json_merge_patch() = default; + virtual ~Create_func_json_merge_patch() = default; }; @@ -1268,8 +1268,8 @@ public: static Create_func_json_quote s_singleton; protected: - Create_func_json_quote() {} - virtual ~Create_func_json_quote() {} + Create_func_json_quote() = default; + virtual ~Create_func_json_quote() = default; }; @@ -1281,8 +1281,8 @@ public: static Create_func_json_unquote s_singleton; protected: - Create_func_json_unquote() {} - virtual ~Create_func_json_unquote() {} + Create_func_json_unquote() = default; + virtual ~Create_func_json_unquote() = default; }; @@ -1294,8 +1294,8 @@ public: static Create_func_last_day s_singleton; protected: - Create_func_last_day() {} - virtual ~Create_func_last_day() {} + Create_func_last_day() = default; + virtual ~Create_func_last_day() = default; }; @@ -1308,8 +1308,8 @@ public: static Create_func_last_insert_id s_singleton; protected: - Create_func_last_insert_id() {} - virtual ~Create_func_last_insert_id() {} + Create_func_last_insert_id() = default; + virtual ~Create_func_last_insert_id() = default; }; @@ -1321,8 +1321,8 @@ public: static Create_func_lcase s_singleton; protected: - Create_func_lcase() {} - virtual ~Create_func_lcase() {} + Create_func_lcase() = default; + virtual ~Create_func_lcase() = default; }; @@ -1335,8 +1335,8 @@ public: static Create_func_least s_singleton; protected: - Create_func_least() {} - virtual ~Create_func_least() {} + Create_func_least() = default; + virtual ~Create_func_least() = default; }; @@ -1348,8 +1348,8 @@ public: static Create_func_length s_singleton; protected: - Create_func_length() {} - virtual ~Create_func_length() {} + Create_func_length() = default; + virtual ~Create_func_length() = default; }; class Create_func_octet_length : public Create_func_arg1 @@ -1360,8 +1360,8 @@ public: static Create_func_octet_length s_singleton; protected: - Create_func_octet_length() {} - virtual ~Create_func_octet_length() {} + Create_func_octet_length() = default; + virtual ~Create_func_octet_length() = default; }; @@ -1374,8 +1374,8 @@ public: static Create_func_like_range_min s_singleton; protected: - Create_func_like_range_min() {} - virtual ~Create_func_like_range_min() {} + Create_func_like_range_min() = default; + virtual ~Create_func_like_range_min() = default; }; @@ -1387,8 +1387,8 @@ public: static Create_func_like_range_max s_singleton; protected: - Create_func_like_range_max() {} - virtual ~Create_func_like_range_max() {} + Create_func_like_range_max() = default; + virtual ~Create_func_like_range_max() = default; }; #endif @@ -1401,8 +1401,8 @@ public: static Create_func_ln s_singleton; protected: - Create_func_ln() {} - virtual ~Create_func_ln() {} + Create_func_ln() = default; + virtual ~Create_func_ln() = default; }; @@ -1414,8 +1414,8 @@ public: static Create_func_load_file s_singleton; protected: - Create_func_load_file() {} - virtual ~Create_func_load_file() {} + Create_func_load_file() = default; + virtual ~Create_func_load_file() = default; }; @@ -1428,8 +1428,8 @@ public: static Create_func_locate s_singleton; protected: - Create_func_locate() {} - virtual ~Create_func_locate() {} + Create_func_locate() = default; + virtual ~Create_func_locate() = default; }; @@ -1442,8 +1442,8 @@ public: static Create_func_log s_singleton; protected: - Create_func_log() {} - virtual ~Create_func_log() {} + Create_func_log() = default; + virtual ~Create_func_log() = default; }; @@ -1455,8 +1455,8 @@ public: static Create_func_log10 s_singleton; protected: - Create_func_log10() {} - virtual ~Create_func_log10() {} + Create_func_log10() = default; + virtual ~Create_func_log10() = default; }; @@ -1468,8 +1468,8 @@ public: static Create_func_log2 s_singleton; protected: - Create_func_log2() {} - virtual ~Create_func_log2() {} + Create_func_log2() = default; + virtual ~Create_func_log2() = default; }; @@ -1486,8 +1486,8 @@ public: static Create_func_lpad s_singleton; protected: - Create_func_lpad() {} - virtual ~Create_func_lpad() {} + Create_func_lpad() = default; + virtual ~Create_func_lpad() = default; Item *create_native_std(THD *thd, const LEX_CSTRING *name, List<Item> *items); Item *create_native_oracle(THD *thd, const LEX_CSTRING *name, @@ -1515,8 +1515,8 @@ public: static Create_func_ltrim s_singleton; protected: - Create_func_ltrim() {} - virtual ~Create_func_ltrim() {} + Create_func_ltrim() = default; + virtual ~Create_func_ltrim() = default; }; @@ -1528,8 +1528,8 @@ public: static Create_func_ltrim_oracle s_singleton; protected: - Create_func_ltrim_oracle() {} - virtual ~Create_func_ltrim_oracle() {} + Create_func_ltrim_oracle() = default; + virtual ~Create_func_ltrim_oracle() = default; }; @@ -1541,8 +1541,8 @@ public: static Create_func_makedate s_singleton; protected: - Create_func_makedate() {} - virtual ~Create_func_makedate() {} + Create_func_makedate() = default; + virtual ~Create_func_makedate() = default; }; @@ -1554,8 +1554,8 @@ public: static Create_func_maketime s_singleton; protected: - Create_func_maketime() {} - virtual ~Create_func_maketime() {} + Create_func_maketime() = default; + virtual ~Create_func_maketime() = default; }; @@ -1568,8 +1568,8 @@ public: static Create_func_make_set s_singleton; protected: - Create_func_make_set() {} - virtual ~Create_func_make_set() {} + Create_func_make_set() = default; + virtual ~Create_func_make_set() = default; }; @@ -1582,8 +1582,8 @@ public: static Create_func_master_pos_wait s_singleton; protected: - Create_func_master_pos_wait() {} - virtual ~Create_func_master_pos_wait() {} + Create_func_master_pos_wait() = default; + virtual ~Create_func_master_pos_wait() = default; }; @@ -1596,8 +1596,8 @@ public: static Create_func_master_gtid_wait s_singleton; protected: - Create_func_master_gtid_wait() {} - virtual ~Create_func_master_gtid_wait() {} + Create_func_master_gtid_wait() = default; + virtual ~Create_func_master_gtid_wait() = default; }; @@ -1609,8 +1609,8 @@ public: static Create_func_md5 s_singleton; protected: - Create_func_md5() {} - virtual ~Create_func_md5() {} + Create_func_md5() = default; + virtual ~Create_func_md5() = default; }; @@ -1622,8 +1622,8 @@ public: static Create_func_monthname s_singleton; protected: - Create_func_monthname() {} - virtual ~Create_func_monthname() {} + Create_func_monthname() = default; + virtual ~Create_func_monthname() = default; }; @@ -1635,8 +1635,8 @@ public: static Create_func_name_const s_singleton; protected: - Create_func_name_const() {} - virtual ~Create_func_name_const() {} + Create_func_name_const() = default; + virtual ~Create_func_name_const() = default; }; @@ -1648,8 +1648,8 @@ public: static Create_func_nullif s_singleton; protected: - Create_func_nullif() {} - virtual ~Create_func_nullif() {} + Create_func_nullif() = default; + virtual ~Create_func_nullif() = default; }; @@ -1661,8 +1661,8 @@ public: static Create_func_oct s_singleton; protected: - Create_func_oct() {} - virtual ~Create_func_oct() {} + Create_func_oct() = default; + virtual ~Create_func_oct() = default; }; @@ -1674,8 +1674,8 @@ public: static Create_func_ord s_singleton; protected: - Create_func_ord() {} - virtual ~Create_func_ord() {} + Create_func_ord() = default; + virtual ~Create_func_ord() = default; }; @@ -1687,8 +1687,8 @@ public: static Create_func_period_add s_singleton; protected: - Create_func_period_add() {} - virtual ~Create_func_period_add() {} + Create_func_period_add() = default; + virtual ~Create_func_period_add() = default; }; @@ -1700,8 +1700,8 @@ public: static Create_func_period_diff s_singleton; protected: - Create_func_period_diff() {} - virtual ~Create_func_period_diff() {} + Create_func_period_diff() = default; + virtual ~Create_func_period_diff() = default; }; @@ -1713,8 +1713,8 @@ public: static Create_func_pi s_singleton; protected: - Create_func_pi() {} - virtual ~Create_func_pi() {} + Create_func_pi() = default; + virtual ~Create_func_pi() = default; }; @@ -1726,8 +1726,8 @@ public: static Create_func_pow s_singleton; protected: - Create_func_pow() {} - virtual ~Create_func_pow() {} + Create_func_pow() = default; + virtual ~Create_func_pow() = default; }; @@ -1739,8 +1739,8 @@ public: static Create_func_quote s_singleton; protected: - Create_func_quote() {} - virtual ~Create_func_quote() {} + Create_func_quote() = default; + virtual ~Create_func_quote() = default; }; @@ -1752,8 +1752,8 @@ public: static Create_func_regexp_instr s_singleton; protected: - Create_func_regexp_instr() {} - virtual ~Create_func_regexp_instr() {} + Create_func_regexp_instr() = default; + virtual ~Create_func_regexp_instr() = default; }; @@ -1765,8 +1765,8 @@ public: static Create_func_regexp_replace s_singleton; protected: - Create_func_regexp_replace() {} - virtual ~Create_func_regexp_replace() {} + Create_func_regexp_replace() = default; + virtual ~Create_func_regexp_replace() = default; }; @@ -1778,8 +1778,8 @@ public: static Create_func_regexp_substr s_singleton; protected: - Create_func_regexp_substr() {} - virtual ~Create_func_regexp_substr() {} + Create_func_regexp_substr() = default; + virtual ~Create_func_regexp_substr() = default; }; @@ -1791,8 +1791,8 @@ public: static Create_func_radians s_singleton; protected: - Create_func_radians() {} - virtual ~Create_func_radians() {} + Create_func_radians() = default; + virtual ~Create_func_radians() = default; }; @@ -1805,8 +1805,8 @@ public: static Create_func_rand s_singleton; protected: - Create_func_rand() {} - virtual ~Create_func_rand() {} + Create_func_rand() = default; + virtual ~Create_func_rand() = default; }; @@ -1827,8 +1827,8 @@ public: static Create_func_release_lock s_singleton; protected: - Create_func_release_lock() {} - virtual ~Create_func_release_lock() {} + Create_func_release_lock() = default; + virtual ~Create_func_release_lock() = default; }; @@ -1840,8 +1840,8 @@ public: static Create_func_replace_oracle s_singleton; protected: - Create_func_replace_oracle() {} - virtual ~Create_func_replace_oracle() {} + Create_func_replace_oracle() = default; + virtual ~Create_func_replace_oracle() = default; }; @@ -1853,8 +1853,8 @@ public: static Create_func_reverse s_singleton; protected: - Create_func_reverse() {} - virtual ~Create_func_reverse() {} + Create_func_reverse() = default; + virtual ~Create_func_reverse() = default; }; @@ -1867,8 +1867,8 @@ public: static Create_func_round s_singleton; protected: - Create_func_round() {} - virtual ~Create_func_round() {} + Create_func_round() = default; + virtual ~Create_func_round() = default; }; @@ -1885,8 +1885,8 @@ public: static Create_func_rpad s_singleton; protected: - Create_func_rpad() {} - virtual ~Create_func_rpad() {} + Create_func_rpad() = default; + virtual ~Create_func_rpad() = default; Item *create_native_std(THD *thd, const LEX_CSTRING *name, List<Item> *items); Item *create_native_oracle(THD *thd, const LEX_CSTRING *name, @@ -1914,8 +1914,8 @@ public: static Create_func_rtrim s_singleton; protected: - Create_func_rtrim() {} - virtual ~Create_func_rtrim() {} + Create_func_rtrim() = default; + virtual ~Create_func_rtrim() = default; }; @@ -1927,8 +1927,8 @@ public: static Create_func_rtrim_oracle s_singleton; protected: - Create_func_rtrim_oracle() {} - virtual ~Create_func_rtrim_oracle() {} + Create_func_rtrim_oracle() = default; + virtual ~Create_func_rtrim_oracle() = default; }; @@ -1940,8 +1940,8 @@ public: static Create_func_sec_to_time s_singleton; protected: - Create_func_sec_to_time() {} - virtual ~Create_func_sec_to_time() {} + Create_func_sec_to_time() = default; + virtual ~Create_func_sec_to_time() = default; }; @@ -1953,8 +1953,8 @@ public: static Create_func_sha s_singleton; protected: - Create_func_sha() {} - virtual ~Create_func_sha() {} + Create_func_sha() = default; + virtual ~Create_func_sha() = default; }; @@ -1966,8 +1966,8 @@ public: static Create_func_sha2 s_singleton; protected: - Create_func_sha2() {} - virtual ~Create_func_sha2() {} + Create_func_sha2() = default; + virtual ~Create_func_sha2() = default; }; @@ -1979,8 +1979,8 @@ public: static Create_func_sign s_singleton; protected: - Create_func_sign() {} - virtual ~Create_func_sign() {} + Create_func_sign() = default; + virtual ~Create_func_sign() = default; }; @@ -1992,8 +1992,8 @@ public: static Create_func_sin s_singleton; protected: - Create_func_sin() {} - virtual ~Create_func_sin() {} + Create_func_sin() = default; + virtual ~Create_func_sin() = default; }; @@ -2005,8 +2005,8 @@ public: static Create_func_sleep s_singleton; protected: - Create_func_sleep() {} - virtual ~Create_func_sleep() {} + Create_func_sleep() = default; + virtual ~Create_func_sleep() = default; }; @@ -2018,8 +2018,8 @@ public: static Create_func_soundex s_singleton; protected: - Create_func_soundex() {} - virtual ~Create_func_soundex() {} + Create_func_soundex() = default; + virtual ~Create_func_soundex() = default; }; @@ -2031,8 +2031,8 @@ public: static Create_func_space s_singleton; protected: - Create_func_space() {} - virtual ~Create_func_space() {} + Create_func_space() = default; + virtual ~Create_func_space() = default; }; @@ -2044,8 +2044,8 @@ public: static Create_func_sqrt s_singleton; protected: - Create_func_sqrt() {} - virtual ~Create_func_sqrt() {} + Create_func_sqrt() = default; + virtual ~Create_func_sqrt() = default; }; @@ -2057,8 +2057,8 @@ public: static Create_func_str_to_date s_singleton; protected: - Create_func_str_to_date() {} - virtual ~Create_func_str_to_date() {} + Create_func_str_to_date() = default; + virtual ~Create_func_str_to_date() = default; }; @@ -2070,8 +2070,8 @@ public: static Create_func_strcmp s_singleton; protected: - Create_func_strcmp() {} - virtual ~Create_func_strcmp() {} + Create_func_strcmp() = default; + virtual ~Create_func_strcmp() = default; }; @@ -2083,8 +2083,8 @@ public: static Create_func_substr_index s_singleton; protected: - Create_func_substr_index() {} - virtual ~Create_func_substr_index() {} + Create_func_substr_index() = default; + virtual ~Create_func_substr_index() = default; }; @@ -2097,8 +2097,8 @@ public: static Create_func_substr_oracle s_singleton; protected: - Create_func_substr_oracle() {} - virtual ~Create_func_substr_oracle() {} + Create_func_substr_oracle() = default; + virtual ~Create_func_substr_oracle() = default; }; @@ -2110,8 +2110,8 @@ public: static Create_func_subtime s_singleton; protected: - Create_func_subtime() {} - virtual ~Create_func_subtime() {} + Create_func_subtime() = default; + virtual ~Create_func_subtime() = default; }; @@ -2123,8 +2123,8 @@ public: static Create_func_tan s_singleton; protected: - Create_func_tan() {} - virtual ~Create_func_tan() {} + Create_func_tan() = default; + virtual ~Create_func_tan() = default; }; @@ -2136,8 +2136,8 @@ public: static Create_func_time_format s_singleton; protected: - Create_func_time_format() {} - virtual ~Create_func_time_format() {} + Create_func_time_format() = default; + virtual ~Create_func_time_format() = default; }; @@ -2149,8 +2149,8 @@ public: static Create_func_time_to_sec s_singleton; protected: - Create_func_time_to_sec() {} - virtual ~Create_func_time_to_sec() {} + Create_func_time_to_sec() = default; + virtual ~Create_func_time_to_sec() = default; }; @@ -2162,8 +2162,8 @@ public: static Create_func_timediff s_singleton; protected: - Create_func_timediff() {} - virtual ~Create_func_timediff() {} + Create_func_timediff() = default; + virtual ~Create_func_timediff() = default; }; @@ -2175,8 +2175,8 @@ public: static Create_func_to_base64 s_singleton; protected: - Create_func_to_base64() {} - virtual ~Create_func_to_base64() {} + Create_func_to_base64() = default; + virtual ~Create_func_to_base64() = default; }; @@ -2202,8 +2202,8 @@ public: static Create_func_to_days s_singleton; protected: - Create_func_to_days() {} - virtual ~Create_func_to_days() {} + Create_func_to_days() = default; + virtual ~Create_func_to_days() = default; }; class Create_func_to_seconds : public Create_func_arg1 @@ -2214,8 +2214,8 @@ public: static Create_func_to_seconds s_singleton; protected: - Create_func_to_seconds() {} - virtual ~Create_func_to_seconds() {} + Create_func_to_seconds() = default; + virtual ~Create_func_to_seconds() = default; }; @@ -2227,8 +2227,8 @@ public: static Create_func_ucase s_singleton; protected: - Create_func_ucase() {} - virtual ~Create_func_ucase() {} + Create_func_ucase() = default; + virtual ~Create_func_ucase() = default; }; @@ -2240,8 +2240,8 @@ public: static Create_func_uncompress s_singleton; protected: - Create_func_uncompress() {} - virtual ~Create_func_uncompress() {} + Create_func_uncompress() = default; + virtual ~Create_func_uncompress() = default; }; @@ -2253,8 +2253,8 @@ public: static Create_func_uncompressed_length s_singleton; protected: - Create_func_uncompressed_length() {} - virtual ~Create_func_uncompressed_length() {} + Create_func_uncompressed_length() = default; + virtual ~Create_func_uncompressed_length() = default; }; @@ -2266,8 +2266,8 @@ public: static Create_func_unhex s_singleton; protected: - Create_func_unhex() {} - virtual ~Create_func_unhex() {} + Create_func_unhex() = default; + virtual ~Create_func_unhex() = default; }; @@ -2280,8 +2280,8 @@ public: static Create_func_unix_timestamp s_singleton; protected: - Create_func_unix_timestamp() {} - virtual ~Create_func_unix_timestamp() {} + Create_func_unix_timestamp() = default; + virtual ~Create_func_unix_timestamp() = default; }; @@ -2293,8 +2293,8 @@ public: static Create_func_uuid s_singleton; protected: - Create_func_uuid() {} - virtual ~Create_func_uuid() {} + Create_func_uuid() = default; + virtual ~Create_func_uuid() = default; }; class Create_func_sys_guid : public Create_func_arg0 @@ -2317,8 +2317,8 @@ public: static Create_func_uuid_short s_singleton; protected: - Create_func_uuid_short() {} - virtual ~Create_func_uuid_short() {} + Create_func_uuid_short() = default; + virtual ~Create_func_uuid_short() = default; }; @@ -2330,8 +2330,8 @@ public: static Create_func_version s_singleton; protected: - Create_func_version() {} - virtual ~Create_func_version() {} + Create_func_version() = default; + virtual ~Create_func_version() = default; }; @@ -2343,8 +2343,8 @@ public: static Create_func_weekday s_singleton; protected: - Create_func_weekday() {} - virtual ~Create_func_weekday() {} + Create_func_weekday() = default; + virtual ~Create_func_weekday() = default; }; @@ -2356,8 +2356,8 @@ public: static Create_func_weekofyear s_singleton; protected: - Create_func_weekofyear() {} - virtual ~Create_func_weekofyear() {} + Create_func_weekofyear() = default; + virtual ~Create_func_weekofyear() = default; }; @@ -2370,8 +2370,8 @@ public: static Create_func_wsrep_last_written_gtid s_singleton; protected: - Create_func_wsrep_last_written_gtid() {} - virtual ~Create_func_wsrep_last_written_gtid() {} + Create_func_wsrep_last_written_gtid() = default; + virtual ~Create_func_wsrep_last_written_gtid() = default; }; @@ -2383,8 +2383,8 @@ public: static Create_func_wsrep_last_seen_gtid s_singleton; protected: - Create_func_wsrep_last_seen_gtid() {} - virtual ~Create_func_wsrep_last_seen_gtid() {} + Create_func_wsrep_last_seen_gtid() = default; + virtual ~Create_func_wsrep_last_seen_gtid() = default; }; @@ -2397,8 +2397,8 @@ public: static Create_func_wsrep_sync_wait_upto s_singleton; protected: - Create_func_wsrep_sync_wait_upto() {} - virtual ~Create_func_wsrep_sync_wait_upto() {} + Create_func_wsrep_sync_wait_upto() = default; + virtual ~Create_func_wsrep_sync_wait_upto() = default; }; #endif /* WITH_WSREP */ @@ -2411,8 +2411,8 @@ public: static Create_func_xml_extractvalue s_singleton; protected: - Create_func_xml_extractvalue() {} - virtual ~Create_func_xml_extractvalue() {} + Create_func_xml_extractvalue() = default; + virtual ~Create_func_xml_extractvalue() = default; }; @@ -2424,8 +2424,8 @@ public: static Create_func_xml_update s_singleton; protected: - Create_func_xml_update() {} - virtual ~Create_func_xml_update() {} + Create_func_xml_update() = default; + virtual ~Create_func_xml_update() = default; }; @@ -2438,8 +2438,8 @@ public: static Create_func_year_week s_singleton; protected: - Create_func_year_week() {} - virtual ~Create_func_year_week() {} + Create_func_year_week() = default; + virtual ~Create_func_year_week() = default; }; @@ -3573,6 +3573,13 @@ Create_func_get_lock Create_func_get_lock::s_singleton; Item* Create_func_get_lock::create_2_arg(THD *thd, Item *arg1, Item *arg2) { +#ifdef WITH_WSREP + if (WSREP_ON && WSREP(thd)) + { + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "GET_LOCK in cluster (WSREP_ON=ON)"); + return NULL; + } +#endif /* WITH_WSREP */ thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT); return new (thd->mem_root) Item_func_get_lock(thd, arg1, arg2); @@ -4862,6 +4869,13 @@ Create_func_release_all_locks Create_func_release_all_locks::s_singleton; Item* Create_func_release_all_locks::create_builder(THD *thd) { +#ifdef WITH_WSREP + if (WSREP_ON && WSREP(thd)) + { + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)"); + return NULL; + } +#endif /* WITH_WSREP */ thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT); return new (thd->mem_root) Item_func_release_all_locks(thd); @@ -4873,6 +4887,13 @@ Create_func_release_lock Create_func_release_lock::s_singleton; Item* Create_func_release_lock::create_1_arg(THD *thd, Item *arg1) { +#ifdef WITH_WSREP + if (WSREP_ON && WSREP(thd)) + { + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "RELEASE_LOCK in cluster (WSREP_ON=ON)"); + return NULL; + } +#endif /* WITH_WSREP */ thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT); return new (thd->mem_root) Item_func_release_lock(thd, arg1); diff --git a/sql/item_create.h b/sql/item_create.h index 89769f76254..90546ddc5b7 100644 --- a/sql/item_create.h +++ b/sql/item_create.h @@ -63,9 +63,9 @@ public: protected: /** Constructor */ - Create_func() {} + Create_func() = default; /** Destructor */ - virtual ~Create_func() {} + virtual ~Create_func() = default; }; @@ -88,9 +88,9 @@ public: protected: /** Constructor. */ - Create_func_arg0() {} + Create_func_arg0() = default; /** Destructor. */ - virtual ~Create_func_arg0() {} + virtual ~Create_func_arg0() = default; }; @@ -114,9 +114,9 @@ public: protected: /** Constructor. */ - Create_func_arg1() {} + Create_func_arg1() = default; /** Destructor. */ - virtual ~Create_func_arg1() {} + virtual ~Create_func_arg1() = default; }; @@ -141,9 +141,9 @@ public: protected: /** Constructor. */ - Create_func_arg2() {} + Create_func_arg2() = default; /** Destructor. */ - virtual ~Create_func_arg2() {} + virtual ~Create_func_arg2() = default; }; @@ -169,9 +169,9 @@ public: protected: /** Constructor. */ - Create_func_arg3() {} + Create_func_arg3() = default; /** Destructor. */ - virtual ~Create_func_arg3() {} + virtual ~Create_func_arg3() = default; }; @@ -203,9 +203,9 @@ public: protected: /** Constructor. */ - Create_native_func() {} + Create_native_func() = default; /** Destructor. */ - virtual ~Create_native_func() {} + virtual ~Create_native_func() = default; }; @@ -246,9 +246,9 @@ public: protected: /** Constructor. */ - Create_qfunc() {} + Create_qfunc() = default; /** Destructor. */ - virtual ~Create_qfunc() {} + virtual ~Create_qfunc() = default; }; @@ -295,9 +295,9 @@ public: protected: /** Constructor. */ - Create_udf_func() {} + Create_udf_func() = default; /** Destructor. */ - virtual ~Create_udf_func() {} + virtual ~Create_udf_func() = default; }; #endif diff --git a/sql/item_func.cc b/sql/item_func.cc index cf76d4d17c0..e3f2eb500e0 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3988,7 +3988,7 @@ class Interruptible_wait Interruptible_wait(THD *thd) : m_thd(thd) {} - ~Interruptible_wait() {} + ~Interruptible_wait() = default; public: /** diff --git a/sql/item_func.h b/sql/item_func.h index 5a741d06195..2a4df525814 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -469,7 +469,7 @@ public: class Handler { public: - virtual ~Handler() { } + virtual ~Handler() = default; virtual String *val_str(Item_handled_func *, String *) const= 0; virtual String *val_str_ascii(Item_handled_func *, String *) const= 0; virtual double val_real(Item_handled_func *) const= 0; @@ -3860,8 +3860,7 @@ public: Item_func_sp(THD *thd, Name_resolution_context *context_arg, sp_name *name, const Sp_handler *sph, List<Item> &list); - virtual ~Item_func_sp() - {} + virtual ~Item_func_sp() = default; void update_used_tables() override; diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 0010e86557d..b8a743c2b6f 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -1530,9 +1530,7 @@ exit: } -Item_func_spatial_operation::~Item_func_spatial_operation() -{ -} +Item_func_spatial_operation::~Item_func_spatial_operation() = default; String *Item_func_spatial_operation::val_str(String *str_value) @@ -2787,8 +2785,8 @@ public: static Create_func_area s_singleton; protected: - Create_func_area() {} - virtual ~Create_func_area() {} + Create_func_area() = default; + virtual ~Create_func_area() = default; }; @@ -2803,8 +2801,8 @@ public: static Create_func_as_wkb s_singleton; protected: - Create_func_as_wkb() {} - virtual ~Create_func_as_wkb() {} + Create_func_as_wkb() = default; + virtual ~Create_func_as_wkb() = default; }; @@ -2819,8 +2817,8 @@ public: static Create_func_as_wkt s_singleton; protected: - Create_func_as_wkt() {} - virtual ~Create_func_as_wkt() {} + Create_func_as_wkt() = default; + virtual ~Create_func_as_wkt() = default; }; @@ -2836,8 +2834,8 @@ public: static Create_func_centroid s_singleton; protected: - Create_func_centroid() {} - virtual ~Create_func_centroid() {} + Create_func_centroid() = default; + virtual ~Create_func_centroid() = default; }; @@ -2852,8 +2850,8 @@ public: static Create_func_convexhull s_singleton; protected: - Create_func_convexhull() {} - virtual ~Create_func_convexhull() {} + Create_func_convexhull() = default; + virtual ~Create_func_convexhull() = default; }; @@ -2868,8 +2866,8 @@ public: static Create_func_pointonsurface s_singleton; protected: - Create_func_pointonsurface() {} - virtual ~Create_func_pointonsurface() {} + Create_func_pointonsurface() = default; + virtual ~Create_func_pointonsurface() = default; }; @@ -2885,8 +2883,8 @@ public: static Create_func_mbr_contains s_singleton; protected: - Create_func_mbr_contains() {} - virtual ~Create_func_mbr_contains() {} + Create_func_mbr_contains() = default; + virtual ~Create_func_mbr_contains() = default; }; @@ -2901,8 +2899,8 @@ public: static Create_func_contains s_singleton; protected: - Create_func_contains() {} - virtual ~Create_func_contains() {} + Create_func_contains() = default; + virtual ~Create_func_contains() = default; }; @@ -2917,8 +2915,8 @@ public: static Create_func_crosses s_singleton; protected: - Create_func_crosses() {} - virtual ~Create_func_crosses() {} + Create_func_crosses() = default; + virtual ~Create_func_crosses() = default; }; @@ -2933,8 +2931,8 @@ public: static Create_func_dimension s_singleton; protected: - Create_func_dimension() {} - virtual ~Create_func_dimension() {} + Create_func_dimension() = default; + virtual ~Create_func_dimension() = default; }; @@ -2950,8 +2948,8 @@ public: static Create_func_mbr_disjoint s_singleton; protected: - Create_func_mbr_disjoint() {} - virtual ~Create_func_mbr_disjoint() {} + Create_func_mbr_disjoint() = default; + virtual ~Create_func_mbr_disjoint() = default; }; @@ -2966,8 +2964,8 @@ public: static Create_func_disjoint s_singleton; protected: - Create_func_disjoint() {} - virtual ~Create_func_disjoint() {} + Create_func_disjoint() = default; + virtual ~Create_func_disjoint() = default; }; @@ -2982,8 +2980,8 @@ public: static Create_func_distance s_singleton; protected: - Create_func_distance() {} - virtual ~Create_func_distance() {} + Create_func_distance() = default; + virtual ~Create_func_distance() = default; }; @@ -2995,8 +2993,8 @@ public: static Create_func_distance_sphere s_singleton; protected: - Create_func_distance_sphere() {} - virtual ~Create_func_distance_sphere() {} + Create_func_distance_sphere() = default; + virtual ~Create_func_distance_sphere() = default; }; @@ -3030,8 +3028,8 @@ public: static Create_func_endpoint s_singleton; protected: - Create_func_endpoint() {} - virtual ~Create_func_endpoint() {} + Create_func_endpoint() = default; + virtual ~Create_func_endpoint() = default; }; @@ -3046,8 +3044,8 @@ public: static Create_func_envelope s_singleton; protected: - Create_func_envelope() {} - virtual ~Create_func_envelope() {} + Create_func_envelope() = default; + virtual ~Create_func_envelope() = default; }; class Create_func_boundary : public Create_func_arg1 @@ -3061,8 +3059,8 @@ public: static Create_func_boundary s_singleton; protected: - Create_func_boundary() {} - virtual ~Create_func_boundary() {} + Create_func_boundary() = default; + virtual ~Create_func_boundary() = default; }; @@ -3078,8 +3076,8 @@ public: static Create_func_mbr_equals s_singleton; protected: - Create_func_mbr_equals() {} - virtual ~Create_func_mbr_equals() {} + Create_func_mbr_equals() = default; + virtual ~Create_func_mbr_equals() = default; }; @@ -3095,8 +3093,8 @@ public: static Create_func_equals s_singleton; protected: - Create_func_equals() {} - virtual ~Create_func_equals() {} + Create_func_equals() = default; + virtual ~Create_func_equals() = default; }; @@ -3112,8 +3110,8 @@ public: static Create_func_exteriorring s_singleton; protected: - Create_func_exteriorring() {} - virtual ~Create_func_exteriorring() {} + Create_func_exteriorring() = default; + virtual ~Create_func_exteriorring() = default; }; @@ -3127,8 +3125,8 @@ public: static Create_func_geometry_from_text s_singleton; protected: - Create_func_geometry_from_text() {} - virtual ~Create_func_geometry_from_text() {} + Create_func_geometry_from_text() = default; + virtual ~Create_func_geometry_from_text() = default; }; @@ -3178,8 +3176,8 @@ public: static Create_func_geometry_from_wkb s_singleton; protected: - Create_func_geometry_from_wkb() {} - virtual ~Create_func_geometry_from_wkb() {} + Create_func_geometry_from_wkb() = default; + virtual ~Create_func_geometry_from_wkb() = default; }; @@ -3228,8 +3226,8 @@ public: static Create_func_geometry_from_json s_singleton; protected: - Create_func_geometry_from_json() {} - virtual ~Create_func_geometry_from_json() {} + Create_func_geometry_from_json() = default; + virtual ~Create_func_geometry_from_json() = default; }; @@ -3288,8 +3286,8 @@ public: static Create_func_as_geojson s_singleton; protected: - Create_func_as_geojson() {} - virtual ~Create_func_as_geojson() {} + Create_func_as_geojson() = default; + virtual ~Create_func_as_geojson() = default; }; @@ -3348,8 +3346,8 @@ public: static Create_func_geometry_type s_singleton; protected: - Create_func_geometry_type() {} - virtual ~Create_func_geometry_type() {} + Create_func_geometry_type() = default; + virtual ~Create_func_geometry_type() = default; }; @@ -3365,8 +3363,8 @@ public: static Create_func_geometryn s_singleton; protected: - Create_func_geometryn() {} - virtual ~Create_func_geometryn() {} + Create_func_geometryn() = default; + virtual ~Create_func_geometryn() = default; }; @@ -3382,8 +3380,8 @@ public: static Create_func_gis_debug s_singleton; protected: - Create_func_gis_debug() {} - virtual ~Create_func_gis_debug() {} + Create_func_gis_debug() = default; + virtual ~Create_func_gis_debug() = default; }; #endif @@ -3399,8 +3397,8 @@ public: static Create_func_glength s_singleton; protected: - Create_func_glength() {} - virtual ~Create_func_glength() {} + Create_func_glength() = default; + virtual ~Create_func_glength() = default; }; @@ -3416,8 +3414,8 @@ public: static Create_func_interiorringn s_singleton; protected: - Create_func_interiorringn() {} - virtual ~Create_func_interiorringn() {} + Create_func_interiorringn() = default; + virtual ~Create_func_interiorringn() = default; }; @@ -3432,8 +3430,8 @@ public: static Create_func_relate s_singleton; protected: - Create_func_relate() {} - virtual ~Create_func_relate() {} + Create_func_relate() = default; + virtual ~Create_func_relate() = default; }; @@ -3449,8 +3447,8 @@ public: static Create_func_mbr_intersects s_singleton; protected: - Create_func_mbr_intersects() {} - virtual ~Create_func_mbr_intersects() {} + Create_func_mbr_intersects() = default; + virtual ~Create_func_mbr_intersects() = default; }; @@ -3466,8 +3464,8 @@ public: static Create_func_intersects s_singleton; protected: - Create_func_intersects() {} - virtual ~Create_func_intersects() {} + Create_func_intersects() = default; + virtual ~Create_func_intersects() = default; }; @@ -3483,8 +3481,8 @@ public: static Create_func_intersection s_singleton; protected: - Create_func_intersection() {} - virtual ~Create_func_intersection() {} + Create_func_intersection() = default; + virtual ~Create_func_intersection() = default; }; @@ -3500,8 +3498,8 @@ public: static Create_func_difference s_singleton; protected: - Create_func_difference() {} - virtual ~Create_func_difference() {} + Create_func_difference() = default; + virtual ~Create_func_difference() = default; }; @@ -3517,8 +3515,8 @@ public: static Create_func_union s_singleton; protected: - Create_func_union() {} - virtual ~Create_func_union() {} + Create_func_union() = default; + virtual ~Create_func_union() = default; }; @@ -3534,8 +3532,8 @@ public: static Create_func_symdifference s_singleton; protected: - Create_func_symdifference() {} - virtual ~Create_func_symdifference() {} + Create_func_symdifference() = default; + virtual ~Create_func_symdifference() = default; }; @@ -3550,8 +3548,8 @@ public: static Create_func_buffer s_singleton; protected: - Create_func_buffer() {} - virtual ~Create_func_buffer() {} + Create_func_buffer() = default; + virtual ~Create_func_buffer() = default; }; @@ -3566,8 +3564,8 @@ public: static Create_func_isclosed s_singleton; protected: - Create_func_isclosed() {} - virtual ~Create_func_isclosed() {} + Create_func_isclosed() = default; + virtual ~Create_func_isclosed() = default; }; @@ -3582,8 +3580,8 @@ public: static Create_func_isring s_singleton; protected: - Create_func_isring() {} - virtual ~Create_func_isring() {} + Create_func_isring() = default; + virtual ~Create_func_isring() = default; }; @@ -3598,8 +3596,8 @@ public: static Create_func_isempty s_singleton; protected: - Create_func_isempty() {} - virtual ~Create_func_isempty() {} + Create_func_isempty() = default; + virtual ~Create_func_isempty() = default; }; @@ -3614,8 +3612,8 @@ public: static Create_func_issimple s_singleton; protected: - Create_func_issimple() {} - virtual ~Create_func_issimple() {} + Create_func_issimple() = default; + virtual ~Create_func_issimple() = default; }; @@ -3631,8 +3629,8 @@ public: static Create_func_numgeometries s_singleton; protected: - Create_func_numgeometries() {} - virtual ~Create_func_numgeometries() {} + Create_func_numgeometries() = default; + virtual ~Create_func_numgeometries() = default; }; @@ -3647,8 +3645,8 @@ public: static Create_func_numinteriorring s_singleton; protected: - Create_func_numinteriorring() {} - virtual ~Create_func_numinteriorring() {} + Create_func_numinteriorring() = default; + virtual ~Create_func_numinteriorring() = default; }; @@ -3663,8 +3661,8 @@ public: static Create_func_numpoints s_singleton; protected: - Create_func_numpoints() {} - virtual ~Create_func_numpoints() {} + Create_func_numpoints() = default; + virtual ~Create_func_numpoints() = default; }; @@ -3680,8 +3678,8 @@ public: static Create_func_mbr_overlaps s_singleton; protected: - Create_func_mbr_overlaps() {} - virtual ~Create_func_mbr_overlaps() {} + Create_func_mbr_overlaps() = default; + virtual ~Create_func_mbr_overlaps() = default; }; @@ -3697,8 +3695,8 @@ public: static Create_func_overlaps s_singleton; protected: - Create_func_overlaps() {} - virtual ~Create_func_overlaps() {} + Create_func_overlaps() = default; + virtual ~Create_func_overlaps() = default; }; @@ -3716,8 +3714,8 @@ public: static Create_func_pointn s_singleton; protected: - Create_func_pointn() {} - virtual ~Create_func_pointn() {} + Create_func_pointn() = default; + virtual ~Create_func_pointn() = default; }; @@ -3734,8 +3732,8 @@ public: static Create_func_srid s_singleton; protected: - Create_func_srid() {} - virtual ~Create_func_srid() {} + Create_func_srid() = default; + virtual ~Create_func_srid() = default; }; @@ -3751,8 +3749,8 @@ public: static Create_func_startpoint s_singleton; protected: - Create_func_startpoint() {} - virtual ~Create_func_startpoint() {} + Create_func_startpoint() = default; + virtual ~Create_func_startpoint() = default; }; @@ -3769,8 +3767,8 @@ public: static Create_func_touches s_singleton; protected: - Create_func_touches() {} - virtual ~Create_func_touches() {} + Create_func_touches() = default; + virtual ~Create_func_touches() = default; }; @@ -3786,8 +3784,8 @@ public: static Create_func_mbr_within s_singleton; protected: - Create_func_mbr_within() {} - virtual ~Create_func_mbr_within() {} + Create_func_mbr_within() = default; + virtual ~Create_func_mbr_within() = default; }; @@ -3803,8 +3801,8 @@ public: static Create_func_within s_singleton; protected: - Create_func_within() {} - virtual ~Create_func_within() {} + Create_func_within() = default; + virtual ~Create_func_within() = default; }; @@ -3819,8 +3817,8 @@ public: static Create_func_x s_singleton; protected: - Create_func_x() {} - virtual ~Create_func_x() {} + Create_func_x() = default; + virtual ~Create_func_x() = default; }; @@ -3835,8 +3833,8 @@ public: static Create_func_y s_singleton; protected: - Create_func_y() {} - virtual ~Create_func_y() {} + Create_func_y() = default; + virtual ~Create_func_y() = default; }; diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 860ba1dbf91..862dc15e3e3 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2898,7 +2898,9 @@ bool Item_exists_subselect::select_prepare_to_be_in() bool trans_res= FALSE; DBUG_ENTER("Item_exists_subselect::select_prepare_to_be_in"); if (!optimizer && - thd->lex->sql_command == SQLCOM_SELECT && + (thd->lex->sql_command == SQLCOM_SELECT || + thd->lex->sql_command == SQLCOM_UPDATE_MULTI || + thd->lex->sql_command == SQLCOM_DELETE_MULTI) && !unit->first_select()->is_part_of_union() && optimizer_flag(thd, OPTIMIZER_SWITCH_EXISTS_TO_IN) && (is_top_level_item() || diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 9cc02eb9c59..a304c63c458 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -834,7 +834,7 @@ public: item= si; maybe_null= 0; } - virtual ~subselect_engine() {}; // to satisfy compiler + virtual ~subselect_engine() = default;; // to satisfy compiler virtual void cleanup()= 0; /* diff --git a/sql/item_sum.h b/sql/item_sum.h index 8bd664e495e..58fa61f2d3b 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -59,7 +59,7 @@ protected: public: Aggregator (Item_sum *arg): item_sum(arg) {} - virtual ~Aggregator () {} /* Keep gcc happy */ + virtual ~Aggregator () = default; /* Keep gcc happy */ enum Aggregator_type { SIMPLE_AGGREGATOR, DISTINCT_AGGREGATOR }; virtual Aggregator_type Aggrtype() = 0; diff --git a/sql/log.cc b/sql/log.cc index 0625e2d5c1b..2dbfa8278a2 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -213,7 +213,7 @@ public: m_message[0]= '\0'; } - virtual ~Silence_log_table_errors() {} + virtual ~Silence_log_table_errors() = default; virtual bool handle_condition(THD *thd, uint sql_errno, @@ -646,14 +646,10 @@ end: } -Log_to_csv_event_handler::Log_to_csv_event_handler() -{ -} +Log_to_csv_event_handler::Log_to_csv_event_handler() = default; -Log_to_csv_event_handler::~Log_to_csv_event_handler() -{ -} +Log_to_csv_event_handler::~Log_to_csv_event_handler() = default; void Log_to_csv_event_handler::cleanup() diff --git a/sql/log.h b/sql/log.h index 13819b73d9d..7b62a1a5477 100644 --- a/sql/log.h +++ b/sql/log.h @@ -42,8 +42,8 @@ class TC_LOG { public: int using_heuristic_recover(); - TC_LOG() {} - virtual ~TC_LOG() {} + TC_LOG() = default; + virtual ~TC_LOG() = default; virtual int open(const char *opt_name)=0; virtual void close()=0; @@ -100,7 +100,7 @@ extern PSI_cond_key key_COND_prepare_ordered; class TC_LOG_DUMMY: public TC_LOG // use it to disable the logging { public: - TC_LOG_DUMMY() {} + TC_LOG_DUMMY() = default; int open(const char *opt_name) { return 0; } void close() { } /* @@ -308,7 +308,7 @@ class MYSQL_LOG { public: MYSQL_LOG(); - virtual ~MYSQL_LOG() {} + virtual ~MYSQL_LOG() = default; void init_pthread_objects(); void cleanup(); bool open( @@ -983,7 +983,7 @@ public: class Log_event_handler { public: - Log_event_handler() {} + Log_event_handler() = default; virtual bool init()= 0; virtual void cleanup()= 0; @@ -997,7 +997,7 @@ public: const char *command_type, size_t command_type_len, const char *sql_text, size_t sql_text_len, CHARSET_INFO *client_cs)= 0; - virtual ~Log_event_handler() {} + virtual ~Log_event_handler() = default; }; diff --git a/sql/log_event.cc b/sql/log_event.cc index 53785a89f1e..15f06861928 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -154,7 +154,7 @@ public: reinit_io_cache(m_cache, WRITE_CACHE, 0L, FALSE, TRUE); } - ~Write_on_release_cache() {} + ~Write_on_release_cache() = default; bool flush_data() { @@ -4127,9 +4127,7 @@ Ignorable_log_event::Ignorable_log_event(const uchar *buf, DBUG_VOID_RETURN; } -Ignorable_log_event::~Ignorable_log_event() -{ -} +Ignorable_log_event::~Ignorable_log_event() = default; bool copy_event_cache_to_file_and_reinit(IO_CACHE *cache, FILE *file) { diff --git a/sql/log_event.h b/sql/log_event.h index b031fec665d..6203c57ead2 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2560,8 +2560,7 @@ public: */ Load_log_event(const uchar *buf, uint event_len, const Format_description_log_event* description_event); - ~Load_log_event() - {} + ~Load_log_event() = default; Log_event_type get_type_code() { return sql_ex.new_format() ? NEW_LOAD_EVENT: LOAD_EVENT; @@ -2645,13 +2644,13 @@ public: void pack_info(Protocol* protocol); #endif /* HAVE_REPLICATION */ #else - Start_log_event_v3() {} + Start_log_event_v3() = default; bool print(FILE* file, PRINT_EVENT_INFO* print_event_info); #endif Start_log_event_v3(const uchar *buf, uint event_len, const Format_description_log_event* description_event); - ~Start_log_event_v3() {} + ~Start_log_event_v3() = default; Log_event_type get_type_code() { return START_EVENT_V3;} my_off_t get_header_len(my_off_t l __attribute__((unused))) { return LOG_EVENT_MINIMAL_HEADER_LEN; } @@ -2941,7 +2940,7 @@ Intvar_log_event(THD* thd_arg,uchar type_arg, ulonglong val_arg, Intvar_log_event(const uchar *buf, const Format_description_log_event *description_event); - ~Intvar_log_event() {} + ~Intvar_log_event() = default; Log_event_type get_type_code() { return INTVAR_EVENT;} const char* get_var_type_name(); int get_data_size() { return 9; /* sizeof(type) + sizeof(val) */;} @@ -3022,7 +3021,7 @@ class Rand_log_event: public Log_event Rand_log_event(const uchar *buf, const Format_description_log_event *description_event); - ~Rand_log_event() {} + ~Rand_log_event() = default; Log_event_type get_type_code() { return RAND_EVENT;} int get_data_size() { return 16; /* sizeof(ulonglong) * 2*/ } #ifdef MYSQL_SERVER @@ -3102,7 +3101,7 @@ public: Xid_log_event(const uchar *buf, const Format_description_log_event *description_event); - ~Xid_log_event() {} + ~Xid_log_event() = default; Log_event_type get_type_code() { return XID_EVENT;} int get_data_size() { return sizeof(xid); } #ifdef MYSQL_SERVER @@ -3322,7 +3321,7 @@ public: User_var_log_event(const uchar *buf, uint event_len, const Format_description_log_event *description_event); - ~User_var_log_event() {} + ~User_var_log_event() = default; Log_event_type get_type_code() { return USER_VAR_EVENT;} #ifdef MYSQL_SERVER bool write(); @@ -3372,7 +3371,7 @@ public: const Format_description_log_event *description_event): Log_event(buf, description_event) {} - ~Stop_log_event() {} + ~Stop_log_event() = default; Log_event_type get_type_code() { return STOP_EVENT;} bool is_valid() const { return 1; } @@ -3656,7 +3655,7 @@ public: #endif Gtid_log_event(const uchar *buf, uint event_len, const Format_description_log_event *description_event); - ~Gtid_log_event() { } + ~Gtid_log_event() = default; Log_event_type get_type_code() { return GTID_EVENT; } enum_logged_status logged_status() { return LOGGED_NO_DATA; } int get_data_size() @@ -3909,7 +3908,7 @@ public: Append_block_log_event(const uchar *buf, uint event_len, const Format_description_log_event *description_event); - ~Append_block_log_event() {} + ~Append_block_log_event() = default; Log_event_type get_type_code() { return APPEND_BLOCK_EVENT;} int get_data_size() { return block_len + APPEND_BLOCK_HEADER_LEN ;} bool is_valid() const { return block != 0; } @@ -3950,7 +3949,7 @@ public: Delete_file_log_event(const uchar *buf, uint event_len, const Format_description_log_event* description_event); - ~Delete_file_log_event() {} + ~Delete_file_log_event() = default; Log_event_type get_type_code() { return DELETE_FILE_EVENT;} int get_data_size() { return DELETE_FILE_HEADER_LEN ;} bool is_valid() const { return file_id != 0; } @@ -3990,7 +3989,7 @@ public: Execute_load_log_event(const uchar *buf, uint event_len, const Format_description_log_event *description_event); - ~Execute_load_log_event() {} + ~Execute_load_log_event() = default; Log_event_type get_type_code() { return EXEC_LOAD_EVENT;} int get_data_size() { return EXEC_LOAD_HEADER_LEN ;} bool is_valid() const { return file_id != 0; } @@ -4030,7 +4029,7 @@ public: Begin_load_query_log_event(const uchar *buf, uint event_len, const Format_description_log_event *description_event); - ~Begin_load_query_log_event() {} + ~Begin_load_query_log_event() = default; Log_event_type get_type_code() { return BEGIN_LOAD_QUERY_EVENT; } private: #if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION) @@ -4088,7 +4087,7 @@ public: Execute_load_query_log_event(const uchar *buf, uint event_len, const Format_description_log_event *description_event); - ~Execute_load_query_log_event() {} + ~Execute_load_query_log_event() = default; Log_event_type get_type_code() { return EXECUTE_LOAD_QUERY_EVENT; } bool is_valid() const { return Query_log_event::is_valid() && file_id != 0; } @@ -4126,7 +4125,7 @@ public: {} /* constructor for hopelessly corrupted events */ Unknown_log_event(): Log_event(), what(ENCRYPTED) {} - ~Unknown_log_event() {} + ~Unknown_log_event() = default; bool print(FILE* file, PRINT_EVENT_INFO* print_event_info); Log_event_type get_type_code() { return UNKNOWN_EVENT;} bool is_valid() const { return 1; } diff --git a/sql/mdl.cc b/sql/mdl.cc index 4795d0bb674..8fd1fa7580a 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -415,7 +415,7 @@ public: virtual bool needs_notification(const MDL_ticket *ticket) const = 0; virtual bool conflicting_locks(const MDL_ticket *ticket) const = 0; virtual bitmap_t hog_lock_types_bitmap() const = 0; - virtual ~MDL_lock_strategy() {} + virtual ~MDL_lock_strategy() = default; }; @@ -426,7 +426,7 @@ public: */ struct MDL_scoped_lock : public MDL_lock_strategy { - MDL_scoped_lock() {} + MDL_scoped_lock() = default; virtual const bitmap_t *incompatible_granted_types_bitmap() const { return m_granted_incompatible; } virtual const bitmap_t *incompatible_waiting_types_bitmap() const @@ -463,7 +463,7 @@ public: */ struct MDL_object_lock : public MDL_lock_strategy { - MDL_object_lock() {} + MDL_object_lock() = default; virtual const bitmap_t *incompatible_granted_types_bitmap() const { return m_granted_incompatible; } virtual const bitmap_t *incompatible_waiting_types_bitmap() const @@ -507,7 +507,7 @@ public: struct MDL_backup_lock: public MDL_lock_strategy { - MDL_backup_lock() {} + MDL_backup_lock() = default; virtual const bitmap_t *incompatible_granted_types_bitmap() const { return m_granted_incompatible; } virtual const bitmap_t *incompatible_waiting_types_bitmap() const @@ -1875,13 +1875,11 @@ bool MDL_lock::has_pending_conflicting_lock(enum_mdl_type type) MDL_wait_for_graph_visitor::~MDL_wait_for_graph_visitor() -{ -} += default; MDL_wait_for_subgraph::~MDL_wait_for_subgraph() -{ -} += default; /** Check if ticket represents metadata lock of "stronger" or equal type diff --git a/sql/mdl.h b/sql/mdl.h index 31ac4e81377..998f34ff2bb 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -60,7 +60,7 @@ typedef unsigned short mdl_bitmap_t; class MDL_context_owner { public: - virtual ~MDL_context_owner() {} + virtual ~MDL_context_owner() = default; /** Enter a condition wait. @@ -471,7 +471,7 @@ public: { mdl_key_init(namespace_arg, db_arg, name_arg); } - MDL_key() {} /* To use when part of MDL_request. */ + MDL_key() = default; /* To use when part of MDL_request. */ /** Get thread state name to be used in case when we have to @@ -640,7 +640,7 @@ public: virtual bool inspect_edge(MDL_context *dest) = 0; virtual ~MDL_wait_for_graph_visitor(); - MDL_wait_for_graph_visitor() {} + MDL_wait_for_graph_visitor() = default; }; /** @@ -799,7 +799,7 @@ private: class MDL_savepoint { public: - MDL_savepoint() {}; + MDL_savepoint() = default;; private: MDL_savepoint(MDL_ticket *stmt_ticket, MDL_ticket *trans_ticket) diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h index 37a00e3086f..57cfd21727f 100644 --- a/sql/multi_range_read.h +++ b/sql/multi_range_read.h @@ -204,7 +204,7 @@ class Mrr_reader public: virtual int get_next(range_id_t *range_info) = 0; virtual int refill_buffer(bool initial) = 0; - virtual ~Mrr_reader() {}; /* just to remove compiler warning */ + virtual ~Mrr_reader() = default; /* just to remove compiler warning */ }; diff --git a/sql/my_apc.h b/sql/my_apc.h index cc98e36bbe4..2c0a9ade314 100644 --- a/sql/my_apc.h +++ b/sql/my_apc.h @@ -92,7 +92,7 @@ public: public: /* This function will be called in the target thread */ virtual void call_in_target_thread()= 0; - virtual ~Apc_call() {} + virtual ~Apc_call() = default; }; /* Make a call in the target thread (see function definition for details) */ diff --git a/sql/my_json_writer.h b/sql/my_json_writer.h index 089abd0ad48..c2e70962514 100644 --- a/sql/my_json_writer.h +++ b/sql/my_json_writer.h @@ -393,12 +393,14 @@ protected: public: +#ifdef ENABLED_JSON_WRITER_CONSISTENCY_CHECKS virtual ~Json_writer_struct() { -#ifdef ENABLED_JSON_WRITER_CONSISTENCY_CHECKS named_items_expectation.pop_back(); -#endif } +#else + virtual ~Json_writer_struct() = default; +#endif bool trace_started() const { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 602500682f9..5e14739ee82 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1224,8 +1224,7 @@ class Buffered_log : public Sql_alloc public: Buffered_log(enum loglevel level, const char *message); - ~Buffered_log() - {} + ~Buffered_log() = default; void print(void); @@ -1285,11 +1284,9 @@ void Buffered_log::print() class Buffered_logs { public: - Buffered_logs() - {} + Buffered_logs() = default; - ~Buffered_logs() - {} + ~Buffered_logs() = default; void init(); void cleanup(); @@ -2682,11 +2679,9 @@ void close_connection(THD *thd, uint sql_errno) thd->protocol->net_send_error(thd, sql_errno, ER_DEFAULT(sql_errno), NULL); thd->print_aborted_warning(lvl, ER_DEFAULT(sql_errno)); } - else - thd->print_aborted_warning(lvl, (thd->main_security_ctx.user ? - "This connection closed normally" : - "This connection closed normally without" - " authentication")); + else if (!thd->main_security_ctx.user) + thd->print_aborted_warning(lvl, "This connection closed normally without" + " authentication"); thd->disconnect(); diff --git a/sql/opt_range.cc b/sql/opt_range.cc index e3c80a300a1..c845147e328 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -2227,7 +2227,7 @@ public: { return (void*) alloc_root(mem_root, (uint) size); } static void operator delete(void *ptr,size_t size) { TRASH_FREE(ptr, size); } static void operator delete(void *ptr, MEM_ROOT *mem_root) { /* Never called */ } - virtual ~TABLE_READ_PLAN() {} /* Remove gcc warning */ + virtual ~TABLE_READ_PLAN() = default; /* Remove gcc warning */ /** Add basic info for this TABLE_READ_PLAN to the optimizer trace. @@ -2262,7 +2262,7 @@ public: TRP_RANGE(SEL_ARG *key_arg, uint idx_arg, uint mrr_flags_arg) : key(key_arg), key_idx(idx_arg), mrr_flags(mrr_flags_arg) {} - virtual ~TRP_RANGE() {} /* Remove gcc warning */ + virtual ~TRP_RANGE() = default; /* Remove gcc warning */ QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, MEM_ROOT *parent_alloc) @@ -2309,8 +2309,8 @@ void TRP_RANGE::trace_basic_info(PARAM *param, class TRP_ROR_INTERSECT : public TABLE_READ_PLAN { public: - TRP_ROR_INTERSECT() {} /* Remove gcc warning */ - virtual ~TRP_ROR_INTERSECT() {} /* Remove gcc warning */ + TRP_ROR_INTERSECT() = default; /* Remove gcc warning */ + virtual ~TRP_ROR_INTERSECT() = default; /* Remove gcc warning */ QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, MEM_ROOT *parent_alloc); @@ -2335,8 +2335,8 @@ public: class TRP_ROR_UNION : public TABLE_READ_PLAN { public: - TRP_ROR_UNION() {} /* Remove gcc warning */ - virtual ~TRP_ROR_UNION() {} /* Remove gcc warning */ + TRP_ROR_UNION() = default; /* Remove gcc warning */ + virtual ~TRP_ROR_UNION() = default; /* Remove gcc warning */ QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, MEM_ROOT *parent_alloc); TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */ @@ -2368,8 +2368,8 @@ void TRP_ROR_UNION::trace_basic_info(PARAM *param, class TRP_INDEX_INTERSECT : public TABLE_READ_PLAN { public: - TRP_INDEX_INTERSECT() {} /* Remove gcc warning */ - virtual ~TRP_INDEX_INTERSECT() {} /* Remove gcc warning */ + TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */ + virtual ~TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */ QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, MEM_ROOT *parent_alloc); TRP_RANGE **range_scans; /* array of ptrs to plans of intersected scans */ @@ -2405,8 +2405,8 @@ void TRP_INDEX_INTERSECT::trace_basic_info(PARAM *param, class TRP_INDEX_MERGE : public TABLE_READ_PLAN { public: - TRP_INDEX_MERGE() {} /* Remove gcc warning */ - virtual ~TRP_INDEX_MERGE() {} /* Remove gcc warning */ + TRP_INDEX_MERGE() = default; /* Remove gcc warning */ + virtual ~TRP_INDEX_MERGE() = default; /* Remove gcc warning */ QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, MEM_ROOT *parent_alloc); TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */ @@ -2474,7 +2474,7 @@ public: if (key_infix_len) memcpy(this->key_infix, key_infix_arg, key_infix_len); } - virtual ~TRP_GROUP_MIN_MAX() {} /* Remove gcc warning */ + virtual ~TRP_GROUP_MIN_MAX() = default; /* Remove gcc warning */ QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, MEM_ROOT *parent_alloc); @@ -9714,7 +9714,6 @@ tree_or(RANGE_OPT_PARAM *param,SEL_TREE *tree1,SEL_TREE *tree2) DBUG_RETURN(tree2); SEL_TREE *result= NULL; - key_map result_keys; key_map ored_keys; SEL_TREE *rtree[2]= {NULL,NULL}; SEL_IMERGE *imerge[2]= {NULL, NULL}; diff --git a/sql/opt_range.h b/sql/opt_range.h index 50c0ee921c9..6e1dab84e47 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -324,7 +324,7 @@ public: /* See RANGE_OPT_PARAM::alloced_sel_args */ enum { MAX_SEL_ARGS = 16000 }; - SEL_ARG() {} + SEL_ARG() = default; SEL_ARG(SEL_ARG &); SEL_ARG(Field *,const uchar *, const uchar *); SEL_ARG(Field *field, uint8 part, uchar *min_value, uchar *max_value, @@ -934,7 +934,7 @@ public: uint used_key_parts; QUICK_SELECT_I(); - virtual ~QUICK_SELECT_I(){}; + virtual ~QUICK_SELECT_I() = default;; /* Do post-constructor initialization. diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index a6f0ac24719..c3297cb81cd 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -218,7 +218,7 @@ class Dep_value : public Sql_alloc { public: Dep_value(): bound(FALSE) {} - virtual ~Dep_value(){} /* purecov: inspected */ /* stop compiler warnings */ + virtual ~Dep_value() = default; /* purecov: inspected */ bool is_bound() { return bound; } void make_bound() { bound= TRUE; } @@ -342,7 +342,7 @@ const size_t Dep_value::iterator_size= class Dep_module : public Sql_alloc { public: - virtual ~Dep_module(){} /* purecov: inspected */ /* stop compiler warnings */ + virtual ~Dep_module() = default; /* purecov: inspected */ /* Mark as bound. Currently is non-virtual and does nothing */ void make_bound() {}; diff --git a/sql/parse_file.h b/sql/parse_file.h index cd26ffec91a..0589d628bfc 100644 --- a/sql/parse_file.h +++ b/sql/parse_file.h @@ -55,8 +55,8 @@ struct File_option class Unknown_key_hook { public: - Unknown_key_hook() {} /* Remove gcc warning */ - virtual ~Unknown_key_hook() {} /* Remove gcc warning */ + Unknown_key_hook() = default; /* Remove gcc warning */ + virtual ~Unknown_key_hook() = default; /* Remove gcc warning */ virtual bool process_unknown_string(const char *&unknown_key, uchar* base, MEM_ROOT *mem_root, const char *end)= 0; }; @@ -67,7 +67,7 @@ public: class File_parser_dummy_hook: public Unknown_key_hook { public: - File_parser_dummy_hook() {} /* Remove gcc warning */ + File_parser_dummy_hook() = default; /* Remove gcc warning */ virtual bool process_unknown_string(const char *&unknown_key, uchar* base, MEM_ROOT *mem_root, const char *end); }; diff --git a/sql/partition_element.h b/sql/partition_element.h index e0a519065cc..c372625682f 100644 --- a/sql/partition_element.h +++ b/sql/partition_element.h @@ -159,7 +159,7 @@ public: empty(part_elem->empty), type(CONVENTIONAL) {} - ~partition_element() {} + ~partition_element() = default; part_column_list_val& get_col_val(uint idx) { diff --git a/sql/partition_info.h b/sql/partition_info.h index d3b7e779a5f..ebd41ce1764 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -336,7 +336,7 @@ public: part_field_list.empty(); subpart_field_list.empty(); } - ~partition_info() {} + ~partition_info() = default; partition_info *get_clone(THD *thd, bool empty_data_and_index_file= FALSE); bool set_named_partition_bitmap(const char *part_name, size_t length); diff --git a/sql/protocol.h b/sql/protocol.h index f095ad68a34..683bbd69583 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -90,7 +90,7 @@ protected: public: THD *thd; Protocol(THD *thd_arg) { init(thd_arg); } - virtual ~Protocol() {} + virtual ~Protocol() = default; void init(THD* thd_arg); enum { SEND_NUM_ROWS= 1, SEND_EOF= 2, SEND_FORCE_COLUMN_INFO= 4 }; diff --git a/sql/rowid_filter.h b/sql/rowid_filter.h index cb1615c5925..02962f3e677 100644 --- a/sql/rowid_filter.h +++ b/sql/rowid_filter.h @@ -195,7 +195,7 @@ public: /* True if the container does not contain any element */ virtual bool is_empty() = 0; - virtual ~Rowid_filter_container() {} + virtual ~Rowid_filter_container() = default; }; @@ -232,7 +232,7 @@ public: */ virtual bool check(char *elem) = 0; - virtual ~Rowid_filter() {} + virtual ~Rowid_filter() = default; bool is_empty() { return container->is_empty(); } diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index 2319f69d67c..3080d92bf63 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -131,9 +131,7 @@ injector::transaction::binlog_pos injector::transaction::start_pos() const */ /* This constructor is called below */ -inline injector::injector() -{ -} +inline injector::injector() = default; static injector *s_injector= 0; injector *injector::instance() diff --git a/sql/rpl_injector.h b/sql/rpl_injector.h index 28359d9555a..6a1c724809a 100644 --- a/sql/rpl_injector.h +++ b/sql/rpl_injector.h @@ -307,7 +307,7 @@ public: private: explicit injector(); - ~injector() { } /* Nothing needs to be done */ + ~injector() = default; /* Nothing needs to be done */ injector(injector const&); /* You're not allowed to copy injector instances. */ diff --git a/sql/semisync_master.h b/sql/semisync_master.h index 04fc0e5ce50..5451ad512c6 100644 --- a/sql/semisync_master.h +++ b/sql/semisync_master.h @@ -454,7 +454,7 @@ class Repl_semi_sync_master public: Repl_semi_sync_master(); - ~Repl_semi_sync_master() {} + ~Repl_semi_sync_master() = default; void cleanup(); diff --git a/sql/semisync_master_ack_receiver.h b/sql/semisync_master_ack_receiver.h index b75cb7b76cb..d869bd2e6d4 100644 --- a/sql/semisync_master_ack_receiver.h +++ b/sql/semisync_master_ack_receiver.h @@ -50,7 +50,7 @@ class Ack_receiver : public Repl_semi_sync_base { public: Ack_receiver(); - ~Ack_receiver() {} + ~Ack_receiver() = default; void cleanup(); /** Notify ack receiver to receive acks on the dump session. diff --git a/sql/semisync_slave.h b/sql/semisync_slave.h index f0b8eceeebf..a8229245ab1 100644 --- a/sql/semisync_slave.h +++ b/sql/semisync_slave.h @@ -34,7 +34,7 @@ class Repl_semi_sync_slave :public Repl_semi_sync_base { public: Repl_semi_sync_slave() :m_slave_enabled(false) {} - ~Repl_semi_sync_slave() {} + ~Repl_semi_sync_slave() = default; void set_trace_level(unsigned long trace_level) { m_trace_level = trace_level; diff --git a/sql/session_tracker.h b/sql/session_tracker.h index c78778ac73c..5715b5837b5 100644 --- a/sql/session_tracker.h +++ b/sql/session_tracker.h @@ -78,7 +78,7 @@ private: bool m_changed; public: - virtual ~State_tracker() {} + virtual ~State_tracker() = default; /** Getters */ bool is_enabled() const diff --git a/sql/set_var.h b/sql/set_var.h index 611f16e8bbb..ce1d01b9bd2 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -99,7 +99,7 @@ public: on_check_function on_check_func, on_update_function on_update_func, const char *substitute); - virtual ~sys_var() {} + virtual ~sys_var() = default; /** All the cleanup procedures should be performed here @@ -278,8 +278,8 @@ protected: class set_var_base :public Sql_alloc { public: - set_var_base() {} - virtual ~set_var_base() {} + set_var_base() = default; + virtual ~set_var_base() = default; virtual int check(THD *thd)=0; /* To check privileges etc. */ virtual int update(THD *thd)=0; /* To set the value */ virtual int light_check(THD *thd) { return check(thd); } /* for PS */ diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 53814b16578..9fcbc324805 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -8941,12 +8941,12 @@ ER_INVALID_DEFAULT_VALUE_FOR_FIELD 22007 hindi "गलत डिफ़ॉल्ट मान '%-.128T' कॉलम '%.192s' के लिए" spa "Valor por defecto incorrecto '%-.128T' para columna '%.192s'" ER_KILL_QUERY_DENIED_ERROR - chi "你不是查询%lu的所有者" - eng "You are not owner of query %lu" - ger "Sie sind nicht Eigentümer von Abfrage %lu" - hindi "आप क्वेरी %lu के OWNER नहीं हैं" - rus "Вы не являетесь владельцем запроса %lu" - spa "No eres el propietario de la consulta (query) %lu" + chi "你不是查询%lld的所有者" + eng "You are not owner of query %lld" + ger "Sie sind nicht Eigentümer von Abfrage %lld" + hindi "आप क्वेरी %lld के OWNER नहीं हैं" + rus "Вы не являетесь владельцем запроса %lld" + spa "No eres el propietario de la consulta (query) %lld" ER_NO_EIS_FOR_FIELD chi "没有收集无关的统计信息列'%s'" eng "Engine-independent statistics are not collected for column '%s'" diff --git a/sql/slave.cc b/sql/slave.cc index 3c31ca39441..0312b487e17 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4209,6 +4209,21 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, int exec_res; Log_event_type typ= ev->get_type_code(); + DBUG_EXECUTE_IF( + "pause_sql_thread_on_next_event", + { + /* + Temporarily unlock data_lock so we can check-in with the IO thread + */ + mysql_mutex_unlock(&rli->data_lock); + DBUG_ASSERT(!debug_sync_set_action( + thd, + STRING_WITH_LEN( + "now SIGNAL paused_on_event WAIT_FOR sql_thread_continue"))); + DBUG_SET("-d,pause_sql_thread_on_next_event"); + mysql_mutex_lock(&rli->data_lock); + }); + /* Even if we don't execute this event, we keep the master timestamp, so that seconds behind master shows correct delta (there are events @@ -119,7 +119,7 @@ public: // TODO: make it private or protected const; public: - virtual ~Sp_handler() {} + virtual ~Sp_handler() = default; static const Sp_handler *handler(enum enum_sql_command cmd); static const Sp_handler *handler(enum_sp_type type); static const Sp_handler *handler(MDL_key::enum_mdl_namespace ns); diff --git a/sql/sp_head.h b/sql/sp_head.h index eee5212679f..57def5baa83 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -124,8 +124,7 @@ public: /** Create temporary sp_name object from MDL key. Store in qname_buff */ sp_name(const MDL_key *key, char *qname_buff); - ~sp_name() - {} + ~sp_name() = default; }; @@ -1304,8 +1303,7 @@ public: m_query.length= 0; } - virtual ~sp_instr_stmt() - {}; + virtual ~sp_instr_stmt() = default; virtual int execute(THD *thd, uint *nextp); @@ -1340,8 +1338,7 @@ public: m_lex_keeper(lex, lex_resp) {} - virtual ~sp_instr_set() - {} + virtual ~sp_instr_set() = default; virtual int execute(THD *thd, uint *nextp); @@ -1384,8 +1381,7 @@ public: m_field_offset(field_offset) {} - virtual ~sp_instr_set_row_field() - {} + virtual ~sp_instr_set_row_field() = default; virtual int exec_core(THD *thd, uint *nextp); @@ -1427,8 +1423,7 @@ public: m_field_name(field_name) {} - virtual ~sp_instr_set_row_field_by_name() - {} + virtual ~sp_instr_set_row_field_by_name() = default; virtual int exec_core(THD *thd, uint *nextp); @@ -1454,8 +1449,7 @@ public: value(val), m_lex_keeper(lex, TRUE) {} - virtual ~sp_instr_set_trigger_field() - {} + virtual ~sp_instr_set_trigger_field() = default; virtual int execute(THD *thd, uint *nextp); @@ -1498,8 +1492,7 @@ public: m_dest(dest), m_cont_dest(0), m_optdest(0), m_cont_optdest(0) {} - virtual ~sp_instr_opt_meta() - {} + virtual ~sp_instr_opt_meta() = default; virtual void set_destination(uint old_dest, uint new_dest) = 0; @@ -1528,8 +1521,7 @@ public: : sp_instr_opt_meta(ip, ctx, dest) {} - virtual ~sp_instr_jump() - {} + virtual ~sp_instr_jump() = default; virtual int execute(THD *thd, uint *nextp); @@ -1580,8 +1572,7 @@ public: m_lex_keeper(lex, TRUE) {} - virtual ~sp_instr_jump_if_not() - {} + virtual ~sp_instr_jump_if_not() = default; virtual int execute(THD *thd, uint *nextp); @@ -1628,8 +1619,7 @@ public: : sp_instr(ip, ctx) {} - virtual ~sp_instr_preturn() - {} + virtual ~sp_instr_preturn() = default; virtual int execute(THD *thd, uint *nextp); @@ -1660,8 +1650,7 @@ public: m_lex_keeper(lex, TRUE) {} - virtual ~sp_instr_freturn() - {} + virtual ~sp_instr_freturn() = default; virtual int execute(THD *thd, uint *nextp); @@ -1766,8 +1755,7 @@ public: : sp_instr(ip, ctx), m_count(count) {} - virtual ~sp_instr_hpop() - {} + virtual ~sp_instr_hpop() = default; void update_count(uint count) { @@ -1800,8 +1788,7 @@ public: m_frame(ctx->current_var_count()) {} - virtual ~sp_instr_hreturn() - {} + virtual ~sp_instr_hreturn() = default; virtual int execute(THD *thd, uint *nextp); @@ -1837,8 +1824,7 @@ public: : sp_instr(ip, ctx), m_lex_keeper(lex, TRUE), m_cursor(offset) {} - virtual ~sp_instr_cpush() - {} + virtual ~sp_instr_cpush() = default; int execute(THD *thd, uint *nextp) override; @@ -1873,8 +1859,7 @@ public: : sp_instr(ip, ctx), m_count(count) {} - virtual ~sp_instr_cpop() - {} + virtual ~sp_instr_cpop() = default; void update_count(uint count) { @@ -1906,8 +1891,7 @@ public: : sp_instr(ip, ctx), m_cursor(c) {} - virtual ~sp_instr_copen() - {} + virtual ~sp_instr_copen() = default; virtual int execute(THD *thd, uint *nextp); @@ -1944,8 +1928,7 @@ public: m_cursor(coffs), m_var(voffs) {} - virtual ~sp_instr_cursor_copy_struct() - {} + virtual ~sp_instr_cursor_copy_struct() = default; virtual int execute(THD *thd, uint *nextp); virtual int exec_core(THD *thd, uint *nextp); virtual void print(String *str); @@ -1967,8 +1950,7 @@ public: : sp_instr(ip, ctx), m_cursor(c) {} - virtual ~sp_instr_cclose() - {} + virtual ~sp_instr_cclose() = default; virtual int execute(THD *thd, uint *nextp); @@ -1997,8 +1979,7 @@ public: m_varlist.empty(); } - virtual ~sp_instr_cfetch() - {} + virtual ~sp_instr_cfetch() = default; virtual int execute(THD *thd, uint *nextp); @@ -2036,8 +2017,7 @@ public: sp_instr_agg_cfetch(uint ip, sp_pcontext *ctx) : sp_instr(ip, ctx){} - virtual ~sp_instr_agg_cfetch() - {} + virtual ~sp_instr_agg_cfetch() = default; virtual int execute(THD *thd, uint *nextp); @@ -2062,8 +2042,7 @@ public: : sp_instr(ip, ctx), m_errcode(errcode) {} - virtual ~sp_instr_error() - {} + virtual ~sp_instr_error() = default; virtual int execute(THD *thd, uint *nextp); @@ -2096,8 +2075,7 @@ public: m_lex_keeper(lex, TRUE) {} - virtual ~sp_instr_set_case_expr() - {} + virtual ~sp_instr_set_case_expr() = default; virtual int execute(THD *thd, uint *nextp); diff --git a/sql/spatial.h b/sql/spatial.h index 8974511adf9..d85bdc86af4 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -214,8 +214,8 @@ struct Geometry_buffer; class Geometry { public: - Geometry() {} /* Remove gcc warning */ - virtual ~Geometry() {} /* Remove gcc warning */ + Geometry() = default; /* Remove gcc warning */ + virtual ~Geometry() = default; /* Remove gcc warning */ static void *operator new(size_t size, void *buffer) { return buffer; @@ -395,8 +395,8 @@ protected: class Gis_point: public Geometry { public: - Gis_point() {} /* Remove gcc warning */ - virtual ~Gis_point() {} /* Remove gcc warning */ + Gis_point() = default; /* Remove gcc warning */ + virtual ~Gis_point() = default; /* Remove gcc warning */ uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); @@ -465,8 +465,8 @@ public: class Gis_line_string: public Geometry { public: - Gis_line_string() {} /* Remove gcc warning */ - virtual ~Gis_line_string() {} /* Remove gcc warning */ + Gis_line_string() = default; /* Remove gcc warning */ + virtual ~Gis_line_string() = default; /* Remove gcc warning */ uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); @@ -498,8 +498,8 @@ public: class Gis_polygon: public Geometry { public: - Gis_polygon() {} /* Remove gcc warning */ - virtual ~Gis_polygon() {} /* Remove gcc warning */ + Gis_polygon() = default; /* Remove gcc warning */ + virtual ~Gis_polygon() = default; /* Remove gcc warning */ uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); @@ -535,8 +535,8 @@ class Gis_multi_point: public Geometry (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) / (WKB_HEADER_SIZE + POINT_DATA_SIZE); public: - Gis_multi_point() {} /* Remove gcc warning */ - virtual ~Gis_multi_point() {} /* Remove gcc warning */ + Gis_multi_point() = default; /* Remove gcc warning */ + virtual ~Gis_multi_point() = default; /* Remove gcc warning */ uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); @@ -566,8 +566,8 @@ public: class Gis_multi_line_string: public Geometry { public: - Gis_multi_line_string() {} /* Remove gcc warning */ - virtual ~Gis_multi_line_string() {} /* Remove gcc warning */ + Gis_multi_line_string() = default; /* Remove gcc warning */ + virtual ~Gis_multi_line_string() = default; /* Remove gcc warning */ uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); @@ -597,8 +597,8 @@ public: class Gis_multi_polygon: public Geometry { public: - Gis_multi_polygon() {} /* Remove gcc warning */ - virtual ~Gis_multi_polygon() {} /* Remove gcc warning */ + Gis_multi_polygon() = default; /* Remove gcc warning */ + virtual ~Gis_multi_polygon() = default; /* Remove gcc warning */ uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); @@ -628,8 +628,8 @@ public: class Gis_geometry_collection: public Geometry { public: - Gis_geometry_collection() {} /* Remove gcc warning */ - virtual ~Gis_geometry_collection() {} /* Remove gcc warning */ + Gis_geometry_collection() = default; /* Remove gcc warning */ + virtual ~Gis_geometry_collection() = default; /* Remove gcc warning */ uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index b6f7daf42c3..66d5aaa9d2f 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -200,7 +200,7 @@ class ACL_USER :public ACL_USER_BASE, { public: - ACL_USER() { } + ACL_USER() = default; ACL_USER(THD *thd, const LEX_USER &combo, const Account_options &options, const privilege_t privileges); @@ -338,7 +338,7 @@ class ACL_PROXY_USER :public ACL_ACCESS MYSQL_PROXIES_PRIV_GRANTOR, MYSQL_PROXIES_PRIV_TIMESTAMP } proxy_table_fields; public: - ACL_PROXY_USER () {}; + ACL_PROXY_USER () = default; void init(const char *host_arg, const char *user_arg, const char *proxied_host_arg, const char *proxied_user_arg, @@ -929,7 +929,7 @@ class User_table: public Grant_table_base virtual longlong get_password_lifetime () const = 0; virtual int set_password_lifetime (longlong x) const = 0; - virtual ~User_table() {} + virtual ~User_table() = default; private: friend class Grant_tables; virtual int setup_sysvars() const = 0; @@ -1278,7 +1278,7 @@ class User_table_tabular: public User_table return 1; } - virtual ~User_table_tabular() {} + virtual ~User_table_tabular() = default; private: friend class Grant_tables; @@ -1689,7 +1689,7 @@ class User_table_json: public User_table int set_password_expired (bool x) const { return x ? set_password_last_changed(0) : 0; } - ~User_table_json() {} + ~User_table_json() = default; private: friend class Grant_tables; static const uint JSON_SIZE=1024; @@ -5316,7 +5316,7 @@ public: GRANT_NAME(const char *h, const char *d,const char *u, const char *t, privilege_t p, bool is_routine); GRANT_NAME (TABLE *form, bool is_routine); - virtual ~GRANT_NAME() {}; + virtual ~GRANT_NAME() = default; virtual bool ok() { return privs != NO_ACL; } void set_user_details(const char *h, const char *d, const char *u, const char *t, @@ -11607,8 +11607,7 @@ public: : is_grave(FALSE) {} - virtual ~Silence_routine_definer_errors() - {} + virtual ~Silence_routine_definer_errors() = default; virtual bool handle_condition(THD *thd, uint sql_errno, diff --git a/sql/sql_acl.h b/sql/sql_acl.h index 570da144b46..b4288b05bfb 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -184,11 +184,9 @@ enum ACL_internal_access_result class ACL_internal_table_access { public: - ACL_internal_table_access() - {} + ACL_internal_table_access() = default; - virtual ~ACL_internal_table_access() - {} + virtual ~ACL_internal_table_access() = default; /** Check access to an internal table. @@ -223,11 +221,9 @@ public: class ACL_internal_schema_access { public: - ACL_internal_schema_access() - {} + ACL_internal_schema_access() = default; - virtual ~ACL_internal_schema_access() - {} + virtual ~ACL_internal_schema_access() = default; /** Check access to an internal schema. diff --git a/sql/sql_admin.h b/sql/sql_admin.h index 0c7f1c3cee5..1a237d4f616 100644 --- a/sql/sql_admin.h +++ b/sql/sql_admin.h @@ -34,11 +34,9 @@ public: /** Constructor, used to represent a ANALYZE TABLE statement. */ - Sql_cmd_analyze_table() - {} + Sql_cmd_analyze_table() = default; - ~Sql_cmd_analyze_table() - {} + ~Sql_cmd_analyze_table() = default; bool execute(THD *thd); @@ -59,11 +57,9 @@ public: /** Constructor, used to represent a CHECK TABLE statement. */ - Sql_cmd_check_table() - {} + Sql_cmd_check_table() = default; - ~Sql_cmd_check_table() - {} + ~Sql_cmd_check_table() = default; bool execute(THD *thd); @@ -83,11 +79,9 @@ public: /** Constructor, used to represent a OPTIMIZE TABLE statement. */ - Sql_cmd_optimize_table() - {} + Sql_cmd_optimize_table() = default; - ~Sql_cmd_optimize_table() - {} + ~Sql_cmd_optimize_table() = default; bool execute(THD *thd); @@ -108,11 +102,9 @@ public: /** Constructor, used to represent a REPAIR TABLE statement. */ - Sql_cmd_repair_table() - {} + Sql_cmd_repair_table() = default; - ~Sql_cmd_repair_table() - {} + ~Sql_cmd_repair_table() = default; bool execute(THD *thd); diff --git a/sql/sql_alter.h b/sql/sql_alter.h index d91984d4b26..d0ac4ab27f5 100644 --- a/sql/sql_alter.h +++ b/sql/sql_alter.h @@ -370,11 +370,9 @@ protected: /** Constructor. */ - Sql_cmd_common_alter_table() - {} + Sql_cmd_common_alter_table() = default; - virtual ~Sql_cmd_common_alter_table() - {} + virtual ~Sql_cmd_common_alter_table() = default; virtual enum_sql_command sql_command_code() const { @@ -393,11 +391,9 @@ public: /** Constructor, used to represent a ALTER TABLE statement. */ - Sql_cmd_alter_table() - {} + Sql_cmd_alter_table() = default; - ~Sql_cmd_alter_table() - {} + ~Sql_cmd_alter_table() = default; Storage_engine_name *option_storage_engine_name() { return this; } @@ -419,8 +415,7 @@ public: :DDL_options(options) {} - ~Sql_cmd_alter_sequence() - {} + ~Sql_cmd_alter_sequence() = default; enum_sql_command sql_command_code() const { diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 5de9782fd09..eff806b2d37 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1412,7 +1412,7 @@ public: : m_ot_ctx(ot_ctx_arg), m_is_active(FALSE) {} - virtual ~MDL_deadlock_handler() {} + virtual ~MDL_deadlock_handler() = default; virtual bool handle_condition(THD *thd, uint sql_errno, diff --git a/sql/sql_base.h b/sql/sql_base.h index 5b449fdddac..0bfef1ca7ee 100644 --- a/sql/sql_base.h +++ b/sql/sql_base.h @@ -394,7 +394,7 @@ inline bool setup_fields_with_no_wrap(THD *thd, Ref_ptr_array ref_pointer_array, class Prelocking_strategy { public: - virtual ~Prelocking_strategy() { } + virtual ~Prelocking_strategy() = default; virtual void reset(THD *thd) { }; virtual bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx, diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index 02dc8198c7c..353601eb98a 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -90,7 +90,7 @@ public: or to call set_all()/clear_all()/set_prefix() to initialize bitmap. */ - Bitmap() { } + Bitmap() = default; explicit Bitmap(uint prefix) { diff --git a/sql/sql_cache.h b/sql/sql_cache.h index 126693b9964..a02034764a7 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -91,7 +91,7 @@ typedef my_bool (*qc_engine_callback)(THD *thd, const char *table_key, */ struct Query_cache_block_table { - Query_cache_block_table() {} /* Remove gcc warning */ + Query_cache_block_table() = default; /* Remove gcc warning */ /** This node holds a position in a static table list belonging @@ -122,7 +122,7 @@ struct Query_cache_block_table struct Query_cache_block { - Query_cache_block() {} /* Remove gcc warning */ + Query_cache_block() = default; /* Remove gcc warning */ enum block_type {FREE, QUERY, RESULT, RES_CONT, RES_BEG, RES_INCOMPLETE, TABLE, INCOMPLETE}; @@ -161,7 +161,7 @@ struct Query_cache_query uint8 ready; ulonglong hit_count; - Query_cache_query() {} /* Remove gcc warning */ + Query_cache_query() = default; /* Remove gcc warning */ inline void init_n_lock(); void unlock_n_destroy(); inline ulonglong found_rows() { return limit_found_rows; } @@ -197,7 +197,7 @@ struct Query_cache_query struct Query_cache_table { - Query_cache_table() {} /* Remove gcc warning */ + Query_cache_table() = default; /* Remove gcc warning */ char *tbl; uint32 key_len; uint8 suffix_len; /* For partitioned tables */ @@ -240,7 +240,7 @@ struct Query_cache_table struct Query_cache_result { - Query_cache_result() {} /* Remove gcc warning */ + Query_cache_result() = default; /* Remove gcc warning */ Query_cache_block *query; inline uchar* data() @@ -266,7 +266,7 @@ extern "C" void query_cache_invalidate_by_MyISAM_filename(const char* filename); struct Query_cache_memory_bin { - Query_cache_memory_bin() {} /* Remove gcc warning */ + Query_cache_memory_bin() = default; /* Remove gcc warning */ #ifndef DBUG_OFF size_t size; #endif @@ -285,7 +285,7 @@ struct Query_cache_memory_bin struct Query_cache_memory_bin_step { - Query_cache_memory_bin_step() {} /* Remove gcc warning */ + Query_cache_memory_bin_step() = default; /* Remove gcc warning */ size_t size; size_t increment; size_t idx; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 2037d461db4..d9561b36667 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4050,9 +4050,7 @@ void THD::restore_active_arena(Query_arena *set, Query_arena *backup) DBUG_VOID_RETURN; } -Statement::~Statement() -{ -} +Statement::~Statement() = default; C_MODE_START diff --git a/sql/sql_class.h b/sql/sql_class.h index d3ef8f687de..f7b4f4432c1 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -473,7 +473,7 @@ public: invisible(false), without_overlaps(false) {} Key(const Key &rhs, MEM_ROOT *mem_root); - virtual ~Key() {} + virtual ~Key() = default; /* Equality comparison of keys (ignoring name) */ friend bool foreign_key_prefix(Key *a, Key *b); /** @@ -1221,7 +1221,7 @@ public: Query_arena() { INIT_ARENA_DBUG_INFO; } virtual Type type() const; - virtual ~Query_arena() {}; + virtual ~Query_arena() = default; inline bool is_stmt_prepare() const { return state == STMT_INITIALIZED; } inline bool is_stmt_prepare_or_first_sp_execute() const @@ -1272,7 +1272,7 @@ public: Query_arena_memroot() : Query_arena() {} - virtual ~Query_arena_memroot() {} + virtual ~Query_arena_memroot() = default; }; @@ -1422,7 +1422,7 @@ public: my_bool query_cache_is_applicable; /* This constructor is called for backup statements */ - Statement() {} + Statement() = default; Statement(LEX *lex_arg, MEM_ROOT *mem_root_arg, enum enum_state state_arg, ulong id_arg); @@ -1930,7 +1930,7 @@ protected: m_prev_internal_handler(NULL) {} - virtual ~Internal_error_handler() {} + virtual ~Internal_error_handler() = default; public: /** @@ -1988,7 +1988,7 @@ public: /* Ignore error */ return TRUE; } - Dummy_error_handler() {} /* Remove gcc warning */ + Dummy_error_handler() = default; /* Remove gcc warning */ }; @@ -2025,7 +2025,7 @@ public: class Drop_table_error_handler : public Internal_error_handler { public: - Drop_table_error_handler() {} + Drop_table_error_handler() = default; public: bool handle_condition(THD *thd, @@ -2066,7 +2066,7 @@ private: class Turn_errors_to_warnings_handler : public Internal_error_handler { public: - Turn_errors_to_warnings_handler() {} + Turn_errors_to_warnings_handler() = default; bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, @@ -5730,7 +5730,7 @@ public: example for a duplicate row entry written to a temp table. */ virtual int send_data(List<Item> &items)=0; - virtual ~select_result_sink() {}; + virtual ~select_result_sink() = default; void reset(THD *thd_arg) { thd= thd_arg; } }; @@ -5762,7 +5762,7 @@ public: ha_rows est_records; /* estimated number of records in the result */ select_result(THD *thd_arg): select_result_sink(thd_arg), est_records(0) {} void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; } - virtual ~select_result() {}; + virtual ~select_result() = default; /** Change wrapped select_result. @@ -7009,7 +7009,7 @@ class user_var_entry { CHARSET_INFO *m_charset; public: - user_var_entry() {} /* Remove gcc warning */ + user_var_entry() = default; /* Remove gcc warning */ LEX_CSTRING name; char *value; size_t length; @@ -7130,7 +7130,7 @@ public: enum type { SESSION_VAR, LOCAL_VAR, PARAM_VAR }; type scope; my_var(const LEX_CSTRING *j, enum type s) : name(*j), scope(s) { } - virtual ~my_var() {} + virtual ~my_var() = default; virtual bool set(THD *thd, Item *val) = 0; virtual my_var_sp *get_my_var_sp() { return NULL; } }; @@ -7151,7 +7151,7 @@ public: : my_var(j, LOCAL_VAR), m_rcontext_handler(rcontext_handler), m_type_handler(type_handler), offset(o), sp(s) { } - ~my_var_sp() { } + ~my_var_sp() = default; bool set(THD *thd, Item *val); my_var_sp *get_my_var_sp() { return this; } const Type_handler *type_handler() const @@ -7181,7 +7181,7 @@ class my_var_user: public my_var { public: my_var_user(const LEX_CSTRING *j) : my_var(j, SESSION_VAR) { } - ~my_var_user() { } + ~my_var_user() = default; bool set(THD *thd, Item *val); }; @@ -7194,7 +7194,7 @@ public: select_dumpvar(THD *thd_arg) :select_result_interceptor(thd_arg), row_count(0), m_var_sp_row(NULL) { var_list.empty(); } - ~select_dumpvar() {} + ~select_dumpvar() = default; int prepare(List<Item> &list, SELECT_LEX_UNIT *u); int send_data(List<Item> &items); bool send_eof(); diff --git a/sql/sql_cmd.h b/sql/sql_cmd.h index ce34852117f..53dd6e750f8 100644 --- a/sql/sql_cmd.h +++ b/sql/sql_cmd.h @@ -193,8 +193,7 @@ public: } protected: - Sql_cmd() - {} + Sql_cmd() = default; virtual ~Sql_cmd() { @@ -262,8 +261,7 @@ public: m_handler(handler) {} - virtual ~Sql_cmd_call() - {} + virtual ~Sql_cmd_call() = default; /** Execute a CALL statement at runtime. diff --git a/sql/sql_crypt.h b/sql/sql_crypt.h index 3c90550c944..aab97501b48 100644 --- a/sql/sql_crypt.h +++ b/sql/sql_crypt.h @@ -30,12 +30,12 @@ class SQL_CRYPT :public Sql_alloc char decode_buff[256],encode_buff[256]; uint shift; public: - SQL_CRYPT() {} + SQL_CRYPT() = default; SQL_CRYPT(ulong *seed) { init(seed); } - ~SQL_CRYPT() {} + ~SQL_CRYPT() = default; void init(ulong *seed); void reinit() { shift=0; rand=org_rand; } void encode(char *str, uint length); diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index d45f2ac8777..cef8ac161df 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -197,9 +197,7 @@ end: Server_side_cursor ****************************************************************************/ -Server_side_cursor::~Server_side_cursor() -{ -} +Server_side_cursor::~Server_side_cursor() = default; void Server_side_cursor::operator delete(void *ptr, size_t size) diff --git a/sql/sql_debug.h b/sql/sql_debug.h index 6109ca38048..003caec5454 100644 --- a/sql/sql_debug.h +++ b/sql/sql_debug.h @@ -22,7 +22,7 @@ class Debug_key: public String { public: - Debug_key() { }; + Debug_key() = default; void print(THD *thd) const { push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, diff --git a/sql/sql_error.h b/sql/sql_error.h index 8c0deb5e172..679672e5994 100644 --- a/sql/sql_error.h +++ b/sql/sql_error.h @@ -245,8 +245,7 @@ class Sql_condition_identity: public Sql_state_errno_level, public Sql_user_condition_identity { public: - Sql_condition_identity() - { } + Sql_condition_identity() = default; Sql_condition_identity(const Sql_state_errno_level &st, const Sql_user_condition_identity &ucid) :Sql_state_errno_level(st), @@ -447,8 +446,7 @@ private: } /** Destructor. */ - ~Sql_condition() - {} + ~Sql_condition() = default; /** Copy optional condition items attributes. @@ -869,8 +867,8 @@ public: class ErrConv: public ErrBuff { public: - ErrConv() {} - virtual ~ErrConv() {} + ErrConv() = default; + virtual ~ErrConv() = default; virtual LEX_CSTRING lex_cstring() const= 0; inline const char *ptr() const { diff --git a/sql/sql_explain.h b/sql/sql_explain.h index bfd52290374..31143ca9f77 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -143,7 +143,7 @@ public: void print_explain_json_for_children(Explain_query *query, Json_writer *writer, bool is_analyze); bool print_explain_json_cache(Json_writer *writer, bool is_analyze); - virtual ~Explain_node(){} + virtual ~Explain_node() = default; }; @@ -290,7 +290,7 @@ class Explain_aggr_node : public Sql_alloc { public: virtual enum_explain_aggr_node_type get_type()= 0; - virtual ~Explain_aggr_node() {} + virtual ~Explain_aggr_node() = default; Explain_aggr_node *child; }; diff --git a/sql/sql_expression_cache.h b/sql/sql_expression_cache.h index 9c618a5ae9b..88436837a2d 100644 --- a/sql/sql_expression_cache.h +++ b/sql/sql_expression_cache.h @@ -36,8 +36,8 @@ class Expression_cache :public Sql_alloc public: enum result {ERROR, HIT, MISS}; - Expression_cache(){}; - virtual ~Expression_cache() {}; + Expression_cache()= default; + virtual ~Expression_cache() = default; /** Shall check the presence of expression value in the cache for a given set of values of the expression parameters. Return the result of the diff --git a/sql/sql_join_cache.h b/sql/sql_join_cache.h index 2c3bf4022ca..393b3e309d3 100644 --- a/sql/sql_join_cache.h +++ b/sql/sql_join_cache.h @@ -678,7 +678,7 @@ public: THD *thd(); - virtual ~JOIN_CACHE() {} + virtual ~JOIN_CACHE() = default; void reset_join(JOIN *j) { join= j; } void free() { @@ -1075,7 +1075,7 @@ public: cache= join_tab->cache; } - virtual ~JOIN_TAB_SCAN() {} + virtual ~JOIN_TAB_SCAN() = default; /* Shall calculate the increment of the auxiliary buffer for a record diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 07380831b18..6ca2159e80f 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1754,8 +1754,8 @@ public: These constructor and destructor serve for creation/destruction of Query_tables_list instances which are used as backup storage. */ - Query_tables_list() {} - ~Query_tables_list() {} + Query_tables_list() = default; + ~Query_tables_list() = default; /* Initializes (or resets) Query_tables_list object for "real" use. */ void reset_query_tables_list(bool init); @@ -2420,13 +2420,9 @@ class Lex_input_stream const char *str, const char *end, int sep); my_charset_conv_wc_mb get_escape_func(THD *thd, my_wc_t sep) const; public: - Lex_input_stream() - { - } + Lex_input_stream() = default; - ~Lex_input_stream() - { - } + ~Lex_input_stream() = default; /** Object initializer. Must be called before usage. @@ -3009,7 +3005,7 @@ public: protected: bool save_explain_data_intern(MEM_ROOT *mem_root, Explain_update *eu, bool is_analyze); public: - virtual ~Update_plan() {} + virtual ~Update_plan() = default; Update_plan(MEM_ROOT *mem_root_arg) : impossible_where(false), no_partitions(false), @@ -3063,7 +3059,7 @@ enum password_exp_type struct Account_options: public USER_RESOURCES { - Account_options() { } + Account_options() = default; void reset() { @@ -4836,14 +4832,13 @@ class Set_signal_information { public: /** Empty default constructor, use clear() */ - Set_signal_information() {} + Set_signal_information() = default; /** Copy constructor. */ Set_signal_information(const Set_signal_information& set); /** Destructor. */ - ~Set_signal_information() - {} + ~Set_signal_information() = default; /** Clear all items. */ void clear(); @@ -4966,8 +4961,7 @@ public: return m_lip.init(thd, buff, length); } - ~Parser_state() - {} + ~Parser_state() = default; Lex_input_stream m_lip; Yacc_state m_yacc; diff --git a/sql/sql_lifo_buffer.h b/sql/sql_lifo_buffer.h index 0347030e4c6..2d648271898 100644 --- a/sql/sql_lifo_buffer.h +++ b/sql/sql_lifo_buffer.h @@ -138,7 +138,7 @@ public: virtual void remove_unused_space(uchar **unused_start, uchar **unused_end)=0; virtual uchar *used_area() = 0; - virtual ~Lifo_buffer() {}; + virtual ~Lifo_buffer() = default; }; diff --git a/sql/sql_locale.cc b/sql/sql_locale.cc index fb7fa26f245..dd19807dd6d 100644 --- a/sql/sql_locale.cc +++ b/sql/sql_locale.cc @@ -1919,7 +1919,7 @@ MY_LOCALE my_locale_th_TH ); /***** LOCALE END th_TH *****/ -/***** LOCALE BEGIN tr_TR: Turkish - Turkey *****/ +/***** LOCALE BEGIN tr_TR: Turkish - Türkiye *****/ static const char *my_locale_month_names_tr_TR[13] = {"Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık", NullS }; static const char *my_locale_ab_month_names_tr_TR[13] = @@ -1940,7 +1940,7 @@ MY_LOCALE my_locale_tr_TR ( 52, "tr_TR", - "Turkish - Turkey", + "Turkish - Türkiye", FALSE, &my_locale_typelib_month_names_tr_TR, &my_locale_typelib_ab_month_names_tr_TR, diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index e4a014418ed..c4f7ef6a2cf 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -120,7 +120,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, */ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables); -static void sql_kill(THD *thd, longlong id, killed_state state, killed_type type); +static void sql_kill(THD *thd, my_thread_id id, killed_state state, killed_type type); static void sql_kill_user(THD *thd, LEX_USER *user, killed_state state); static bool lock_tables_precheck(THD *thd, TABLE_LIST *tables); static bool execute_show_status(THD *, TABLE_LIST *); @@ -5531,7 +5531,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) MYF(0)); goto error; } - sql_kill(thd, it->val_int(), lex->kill_signal, lex->kill_type); + sql_kill(thd, (my_thread_id) it->val_int(), lex->kill_signal, lex->kill_type); } else sql_kill_user(thd, get_current_user(thd, lex->users_list.head()), @@ -9189,12 +9189,12 @@ THD *find_thread_by_id(longlong id, bool query_id) */ uint -kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type type) +kill_one_thread(THD *thd, my_thread_id id, killed_state kill_signal, killed_type type) { THD *tmp; uint error= (type == KILL_TYPE_QUERY ? ER_NO_SUCH_QUERY : ER_NO_SUCH_THREAD); DBUG_ENTER("kill_one_thread"); - DBUG_PRINT("enter", ("id: %lld signal: %d", id, kill_signal)); + DBUG_PRINT("enter", ("id: %lld signal: %d", (long long) id, kill_signal)); tmp= find_thread_by_id(id, type == KILL_TYPE_QUERY); if (!tmp) DBUG_RETURN(error); @@ -9367,7 +9367,7 @@ static uint kill_threads_for_user(THD *thd, LEX_USER *user, */ static -void sql_kill(THD *thd, longlong id, killed_state state, killed_type type) +void sql_kill(THD *thd, my_thread_id id, killed_state state, killed_type type) { uint error; #ifdef WITH_WSREP diff --git a/sql/sql_partition_admin.h b/sql/sql_partition_admin.h index 4be9e56e359..b50c3555bcb 100644 --- a/sql/sql_partition_admin.h +++ b/sql/sql_partition_admin.h @@ -127,8 +127,7 @@ public: : Sql_cmd_common_alter_table() {} - ~Sql_cmd_alter_table_exchange_partition() - {} + ~Sql_cmd_alter_table_exchange_partition() = default; bool execute(THD *thd); @@ -150,8 +149,7 @@ public: : Sql_cmd_analyze_table() {} - ~Sql_cmd_alter_table_analyze_partition() - {} + ~Sql_cmd_alter_table_analyze_partition() = default; bool execute(THD *thd); @@ -176,8 +174,7 @@ public: : Sql_cmd_check_table() {} - ~Sql_cmd_alter_table_check_partition() - {} + ~Sql_cmd_alter_table_check_partition() = default; bool execute(THD *thd); @@ -202,8 +199,7 @@ public: : Sql_cmd_optimize_table() {} - ~Sql_cmd_alter_table_optimize_partition() - {} + ~Sql_cmd_alter_table_optimize_partition() = default; bool execute(THD *thd); @@ -228,8 +224,7 @@ public: : Sql_cmd_repair_table() {} - ~Sql_cmd_alter_table_repair_partition() - {} + ~Sql_cmd_alter_table_repair_partition() = default; bool execute(THD *thd); @@ -250,11 +245,9 @@ public: /** Constructor, used to represent a ALTER TABLE TRUNCATE PARTITION statement. */ - Sql_cmd_alter_table_truncate_partition() - {} + Sql_cmd_alter_table_truncate_partition() = default; - virtual ~Sql_cmd_alter_table_truncate_partition() - {} + virtual ~Sql_cmd_alter_table_truncate_partition() = default; bool execute(THD *thd); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index ab6734dffb5..ace6ad8478d 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -4031,9 +4031,7 @@ Reprepare_observer::report_error(THD *thd) * Server_runnable *******************************************************************/ -Server_runnable::~Server_runnable() -{ -} +Server_runnable::~Server_runnable() = default; /////////////////////////////////////////////////////////////////////////// diff --git a/sql/sql_prepare.h b/sql/sql_prepare.h index 1e81b9f80e6..1ea773a7ca8 100644 --- a/sql/sql_prepare.h +++ b/sql/sql_prepare.h @@ -125,7 +125,7 @@ public: MEM_ROOT *mem_root_arg); /** We don't call member destructors, they all are POD types. */ - ~Ed_result_set() {} + ~Ed_result_set() = default; size_t get_field_count() const { return m_column_count; } diff --git a/sql/sql_schema.h b/sql/sql_schema.h index 886a115cbc5..37f8ceb7250 100644 --- a/sql/sql_schema.h +++ b/sql/sql_schema.h @@ -26,7 +26,7 @@ public: Schema(const LEX_CSTRING &name) :m_name(name) { } - virtual ~Schema() { } + virtual ~Schema() = default; const LEX_CSTRING &name() const { return m_name; } virtual const Type_handler *map_data_type(THD *thd, const Type_handler *src) const diff --git a/sql/sql_select.h b/sql/sql_select.h index 6efdcafd3f9..4ff95b31f3f 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -732,7 +732,7 @@ public: virtual void mark_used() = 0; - virtual ~Semi_join_strategy_picker() {} + virtual ~Semi_join_strategy_picker() = default; }; @@ -1873,7 +1873,7 @@ public: null_ptr(arg.null_ptr), err(arg.err) {} - virtual ~store_key() {} /** Not actually needed */ + virtual ~store_key() = default; /** Not actually needed */ virtual enum Type type() const=0; virtual const char *name() const=0; virtual bool store_key_is_const() { return false; } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index cbb0d739bc4..5953064c42a 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -10163,11 +10163,9 @@ exit: class IS_internal_schema_access : public ACL_internal_schema_access { public: - IS_internal_schema_access() - {} + IS_internal_schema_access() = default; - ~IS_internal_schema_access() - {} + ~IS_internal_schema_access() = default; ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const; diff --git a/sql/sql_signal.h b/sql/sql_signal.h index 433cee21d58..abc9905aefb 100644 --- a/sql/sql_signal.h +++ b/sql/sql_signal.h @@ -36,8 +36,7 @@ protected: m_set_signal_information(set) {} - virtual ~Sql_cmd_common_signal() - {} + virtual ~Sql_cmd_common_signal() = default; /** Evaluate each signal condition items for this statement. @@ -84,8 +83,7 @@ public: : Sql_cmd_common_signal(cond, set) {} - virtual ~Sql_cmd_signal() - {} + virtual ~Sql_cmd_signal() = default; virtual enum_sql_command sql_command_code() const { @@ -111,8 +109,7 @@ public: : Sql_cmd_common_signal(cond, set) {} - virtual ~Sql_cmd_resignal() - {} + virtual ~Sql_cmd_resignal() = default; virtual enum_sql_command sql_command_code() const { diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 3c5e3859939..be011adb60c 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -512,7 +512,7 @@ public: } - virtual ~Stat_table() {} + virtual ~Stat_table() = default; /** @brief @@ -1624,7 +1624,7 @@ protected: public: - Count_distinct_field() {} + Count_distinct_field() = default; /** @param diff --git a/sql/sql_string.h b/sql/sql_string.h index 7bf0e2d2518..9729d9e85fd 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -804,7 +804,7 @@ public: class String: public Charset, public Binary_string { public: - String() { } + String() = default; String(size_t length_arg) :Binary_string(length_arg) { } /* @@ -818,9 +818,7 @@ public: String(char *str, size_t len, CHARSET_INFO *cs) :Charset(cs), Binary_string(str, len) { } - String(const String &str) - :Charset(str), Binary_string(str) - { } + String(const String &str) = default; void set(String &str,size_t offset,size_t arg_length) { diff --git a/sql/sql_truncate.h b/sql/sql_truncate.h index 7d2ff4b6050..5704da1dd7b 100644 --- a/sql/sql_truncate.h +++ b/sql/sql_truncate.h @@ -31,11 +31,9 @@ public: /** Constructor, used to represent a TRUNCATE statement. */ - Sql_cmd_truncate_table() - {} + Sql_cmd_truncate_table() = default; - virtual ~Sql_cmd_truncate_table() - {} + virtual ~Sql_cmd_truncate_table() = default; /** Execute a TRUNCATE statement at runtime. diff --git a/sql/sql_type.h b/sql/sql_type.h index 13d0354bb1f..6e1346bdfe7 100644 --- a/sql/sql_type.h +++ b/sql/sql_type.h @@ -393,7 +393,7 @@ class Dec_ptr { protected: my_decimal *m_ptr; - Dec_ptr() { } + Dec_ptr() = default; public: Dec_ptr(my_decimal *ptr) :m_ptr(ptr) { } bool is_null() const { return m_ptr == NULL; } @@ -541,7 +541,7 @@ protected: { m_sec= m_usec= m_neg= m_truncated= 0; } - Sec6() { } + Sec6() = default; bool add_nanoseconds(uint nanoseconds) { DBUG_ASSERT(nanoseconds <= 1000000000); @@ -701,7 +701,7 @@ protected: Sec6::make_from_int(nr); m_nsec= 0; } - Sec9() { } + Sec9() = default; public: Sec9(const my_decimal *d) { @@ -2854,7 +2854,7 @@ class Timestamp_or_zero_datetime_native: public NativeBuffer<STRING_BUFFER_TIMESTAMP_BINARY_SIZE> { public: - Timestamp_or_zero_datetime_native() { } + Timestamp_or_zero_datetime_native() = default; Timestamp_or_zero_datetime_native(const Timestamp_or_zero_datetime &ts, uint decimals) { @@ -3331,13 +3331,9 @@ public: class Type_all_attributes: public Type_std_attributes { public: - Type_all_attributes() - :Type_std_attributes() - { } - Type_all_attributes(const Type_all_attributes &other) - :Type_std_attributes(other) - { } - virtual ~Type_all_attributes() {} + Type_all_attributes() = default; + Type_all_attributes(const Type_all_attributes &) = default; + virtual ~Type_all_attributes() = default; virtual void set_type_maybe_null(bool maybe_null_arg)= 0; // Returns total number of decimal digits virtual decimal_digits_t decimal_precision() const= 0; @@ -3349,7 +3345,7 @@ public: class Type_cmp_attributes { public: - virtual ~Type_cmp_attributes() { } + virtual ~Type_cmp_attributes() = default; virtual CHARSET_INFO *compare_collation() const= 0; }; @@ -3560,9 +3556,9 @@ enum vers_kind_t class Vers_type_handler { protected: - Vers_type_handler() {} + Vers_type_handler() = default; public: - virtual ~Vers_type_handler() {} + virtual ~Vers_type_handler() = default; virtual vers_kind_t kind() const { DBUG_ASSERT(0); @@ -3859,7 +3855,7 @@ public: return false; } Type_handler() : m_name(0,0) {} - virtual ~Type_handler() {} + virtual ~Type_handler() = default; /** Determines MariaDB traditional scalar data types that always present in the server. @@ -4376,7 +4372,7 @@ public: class Type_handler_row: public Type_handler { public: - virtual ~Type_handler_row() {} + virtual ~Type_handler_row() = default; const Name &default_value() const override; bool validate_implicit_default_value(THD *, const Column_definition &) const override @@ -4780,7 +4776,7 @@ public: bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*, MYSQL_TIME *, date_mode_t fuzzydate) const override; - virtual ~Type_handler_numeric() { } + virtual ~Type_handler_numeric() = default; bool can_change_cond_ref_to_const(Item_bool_func2 *target, Item *target_expr, Item *target_value, Item_bool_func2 *source, @@ -4805,7 +4801,7 @@ public: { return DYN_COL_DOUBLE; } - virtual ~Type_handler_real_result() {} + virtual ~Type_handler_real_result() = default; const Type_handler *type_handler_for_comparison() const override; Field *make_table_field(MEM_ROOT *root, const LEX_CSTRING *name, @@ -4926,7 +4922,7 @@ public: { return DYN_COL_DECIMAL; } - virtual ~Type_handler_decimal_result() {}; + virtual ~Type_handler_decimal_result() = default; const Type_handler *type_handler_for_comparison() const override; int stored_field_cmp_to_item(THD *, Field *field, Item *item) const override { @@ -5186,7 +5182,7 @@ public: } bool is_order_clause_position_type() const override { return true; } bool is_limit_clause_valid_type() const override { return true; } - virtual ~Type_handler_int_result() {} + virtual ~Type_handler_int_result() = default; const Type_handler *type_handler_for_comparison() const override; int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const override; bool subquery_type_allows_materialization(const Item *inner, @@ -5306,7 +5302,7 @@ protected: public: Item_result result_type() const override { return STRING_RESULT; } Item_result cmp_type() const override { return TIME_RESULT; } - virtual ~Type_handler_temporal_result() {} + virtual ~Type_handler_temporal_result() = default; void Column_definition_attributes_frm_pack(const Column_definition_attributes *at, uchar *buff) const override; @@ -5404,7 +5400,7 @@ public: return DYN_COL_STRING; } CHARSET_INFO *charset_for_protocol(const Item *item) const override; - virtual ~Type_handler_string_result() {} + virtual ~Type_handler_string_result() = default; const Type_handler *type_handler_for_comparison() const override; int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const override; @@ -5594,7 +5590,7 @@ public: class Type_handler_tiny: public Type_handler_general_purpose_int { public: - virtual ~Type_handler_tiny() {} + virtual ~Type_handler_tiny() = default; enum_field_types field_type() const override { return MYSQL_TYPE_TINY; } const Type_handler *type_handler_unsigned() const override; const Type_handler *type_handler_signed() const override; @@ -5645,7 +5641,7 @@ public: class Type_handler_short: public Type_handler_general_purpose_int { public: - virtual ~Type_handler_short() {} + virtual ~Type_handler_short() = default; enum_field_types field_type() const override { return MYSQL_TYPE_SHORT; } const Type_handler *type_handler_unsigned() const override; const Type_handler *type_handler_signed() const override; @@ -5696,7 +5692,7 @@ public: class Type_handler_long: public Type_handler_general_purpose_int { public: - virtual ~Type_handler_long() {} + virtual ~Type_handler_long() = default; enum_field_types field_type() const override { return MYSQL_TYPE_LONG; } const Type_handler *type_handler_unsigned() const override; const Type_handler *type_handler_signed() const override; @@ -5758,7 +5754,7 @@ public: class Type_handler_longlong: public Type_handler_general_purpose_int { public: - virtual ~Type_handler_longlong() {} + virtual ~Type_handler_longlong() = default; enum_field_types field_type() const override{ return MYSQL_TYPE_LONGLONG; } const Type_handler *type_handler_unsigned() const override; const Type_handler *type_handler_signed() const override; @@ -5813,7 +5809,7 @@ public: class Type_handler_vers_trx_id: public Type_handler_ulonglong { public: - virtual ~Type_handler_vers_trx_id() {} + virtual ~Type_handler_vers_trx_id() = default; Field *make_table_field(MEM_ROOT *root, const LEX_CSTRING *name, const Record_addr &addr, @@ -5825,7 +5821,7 @@ public: class Type_handler_int24: public Type_handler_general_purpose_int { public: - virtual ~Type_handler_int24() {} + virtual ~Type_handler_int24() = default; enum_field_types field_type() const override { return MYSQL_TYPE_INT24; } const Type_handler *type_handler_unsigned() const override; const Type_handler *type_handler_signed() const override; @@ -5870,7 +5866,7 @@ public: class Type_handler_year: public Type_handler_int_result { public: - virtual ~Type_handler_year() {} + virtual ~Type_handler_year() = default; enum_field_types field_type() const override { return MYSQL_TYPE_YEAR; } uint flags() const override { return UNSIGNED_FLAG; } protocol_send_type_t protocol_send_type() const override @@ -5924,7 +5920,7 @@ public: class Type_handler_bit: public Type_handler_int_result { public: - virtual ~Type_handler_bit() {} + virtual ~Type_handler_bit() = default; enum_field_types field_type() const override { return MYSQL_TYPE_BIT; } uint flags() const override { return UNSIGNED_FLAG; } protocol_send_type_t protocol_send_type() const override @@ -5989,7 +5985,7 @@ public: class Type_handler_float: public Type_handler_real_result { public: - virtual ~Type_handler_float() {} + virtual ~Type_handler_float() = default; enum_field_types field_type() const override { return MYSQL_TYPE_FLOAT; } protocol_send_type_t protocol_send_type() const override { @@ -6043,7 +6039,7 @@ public: class Type_handler_double: public Type_handler_real_result { public: - virtual ~Type_handler_double() {} + virtual ~Type_handler_double() = default; enum_field_types field_type() const override { return MYSQL_TYPE_DOUBLE; } protocol_send_type_t protocol_send_type() const override { @@ -6098,7 +6094,7 @@ public: class Type_handler_time_common: public Type_handler_temporal_result { public: - virtual ~Type_handler_time_common() { } + virtual ~Type_handler_time_common() = default; const Name &default_value() const override; enum_field_types field_type() const override { return MYSQL_TYPE_TIME; } enum_dynamic_column_type dyncol_type(const Type_all_attributes *attr) @@ -6220,7 +6216,7 @@ class Type_handler_time: public Type_handler_time_common static uint m_hires_bytes[MAX_DATETIME_PRECISION+1]; public: static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; } - virtual ~Type_handler_time() {} + virtual ~Type_handler_time() = default; const Name version() const override { return version_mariadb53(); } uint32 max_display_length_for_field(const Conv_source &src) const override { return MIN_TIME_WIDTH; } @@ -6250,7 +6246,7 @@ public: class Type_handler_time2: public Type_handler_time_common { public: - virtual ~Type_handler_time2() {} + virtual ~Type_handler_time2() = default; const Name version() const override { return version_mysql56(); } enum_field_types real_field_type() const override { return MYSQL_TYPE_TIME2; } uint32 max_display_length_for_field(const Conv_source &src) const override; @@ -6280,7 +6276,7 @@ public: class Type_handler_temporal_with_date: public Type_handler_temporal_result { public: - virtual ~Type_handler_temporal_with_date() {} + virtual ~Type_handler_temporal_with_date() = default; Item_literal *create_literal_item(THD *thd, const char *str, size_t length, CHARSET_INFO *cs, bool send_error) const override; @@ -6310,7 +6306,7 @@ public: class Type_handler_date_common: public Type_handler_temporal_with_date { public: - virtual ~Type_handler_date_common() {} + virtual ~Type_handler_date_common() = default; const Name &default_value() const override; const Type_handler *type_handler_for_comparison() const override; enum_field_types field_type() const override { return MYSQL_TYPE_DATE; } @@ -6381,7 +6377,7 @@ public: class Type_handler_date: public Type_handler_date_common { public: - virtual ~Type_handler_date() {} + virtual ~Type_handler_date() = default; uint32 calc_pack_length(uint32 length) const override { return 4; } Field *make_conversion_table_field(MEM_ROOT *root, TABLE *table, uint metadata, @@ -6408,7 +6404,7 @@ public: class Type_handler_newdate: public Type_handler_date_common { public: - virtual ~Type_handler_newdate() {} + virtual ~Type_handler_newdate() = default; enum_field_types real_field_type() const override { return MYSQL_TYPE_NEWDATE; @@ -6439,7 +6435,7 @@ public: class Type_handler_datetime_common: public Type_handler_temporal_with_date { public: - virtual ~Type_handler_datetime_common() {} + virtual ~Type_handler_datetime_common() = default; const Name &default_value() const override; const Type_handler *type_handler_for_comparison() const override; enum_field_types field_type() const override @@ -6523,7 +6519,7 @@ class Type_handler_datetime: public Type_handler_datetime_common static uint m_hires_bytes[MAX_DATETIME_PRECISION + 1]; public: static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; } - virtual ~Type_handler_datetime() {} + virtual ~Type_handler_datetime() = default; const Name version() const override { return version_mariadb53(); } uint32 max_display_length_for_field(const Conv_source &src) const override { return MAX_DATETIME_WIDTH; } @@ -6553,7 +6549,7 @@ public: class Type_handler_datetime2: public Type_handler_datetime_common { public: - virtual ~Type_handler_datetime2() {} + virtual ~Type_handler_datetime2() = default; const Name version() const override { return version_mysql56(); } enum_field_types real_field_type() const override { @@ -6588,7 +6584,7 @@ class Type_handler_timestamp_common: public Type_handler_temporal_with_date protected: bool TIME_to_native(THD *, const MYSQL_TIME *from, Native *to, uint dec) const; public: - virtual ~Type_handler_timestamp_common() {} + virtual ~Type_handler_timestamp_common() = default; const Name &default_value() const override; const Type_handler *type_handler_for_comparison() const override; const Type_handler *type_handler_for_native_format() const override; @@ -6690,7 +6686,7 @@ class Type_handler_timestamp: public Type_handler_timestamp_common static uint m_sec_part_bytes[MAX_DATETIME_PRECISION + 1]; public: static uint sec_part_bytes(uint dec) { return m_sec_part_bytes[dec]; } - virtual ~Type_handler_timestamp() {} + virtual ~Type_handler_timestamp() = default; const Name version() const override { return version_mariadb53(); } uint32 max_display_length_for_field(const Conv_source &src) const override { return MAX_DATETIME_WIDTH; } @@ -6720,7 +6716,7 @@ public: class Type_handler_timestamp2: public Type_handler_timestamp_common { public: - virtual ~Type_handler_timestamp2() {} + virtual ~Type_handler_timestamp2() = default; const Name version() const override { return version_mysql56(); } enum_field_types real_field_type() const override { @@ -6755,7 +6751,7 @@ public: class Type_handler_olddecimal: public Type_handler_decimal_result { public: - virtual ~Type_handler_olddecimal() {} + virtual ~Type_handler_olddecimal() = default; enum_field_types field_type() const override { return MYSQL_TYPE_DECIMAL; } uint32 max_display_length_for_field(const Conv_source &src) const override; uint32 calc_pack_length(uint32 length) const override { return length; } @@ -6789,7 +6785,7 @@ public: class Type_handler_newdecimal: public Type_handler_decimal_result { public: - virtual ~Type_handler_newdecimal() {} + virtual ~Type_handler_newdecimal() = default; enum_field_types field_type() const override { return MYSQL_TYPE_NEWDECIMAL; } uint32 max_display_length_for_field(const Conv_source &src) const override; uint32 calc_pack_length(uint32 length) const override; @@ -6833,7 +6829,7 @@ public: class Type_handler_null: public Type_handler_general_purpose_string { public: - virtual ~Type_handler_null() {} + virtual ~Type_handler_null() = default; enum_field_types field_type() const override { return MYSQL_TYPE_NULL; } enum_dynamic_column_type dyncol_type(const Type_all_attributes *attr) const override @@ -6905,7 +6901,7 @@ public: class Type_handler_string: public Type_handler_longstr { public: - virtual ~Type_handler_string() {} + virtual ~Type_handler_string() = default; enum_field_types field_type() const override { return MYSQL_TYPE_STRING; } ulong KEY_pack_flags(uint column_nr) const override { @@ -6960,7 +6956,7 @@ public: class Type_handler_var_string: public Type_handler_string { public: - virtual ~Type_handler_var_string() {} + virtual ~Type_handler_var_string() = default; enum_field_types field_type() const override { return MYSQL_TYPE_VAR_STRING; } enum_field_types real_field_type() const override { return MYSQL_TYPE_STRING; } enum_field_types traditional_merge_field_type() const override @@ -6990,7 +6986,7 @@ public: class Type_handler_varchar: public Type_handler_longstr { public: - virtual ~Type_handler_varchar() {} + virtual ~Type_handler_varchar() = default; enum_field_types field_type() const override { return MYSQL_TYPE_VARCHAR; } ulong KEY_pack_flags(uint column_nr) const override { @@ -7062,7 +7058,7 @@ public: class Type_handler_hex_hybrid: public Type_handler_varchar { public: - virtual ~Type_handler_hex_hybrid() {} + virtual ~Type_handler_hex_hybrid() = default; const Type_handler *cast_to_int_type_handler() const override; bool Item_func_round_fix_length_and_dec(Item_func_round *) const override; bool Item_func_int_val_fix_length_and_dec(Item_func_int_val*) const override; @@ -7105,7 +7101,7 @@ public: class Type_handler_blob_common: public Type_handler_longstr { public: - virtual ~Type_handler_blob_common() { } + virtual ~Type_handler_blob_common() = default; virtual uint length_bytes() const= 0; ulong KEY_pack_flags(uint column_nr) const override { @@ -7182,7 +7178,7 @@ public: class Type_handler_tiny_blob: public Type_handler_blob_common { public: - virtual ~Type_handler_tiny_blob() {} + virtual ~Type_handler_tiny_blob() = default; uint length_bytes() const override { return 1; } enum_field_types field_type() const override { return MYSQL_TYPE_TINY_BLOB; } uint32 max_display_length_for_field(const Conv_source &src) const override; @@ -7199,7 +7195,7 @@ public: class Type_handler_medium_blob: public Type_handler_blob_common { public: - virtual ~Type_handler_medium_blob() {} + virtual ~Type_handler_medium_blob() = default; uint length_bytes() const override { return 3; } enum_field_types field_type() const override { return MYSQL_TYPE_MEDIUM_BLOB; } @@ -7217,7 +7213,7 @@ public: class Type_handler_long_blob: public Type_handler_blob_common { public: - virtual ~Type_handler_long_blob() {} + virtual ~Type_handler_long_blob() = default; uint length_bytes() const override { return 4; } enum_field_types field_type() const override { return MYSQL_TYPE_LONG_BLOB; } uint32 max_display_length_for_field(const Conv_source &src) const override; @@ -7236,7 +7232,7 @@ public: class Type_handler_blob: public Type_handler_blob_common { public: - virtual ~Type_handler_blob() {} + virtual ~Type_handler_blob() = default; uint length_bytes() const override { return 2; } enum_field_types field_type() const override { return MYSQL_TYPE_BLOB; } uint32 max_display_length_for_field(const Conv_source &src) const override; @@ -7280,7 +7276,7 @@ public: class Type_handler_typelib: public Type_handler_general_purpose_string { public: - virtual ~Type_handler_typelib() { } + virtual ~Type_handler_typelib() = default; enum_field_types field_type() const override { return MYSQL_TYPE_STRING; } const Type_handler *type_handler_for_item_field() const override; const Type_handler *cast_to_int_type_handler() const override; @@ -7318,7 +7314,7 @@ public: class Type_handler_enum: public Type_handler_typelib { public: - virtual ~Type_handler_enum() {} + virtual ~Type_handler_enum() = default; enum_field_types real_field_type() const override { return MYSQL_TYPE_ENUM; } enum_field_types traditional_merge_field_type() const override { @@ -7359,7 +7355,7 @@ public: class Type_handler_set: public Type_handler_typelib { public: - virtual ~Type_handler_set() {} + virtual ~Type_handler_set() = default; enum_field_types real_field_type() const override { return MYSQL_TYPE_SET; } enum_field_types traditional_merge_field_type() const override { @@ -7405,7 +7401,7 @@ public: class Function_collection { public: - virtual ~Function_collection() {} + virtual ~Function_collection() = default; virtual bool init()= 0; virtual void cleanup()= 0; virtual Create_func *find_native_function_builder(THD *thd, @@ -7417,11 +7413,8 @@ public: class Type_collection { public: - virtual ~Type_collection() {} - virtual bool init(Type_handler_data *data) - { - return false; - } + virtual ~Type_collection() = default; + virtual bool init(Type_handler_data *) { return false; } virtual const Type_handler *handler_by_name(const LEX_CSTRING &name) const= 0; virtual const Type_handler *aggregate_for_result(const Type_handler *h1, const Type_handler *h2) @@ -7615,7 +7608,7 @@ public: const Type_handler *m_handler1; const Type_handler *m_handler2; const Type_handler *m_result; - Pair() { } + Pair() = default; Pair(const Type_handler *handler1, const Type_handler *handler2, const Type_handler *result) diff --git a/sql/sql_type_fixedbin_storage.h b/sql/sql_type_fixedbin_storage.h index e3a46698463..3a4e74a8cdb 100644 --- a/sql/sql_type_fixedbin_storage.h +++ b/sql/sql_type_fixedbin_storage.h @@ -64,9 +64,7 @@ protected: // The buffer that stores the in-memory binary representation char m_buffer[NATIVE_LEN]; - // Non-initializing constructor - FixedBinTypeStorage() - { } + FixedBinTypeStorage() = default; FixedBinTypeStorage & set_zero() { diff --git a/sql/sql_window.cc b/sql/sql_window.cc index 963535e2417..3e94dfbe6b9 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -944,7 +944,7 @@ protected: class Table_read_cursor : public Rowid_seq_cursor { public: - virtual ~Table_read_cursor() {} + virtual ~Table_read_cursor() = default; void init(READ_RECORD *info) { @@ -1128,7 +1128,7 @@ public: virtual bool is_outside_computation_bounds() const { return false; }; - virtual ~Frame_cursor() {} + virtual ~Frame_cursor() = default; /* Regular frame cursors add or remove values from the sum functions they diff --git a/sql/sql_window.h b/sql/sql_window.h index 66ea8c7dd4d..1c02740e769 100644 --- a/sql/sql_window.h +++ b/sql/sql_window.h @@ -106,7 +106,7 @@ class Window_spec : public Sql_alloc { bool window_names_are_checked; public: - virtual ~Window_spec() {} + virtual ~Window_spec() = default; LEX_CSTRING *window_ref; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 691fe7d9189..935617e6fc5 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -13638,6 +13638,8 @@ delete_part2: { Lex->last_table()->vers_conditions= Lex->vers_conditions; Lex->pop_select(); //main select + if (Lex->check_main_unit_semantics()) + MYSQL_YYABORT; } ; @@ -13674,6 +13676,8 @@ single_multi: if ($3) Select->order_list= *($3); Lex->pop_select(); //main select + if (Lex->check_main_unit_semantics()) + MYSQL_YYABORT; } | table_wild_list { diff --git a/sql/structs.h b/sql/structs.h index b49b5ffcdfd..42894fa4cc7 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -871,7 +871,7 @@ public: class Load_data_outvar { public: - virtual ~Load_data_outvar() {} + virtual ~Load_data_outvar() = default; virtual bool load_data_set_null(THD *thd, const Load_data_param *param)= 0; virtual bool load_data_set_value(THD *thd, const char *pos, uint length, const Load_data_param *param)= 0; @@ -885,7 +885,7 @@ public: class Timeval: public timeval { protected: - Timeval() { } + Timeval() = default; public: Timeval(my_time_t sec, ulong usec) { diff --git a/sql/sys_vars_shared.h b/sql/sys_vars_shared.h index bc48d1f7fff..508a0a70c8f 100644 --- a/sql/sys_vars_shared.h +++ b/sql/sys_vars_shared.h @@ -44,7 +44,7 @@ public: virtual void rdlock()= 0; virtual void wrlock()= 0; virtual void unlock()= 0; - virtual ~PolyLock() {} + virtual ~PolyLock() = default; }; class PolyLock_mutex: public PolyLock diff --git a/sql/table.h b/sql/table.h index 7e5323ed92a..7f3fcc06cea 100644 --- a/sql/table.h +++ b/sql/table.h @@ -136,14 +136,13 @@ public: void restore_env(THD *thd, Object_creation_ctx *backup_ctx); protected: - Object_creation_ctx() {} + Object_creation_ctx() = default; virtual Object_creation_ctx *create_backup_ctx(THD *thd) const = 0; virtual void change_env(THD *thd) const = 0; public: - virtual ~Object_creation_ctx() - { } + virtual ~Object_creation_ctx() = default; }; /*************************************************************************/ @@ -550,7 +549,7 @@ protected: public: Table_check_intact(bool keys= false) : has_keys(keys) {} - virtual ~Table_check_intact() {} + virtual ~Table_check_intact() = default; /** Checks whether a table is intact. */ bool check(TABLE *table, const TABLE_FIELD_DEF *table_def); @@ -722,7 +721,7 @@ public: struct TABLE_SHARE { - TABLE_SHARE() {} /* Remove gcc warning */ + TABLE_SHARE() = default; /* Remove gcc warning */ /** Category of this table. */ TABLE_CATEGORY table_category; @@ -1264,7 +1263,7 @@ struct vers_select_conds_t; struct TABLE { - TABLE() {} /* Remove gcc warning */ + TABLE() = default; /* Remove gcc warning */ TABLE_SHARE *s; handler *file; @@ -2182,7 +2181,7 @@ class Index_hint; struct TABLE_CHAIN { - TABLE_CHAIN() {} + TABLE_CHAIN() = default; TABLE_LIST **start_pos; TABLE_LIST ** end_pos; @@ -2193,7 +2192,7 @@ struct TABLE_CHAIN struct TABLE_LIST { - TABLE_LIST() {} /* Remove gcc warning */ + TABLE_LIST() = default; /* Remove gcc warning */ enum prelocking_types { @@ -2958,8 +2957,8 @@ class Item; class Field_iterator: public Sql_alloc { public: - Field_iterator() {} /* Remove gcc warning */ - virtual ~Field_iterator() {} + Field_iterator() = default; /* Remove gcc warning */ + virtual ~Field_iterator() = default; virtual void set(TABLE_LIST *)= 0; virtual void next()= 0; virtual bool end_of_fields()= 0; /* Return 1 at end of list */ @@ -3020,7 +3019,7 @@ class Field_iterator_natural_join: public Field_iterator Natural_join_column *cur_column_ref; public: Field_iterator_natural_join() :cur_column_ref(NULL) {} - ~Field_iterator_natural_join() {} + ~Field_iterator_natural_join() = default; void set(TABLE_LIST *table); void next(); bool end_of_fields() { return !cur_column_ref; } diff --git a/sql/threadpool.h b/sql/threadpool.h index 7737d056b4a..d815d538cde 100644 --- a/sql/threadpool.h +++ b/sql/threadpool.h @@ -102,8 +102,7 @@ struct TP_connection priority(TP_PRIORITY_HIGH) {} - virtual ~TP_connection() - {}; + virtual ~TP_connection() = default; /* Initialize io structures windows threadpool, epoll etc */ virtual int init() = 0; @@ -121,7 +120,7 @@ struct TP_connection struct TP_pool { - virtual ~TP_pool(){}; + virtual ~TP_pool() = default; virtual int init()= 0; virtual TP_connection *new_connection(CONNECT *)= 0; virtual void add(TP_connection *c)= 0; diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc index eb08441a4d5..7261eabfd82 100644 --- a/sql/threadpool_generic.cc +++ b/sql/threadpool_generic.cc @@ -1574,8 +1574,7 @@ static void *worker_main(void *param) } -TP_pool_generic::TP_pool_generic() -{} +TP_pool_generic::TP_pool_generic() = default; int TP_pool_generic::init() { diff --git a/sql/tztime.cc b/sql/tztime.cc index dc148d3bf4c..8286744e192 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1027,7 +1027,7 @@ static const String tz_SYSTEM_name("SYSTEM", 6, &my_charset_latin1); class Time_zone_system : public Time_zone { public: - Time_zone_system() {} /* Remove gcc warning */ + Time_zone_system() = default; /* Remove gcc warning */ virtual my_time_t TIME_to_gmt_sec(const MYSQL_TIME *t, uint *error_code) const; virtual void gmt_sec_to_TIME(MYSQL_TIME *tmp, my_time_t t) const; virtual const String * get_name() const; @@ -1123,7 +1123,7 @@ Time_zone_system::get_name() const class Time_zone_utc : public Time_zone { public: - Time_zone_utc() {} /* Remove gcc warning */ + Time_zone_utc() = default; /* Remove gcc warning */ virtual my_time_t TIME_to_gmt_sec(const MYSQL_TIME *t, uint *error_code) const; virtual void gmt_sec_to_TIME(MYSQL_TIME *tmp, my_time_t t) const; diff --git a/sql/tztime.h b/sql/tztime.h index 9e5d469925f..6d8af62ecd4 100644 --- a/sql/tztime.h +++ b/sql/tztime.h @@ -41,7 +41,7 @@ class THD; class Time_zone: public Sql_alloc { public: - Time_zone() {} /* Remove gcc warning */ + Time_zone() = default; /* Remove gcc warning */ /** Converts local time in broken down MYSQL_TIME representation to my_time_t (UTC seconds since Epoch) represenation. @@ -66,7 +66,7 @@ public: We need this only for surpressing warnings, objects of this type are allocated on MEM_ROOT and should not require destruction. */ - virtual ~Time_zone() {}; + virtual ~Time_zone() = default; protected: static inline void adjust_leap_second(MYSQL_TIME *t); diff --git a/sql/vers_string.h b/sql/vers_string.h index 67fd421500e..c5be9c359e3 100644 --- a/sql/vers_string.h +++ b/sql/vers_string.h @@ -53,7 +53,7 @@ template <class Compare> struct Lex_cstring_with_compare : public Lex_cstring { public: - Lex_cstring_with_compare() {} + Lex_cstring_with_compare() = default; Lex_cstring_with_compare(const char *_str, size_t _len) : Lex_cstring(_str, _len) { } diff --git a/sql/win_tzname_data.h b/sql/win_tzname_data.h index 792cdbc7a13..8a240118ac3 100644 --- a/sql/win_tzname_data.h +++ b/sql/win_tzname_data.h @@ -44,7 +44,7 @@ {L"UTC-02","Etc/GMT+2"}, {L"Azores Standard Time","Atlantic/Azores"}, {L"Cape Verde Standard Time","Atlantic/Cape_Verde"}, -{L"UTC","Etc/GMT"}, +{L"UTC","Etc/UTC"}, {L"GMT Standard Time","Europe/London"}, {L"Greenwich Standard Time","Atlantic/Reykjavik"}, {L"Sao Tome Standard Time","Africa/Sao_Tome"}, @@ -64,6 +64,7 @@ {L"South Africa Standard Time","Africa/Johannesburg"}, {L"FLE Standard Time","Europe/Kiev"}, {L"Israel Standard Time","Asia/Jerusalem"}, +{L"South Sudan Standard Time","Africa/Juba"}, {L"Kaliningrad Standard Time","Europe/Kaliningrad"}, {L"Sudan Standard Time","Africa/Khartoum"}, {L"Libya Standard Time","Africa/Tripoli"}, diff --git a/sql/wsrep_client_service.cc b/sql/wsrep_client_service.cc index 7ab5ba0c1e2..628a408b49b 100644 --- a/sql/wsrep_client_service.cc +++ b/sql/wsrep_client_service.cc @@ -1,4 +1,4 @@ -/* Copyright 2018-2022 Codership Oy <info@codership.com> +/* Copyright 2018-2023 Codership Oy <info@codership.com> 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 @@ -347,22 +347,36 @@ void Wsrep_client_service::debug_crash(const char* crash_point) int Wsrep_client_service::bf_rollback() { DBUG_ASSERT(m_thd == current_thd); - DBUG_ENTER("Wsrep_client_service::rollback"); + DBUG_ENTER("Wsrep_client_service::bf_rollback"); int ret= (trans_rollback_stmt(m_thd) || trans_rollback(m_thd)); - if (m_thd->locked_tables_mode && m_thd->lock) - { - if (m_thd->locked_tables_list.unlock_locked_tables(m_thd)) - ret= 1; - m_thd->variables.option_bits&= ~OPTION_TABLE_LOCK; - } - if (m_thd->global_read_lock.is_acquired()) + + WSREP_DEBUG("::bf_rollback() thread: %lu, client_state %s " + "client_mode %s trans_state %s killed %d", + thd_get_thread_id(m_thd), + wsrep_thd_client_state_str(m_thd), + wsrep_thd_client_mode_str(m_thd), + wsrep_thd_transaction_state_str(m_thd), + m_thd->killed); + + /* If client is quiting all below will be done in THD::cleanup() + TODO: why we need this any other case? */ + if (m_thd->wsrep_cs().state() != wsrep::client_state::s_quitting) { - m_thd->global_read_lock.unlock_global_read_lock(m_thd); + if (m_thd->locked_tables_mode && m_thd->lock) + { + if (m_thd->locked_tables_list.unlock_locked_tables(m_thd)) + ret= 1; + m_thd->variables.option_bits&= ~OPTION_TABLE_LOCK; + } + if (m_thd->global_read_lock.is_acquired()) + { + m_thd->global_read_lock.unlock_global_read_lock(m_thd); + } + m_thd->release_transactional_locks(); + mysql_ull_cleanup(m_thd); + m_thd->mdl_context.release_explicit_locks(); } - m_thd->release_transactional_locks(); - mysql_ull_cleanup(m_thd); - m_thd->mdl_context.release_explicit_locks(); DBUG_RETURN(ret); } diff --git a/sql/wsrep_condition_variable.h b/sql/wsrep_condition_variable.h index c97b47378f7..d9798bb9548 100644 --- a/sql/wsrep_condition_variable.h +++ b/sql/wsrep_condition_variable.h @@ -29,8 +29,7 @@ public: Wsrep_condition_variable(mysql_cond_t* cond) : m_cond(cond) { } - ~Wsrep_condition_variable() - { } + ~Wsrep_condition_variable() = default; void notify_one() { diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc index 93d4738212d..7d8296a75a1 100644 --- a/sql/wsrep_high_priority_service.cc +++ b/sql/wsrep_high_priority_service.cc @@ -292,6 +292,7 @@ int Wsrep_high_priority_service::append_fragment_and_commit( ret= ret || trans_commit(m_thd); ret= ret || (m_thd->wsrep_cs().after_applying(), 0); + m_thd->release_transactional_locks(); free_root(m_thd->mem_root, MYF(MY_KEEP_PREALLOC)); @@ -380,6 +381,15 @@ int Wsrep_high_priority_service::rollback(const wsrep::ws_handle& ws_handle, assert(ws_handle == wsrep::ws_handle()); } int ret= (trans_rollback_stmt(m_thd) || trans_rollback(m_thd)); + + WSREP_DEBUG("::rollback() thread: %lu, client_state %s " + "client_mode %s trans_state %s killed %d", + thd_get_thread_id(m_thd), + wsrep_thd_client_state_str(m_thd), + wsrep_thd_client_mode_str(m_thd), + wsrep_thd_transaction_state_str(m_thd), + m_thd->killed); + m_thd->release_transactional_locks(); mysql_ull_cleanup(m_thd); m_thd->mdl_context.release_explicit_locks(); diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc index 1cfdae2890b..f39588e41db 100644 --- a/sql/wsrep_schema.cc +++ b/sql/wsrep_schema.cc @@ -654,12 +654,9 @@ static void make_key(TABLE* table, uchar** key, key_part_map* map, int parts) { } /* namespace Wsrep_schema_impl */ -Wsrep_schema::Wsrep_schema() -{ -} +Wsrep_schema::Wsrep_schema() = default; -Wsrep_schema::~Wsrep_schema() -{ } +Wsrep_schema::~Wsrep_schema() = default; static void wsrep_init_thd_for_schema(THD *thd) { diff --git a/sql/wsrep_server_state.cc b/sql/wsrep_server_state.cc index 973850871b1..6bc4eaf4d86 100644 --- a/sql/wsrep_server_state.cc +++ b/sql/wsrep_server_state.cc @@ -48,8 +48,7 @@ Wsrep_server_state::Wsrep_server_state(const std::string& name, , m_service(*this) { } -Wsrep_server_state::~Wsrep_server_state() -{ } +Wsrep_server_state::~Wsrep_server_state() = default; void Wsrep_server_state::init_once(const std::string& name, const std::string& incoming_address, diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h index 2bb5079868b..2e03ac639b5 100644 --- a/storage/archive/ha_archive.h +++ b/storage/archive/ha_archive.h @@ -87,9 +87,7 @@ class ha_archive final : public handler public: ha_archive(handlerton *hton, TABLE_SHARE *table_arg); - ~ha_archive() - { - } + ~ha_archive() = default; const char *index_type(uint inx) { return "NONE"; } ulonglong table_flags() const { diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h index baa140bc04a..04ca65f2a53 100644 --- a/storage/blackhole/ha_blackhole.h +++ b/storage/blackhole/ha_blackhole.h @@ -44,9 +44,7 @@ class ha_blackhole final : public handler public: ha_blackhole(handlerton *hton, TABLE_SHARE *table_arg); - ~ha_blackhole() - { - } + ~ha_blackhole() = default; /* The name of the index type that will be used for display don't implement this method unless you really have indexes diff --git a/storage/connect/blkfil.h b/storage/connect/blkfil.h index 61b02c53c14..27e6fd4b166 100644 --- a/storage/connect/blkfil.h +++ b/storage/connect/blkfil.h @@ -31,7 +31,7 @@ class DllExport BLOCKFILTER : public BLOCK { /* Block Filter */ virtual void Prints(PGLOBAL g, char *ps, uint z); protected: - BLOCKFILTER(void) {} // Standard constructor not to be used + BLOCKFILTER(void) = default; // Standard constructor not to be used // Members PTDBDOS Tdbp; // Owner TDB @@ -54,7 +54,7 @@ class DllExport BLKFILLOG : public BLOCKFILTER { /* Logical Op Block Filter */ virtual int BlockEval(PGLOBAL g); protected: - BLKFILLOG(void) {} // Standard constructor not to be used + BLKFILLOG(void) = default; // Standard constructor not to be used // Members PBF *Fil; // Points to Block filter args @@ -75,7 +75,7 @@ class DllExport BLKFILARI : public BLOCKFILTER { /* Arithm. Op Block Filter */ virtual void MakeValueBitmap(void) {} protected: - BLKFILARI(void) {} // Standard constructor not to be used + BLKFILARI(void) = default; // Standard constructor not to be used // Members PDOSCOL Colp; // Points to column argument @@ -97,7 +97,7 @@ class DllExport BLKFILAR2 : public BLKFILARI { /* Arithm. Op Block Filter */ virtual void MakeValueBitmap(void); protected: - BLKFILAR2(void) {} // Standard constructor not to be used + BLKFILAR2(void) = default; // Standard constructor not to be used // Members uint Bmp; // The value bitmap used to test blocks @@ -118,7 +118,7 @@ class DllExport BLKFILMR2 : public BLKFILARI { /* Arithm. Op Block Filter */ virtual void MakeValueBitmap(void); protected: - BLKFILMR2(void) {} // Standard constructor not to be used + BLKFILMR2(void) = default; // Standard constructor not to be used // Members int Nbm; // The number of ULONG bitmaps @@ -141,7 +141,7 @@ class DllExport BLKSPCARI : public BLOCKFILTER { /* Arithm. Op Block Filter */ virtual int BlockEval(PGLOBAL g); protected: - BLKSPCARI(void) {} // Standard constructor not to be used + BLKSPCARI(void) = default; // Standard constructor not to be used // Members PCOL Cpx; // Point to subquery "constant" column diff --git a/storage/connect/block.h b/storage/connect/block.h index e8871277d48..5351c2e6354 100644 --- a/storage/connect/block.h +++ b/storage/connect/block.h @@ -55,7 +55,7 @@ class DllExport BLOCK { void operator delete(void*, long long) {} void operator delete(void*) {} - virtual ~BLOCK() {} + virtual ~BLOCK() = default; }; // end of class BLOCK #endif // !BLOCK_DEFINED diff --git a/storage/connect/bson.h b/storage/connect/bson.h index acc36e8e0ed..e3a15a41952 100644 --- a/storage/connect/bson.h +++ b/storage/connect/bson.h @@ -165,7 +165,7 @@ public: protected: // Default constructor not to be used - BJSON(void) {} + BJSON(void) = default; }; // end of class BJSON /***********************************************************************/ @@ -203,5 +203,5 @@ protected: bool comma; // True if Pretty = 1 // Default constructor not to be used - BDOC(void) {} + BDOC(void) = default; }; // end of class BDOC diff --git a/storage/connect/bsonudf.h b/storage/connect/bsonudf.h index 0fe3715617e..e355fe7b48e 100644 --- a/storage/connect/bsonudf.h +++ b/storage/connect/bsonudf.h @@ -143,7 +143,7 @@ protected: my_bool AddPath(void); // Default constructor not to be used - BJNX(void) {} + BJNX(void) = default; // Members PBVAL Row; diff --git a/storage/connect/catalog.h b/storage/connect/catalog.h index 48347d7519e..2649a50cf76 100644 --- a/storage/connect/catalog.h +++ b/storage/connect/catalog.h @@ -61,7 +61,7 @@ class DllExport CATALOG { friend class OEMDEF; public: CATALOG(void); // Constructor - virtual ~CATALOG() { } // Make -Wdelete-non-virtual-dtor happy + virtual ~CATALOG() = default; // Make -Wdelete-non-virtual-dtor happy // Implementation int GetCblen(void) {return Cblen;} diff --git a/storage/connect/colblk.h b/storage/connect/colblk.h index c9712f516b5..e67ba3ba3f9 100644 --- a/storage/connect/colblk.h +++ b/storage/connect/colblk.h @@ -177,7 +177,7 @@ class DllExport TIDBLK : public SPCBLK { protected: // Default constructor not to be used - TIDBLK(void) {} + TIDBLK(void) = default; // Members PCSZ Tname; // The current table name @@ -200,7 +200,7 @@ class DllExport PRTBLK : public SPCBLK { protected: // Default constructor not to be used - PRTBLK(void) {} + PRTBLK(void) = default; // Members PCSZ Pname; // The current partition name @@ -223,7 +223,7 @@ class DllExport SIDBLK : public SPCBLK { protected: // Default constructor not to be used - SIDBLK(void) {} + SIDBLK(void) = default; // Members PCSZ Sname; // The current server name diff --git a/storage/connect/csort.h b/storage/connect/csort.h index 6e700059881..cce01df4199 100644 --- a/storage/connect/csort.h +++ b/storage/connect/csort.h @@ -33,7 +33,7 @@ class DllExport CSORT { public: // Constructor CSORT(bool cns, int th = THRESH, int mth = MTHRESH); - virtual ~CSORT() {} + virtual ~CSORT() = default; protected: // Implementation /*********************************************************************/ diff --git a/storage/connect/filamdbf.h b/storage/connect/filamdbf.h index dfe5cb5cfc4..6cf6331abd4 100644 --- a/storage/connect/filamdbf.h +++ b/storage/connect/filamdbf.h @@ -35,7 +35,7 @@ class DllExport DBFBASE { protected: // Default constructor, not to be used - DBFBASE(void) {} + DBFBASE(void) = default; // Members int Records; /* records in the file */ diff --git a/storage/connect/filter.h b/storage/connect/filter.h index 12ac3a169c1..0c3fa41046a 100644 --- a/storage/connect/filter.h +++ b/storage/connect/filter.h @@ -77,7 +77,7 @@ class DllExport FILTER : public XOBJECT { /* Filter description block */ // PFIL Copy(PTABS t); protected: - FILTER(void) {} // Standard constructor not to be used + FILTER(void) = default; // Standard constructor not to be used void Constr(PGLOBAL g, OPVAL opc, int opm, PPARM *tp); // Members diff --git a/storage/connect/jsonudf.h b/storage/connect/jsonudf.h index ada0dbcd96b..4378bddf9ba 100644 --- a/storage/connect/jsonudf.h +++ b/storage/connect/jsonudf.h @@ -349,7 +349,7 @@ protected: my_bool AddPath(void); // Default constructor not to be used - JSNX(void) {} + JSNX(void) = default; // Members PJSON Row; diff --git a/storage/connect/tabbson.h b/storage/connect/tabbson.h index 1696f4dfdbc..9d5a8b7daf5 100644 --- a/storage/connect/tabbson.h +++ b/storage/connect/tabbson.h @@ -257,7 +257,7 @@ protected: bool SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm); // Default constructor not to be used - BSONCOL(void) {} + BSONCOL(void) = default; // Members TDBBSN *Tbp; // To the JSN table block diff --git a/storage/connect/tabdos.h b/storage/connect/tabdos.h index 80dfe63845d..22bb5c63ce3 100644 --- a/storage/connect/tabdos.h +++ b/storage/connect/tabdos.h @@ -245,7 +245,7 @@ class DllExport DOSCOL : public COLBLK { bool AddDistinctValue(PGLOBAL g); // Default constructor not to be used - DOSCOL(void) {} + DOSCOL(void) = default; // Members PVBLK Min; // Array of block min values diff --git a/storage/connect/tabfix.h b/storage/connect/tabfix.h index 5f859a2bffe..1a0d756bfcf 100644 --- a/storage/connect/tabfix.h +++ b/storage/connect/tabfix.h @@ -82,7 +82,7 @@ class DllExport BINCOL : public DOSCOL { static void SetEndian(void); protected: - BINCOL(void) {} // Default constructor not to be used + BINCOL(void) = default; // Default constructor not to be used // Members static char Endian; // The host endian setting (L or B) diff --git a/storage/connect/tabfmt.h b/storage/connect/tabfmt.h index c46b5a3074e..268d00b1724 100644 --- a/storage/connect/tabfmt.h +++ b/storage/connect/tabfmt.h @@ -121,7 +121,7 @@ class DllExport CSVCOL : public DOSCOL { protected: // Default constructor not to be used - CSVCOL(void) {} + CSVCOL(void) = default; // Members int Fldnum; // Field ordinal number (0 based) diff --git a/storage/connect/tabjmg.h b/storage/connect/tabjmg.h index cf7cff83b68..06c1462d103 100644 --- a/storage/connect/tabjmg.h +++ b/storage/connect/tabjmg.h @@ -118,7 +118,7 @@ public: protected: // Default constructor not to be used - JMGCOL(void) {} + JMGCOL(void) = default; //char *GetProjPath(PGLOBAL g); //char *Mini(PGLOBAL g, const bson_t *bson, bool b); diff --git a/storage/connect/tabjson.h b/storage/connect/tabjson.h index 623e5b6d509..dcf40620dae 100644 --- a/storage/connect/tabjson.h +++ b/storage/connect/tabjson.h @@ -238,7 +238,7 @@ public: PJSON GetRow(PGLOBAL g); // Default constructor not to be used - JSONCOL(void) {} + JSONCOL(void) = default; // Members PGLOBAL G; // Support of parse memory diff --git a/storage/connect/tabmul.h b/storage/connect/tabmul.h index a9d3f88cc44..a01e4e7fdf2 100644 --- a/storage/connect/tabmul.h +++ b/storage/connect/tabmul.h @@ -237,7 +237,7 @@ class DIRCOL : public COLBLK { protected: // Default constructor not to be used - DIRCOL(void) {} + DIRCOL(void) = default; #if defined(_WIN32) void SetTimeValue(PGLOBAL g, FILETIME& ftime); #endif // _WIN32 diff --git a/storage/connect/taboccur.h b/storage/connect/taboccur.h index 13bc055cd6f..8cd507acb7d 100644 --- a/storage/connect/taboccur.h +++ b/storage/connect/taboccur.h @@ -99,7 +99,7 @@ class OCCURCOL : public COLBLK { protected: // Default constructor not to be used - OCCURCOL(void) {} + OCCURCOL(void) = default; // Members int I; @@ -121,7 +121,7 @@ class RANKCOL : public COLBLK { protected: // Default constructor not to be used - RANKCOL(void) {} + RANKCOL(void) = default; // Members }; // end of class RANKCOL diff --git a/storage/connect/tabpivot.h b/storage/connect/tabpivot.h index d819d55a61a..0a37804ff87 100644 --- a/storage/connect/tabpivot.h +++ b/storage/connect/tabpivot.h @@ -188,7 +188,7 @@ class SRCCOL : public PRXCOL { protected: // Default constructor not to be used - SRCCOL(void) {} + SRCCOL(void) = default; // Members }; // end of class SRCCOL diff --git a/storage/connect/tabsys.h b/storage/connect/tabsys.h index 0c6017af177..0a427b12dae 100644 --- a/storage/connect/tabsys.h +++ b/storage/connect/tabsys.h @@ -108,7 +108,7 @@ class INICOL : public COLBLK { protected: // Default constructor not to be used - INICOL(void) {} + INICOL(void) = default; // Members char *Valbuf; // To the key value buffer @@ -176,7 +176,7 @@ class XINCOL : public INICOL { protected: // Default constructor not to be used - XINCOL(void) {} + XINCOL(void) = default; // Members }; // end of class XINICOL diff --git a/storage/connect/tabutil.h b/storage/connect/tabutil.h index c8e7e75106f..6cf2b11632b 100644 --- a/storage/connect/tabutil.h +++ b/storage/connect/tabutil.h @@ -122,7 +122,7 @@ class DllExport PRXCOL : public COLBLK { char *Decode(PGLOBAL g, const char *cnm); // Default constructor not to be used - PRXCOL(void) {} + PRXCOL(void) = default; // Members PCOL Colp; // Points to matching table column diff --git a/storage/connect/tabvct.h b/storage/connect/tabvct.h index 189a9ae2221..06ccde71bcb 100644 --- a/storage/connect/tabvct.h +++ b/storage/connect/tabvct.h @@ -110,7 +110,7 @@ class DllExport VCTCOL : public DOSCOL { virtual void ReadBlock(PGLOBAL g); virtual void WriteBlock(PGLOBAL g); - VCTCOL(void) {} // Default constructor not to be used + VCTCOL(void) = default; // Default constructor not to be used // Members PVBLK Blk; // Block buffer diff --git a/storage/connect/tabvir.h b/storage/connect/tabvir.h index e7313bbae67..b92ca0c50f8 100644 --- a/storage/connect/tabvir.h +++ b/storage/connect/tabvir.h @@ -21,7 +21,7 @@ PQRYRES VirColumns(PGLOBAL g, bool info); class DllExport VIRDEF : public TABDEF { /* Logical table description */ public: // Constructor - VIRDEF(void) {} + VIRDEF(void) = default; // Implementation virtual const char *GetType(void) {return "VIRTUAL";} @@ -86,7 +86,7 @@ class VIRCOL : public COLBLK { protected: // Default constructor not to be used - VIRCOL(void) {} + VIRCOL(void) = default; // No additional members }; // end of class VIRCOL diff --git a/storage/connect/tabxcl.h b/storage/connect/tabxcl.h index 2ae96703548..08beb5fe6ac 100644 --- a/storage/connect/tabxcl.h +++ b/storage/connect/tabxcl.h @@ -95,7 +95,7 @@ class XCLCOL : public PRXCOL { protected: // Default constructor not to be used - XCLCOL(void) {} + XCLCOL(void) = default; // Members char *Cbuf; // The column buffer diff --git a/storage/connect/tabzip.h b/storage/connect/tabzip.h index d36e4dc01d0..3c16fae99bc 100644 --- a/storage/connect/tabzip.h +++ b/storage/connect/tabzip.h @@ -23,7 +23,7 @@ class DllExport ZIPDEF : public DOSDEF { /* Table description */ friend class UNZFAM; public: // Constructor - ZIPDEF(void) {} + ZIPDEF(void) = default; // Implementation virtual const char *GetType(void) {return "ZIP";} @@ -94,7 +94,7 @@ public: protected: // Default constructor not to be used - ZIPCOL(void) {} + ZIPCOL(void) = default; // Members TDBZIP *Tdbz; diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index 1b499e09047..58acf550a0b 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -264,7 +264,7 @@ class DllExport CATCOL : public COLBLK { virtual void ReadColumn(PGLOBAL g); protected: - CATCOL(void) {} // Default constructor not to be used + CATCOL(void) = default; // Default constructor not to be used // Members PTDBCAT Tdbp; // Points to ODBC table block diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h index 2d3fa6d4216..5d067f7cda9 100644 --- a/storage/example/ha_example.h +++ b/storage/example/ha_example.h @@ -68,9 +68,7 @@ class ha_example: public handler public: ha_example(handlerton *hton, TABLE_SHARE *table_arg); - ~ha_example() - { - } + ~ha_example() = default; /** @brief The name of the index type that will be used for display. diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index faaffa21f6b..25b12de3cd5 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1651,7 +1651,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked) class Net_error_handler : public Internal_error_handler { public: - Net_error_handler() {} + Net_error_handler() = default; public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h index 0c6285f3ac6..fe729f08413 100644 --- a/storage/federated/ha_federated.h +++ b/storage/federated/ha_federated.h @@ -121,7 +121,7 @@ private: int real_connect(); public: ha_federated(handlerton *hton, TABLE_SHARE *table_arg); - ~ha_federated() {} + ~ha_federated() = default; /* Next pointer used in transaction */ diff --git a/storage/federatedx/federatedx_io_null.cc b/storage/federatedx/federatedx_io_null.cc index b1058dbd2f5..8a2394f2150 100644 --- a/storage/federatedx/federatedx_io_null.cc +++ b/storage/federatedx/federatedx_io_null.cc @@ -118,9 +118,7 @@ federatedx_io_null::federatedx_io_null(FEDERATEDX_SERVER *aserver) } -federatedx_io_null::~federatedx_io_null() -{ -} +federatedx_io_null::~federatedx_io_null() = default; void federatedx_io_null::reset() diff --git a/storage/federatedx/federatedx_pushdown.cc b/storage/federatedx/federatedx_pushdown.cc index 0d58e0d8270..e9a9791a859 100644 --- a/storage/federatedx/federatedx_pushdown.cc +++ b/storage/federatedx/federatedx_pushdown.cc @@ -144,7 +144,7 @@ ha_federatedx_derived_handler::ha_federatedx_derived_handler(THD *thd, derived= dt; } -ha_federatedx_derived_handler::~ha_federatedx_derived_handler() {} +ha_federatedx_derived_handler::~ha_federatedx_derived_handler() = default; int ha_federatedx_derived_handler::init_scan() { @@ -281,7 +281,7 @@ ha_federatedx_select_handler::ha_federatedx_select_handler(THD *thd, select= sel; } -ha_federatedx_select_handler::~ha_federatedx_select_handler() {} +ha_federatedx_select_handler::~ha_federatedx_select_handler() = default; int ha_federatedx_select_handler::init_scan() { diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index 50d63e53b26..e2fdc54d8e7 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -1824,7 +1824,7 @@ int ha_federatedx::open(const char *name, int mode, uint test_if_locked) class Net_error_handler : public Internal_error_handler { public: - Net_error_handler() {} + Net_error_handler() = default; public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, diff --git a/storage/federatedx/ha_federatedx.h b/storage/federatedx/ha_federatedx.h index 2bbb116d646..8c59bc7c13a 100644 --- a/storage/federatedx/ha_federatedx.h +++ b/storage/federatedx/ha_federatedx.h @@ -317,7 +317,7 @@ private: int real_connect(FEDERATEDX_SHARE *my_share, uint create_flag); public: ha_federatedx(handlerton *hton, TABLE_SHARE *table_arg); - ~ha_federatedx() {} + ~ha_federatedx() = default; /* The name of the index type that will be used for display don't implement this method unless you really have indexes diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h index 3a41028c719..18e0d1a92d5 100644 --- a/storage/heap/ha_heap.h +++ b/storage/heap/ha_heap.h @@ -36,7 +36,7 @@ class ha_heap final : public handler my_bool internal_table; public: ha_heap(handlerton *hton, TABLE_SHARE *table); - ~ha_heap() {} + ~ha_heap() = default; handler *clone(const char *name, MEM_ROOT *mem_root); const char *index_type(uint inx) { diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index c250f17147f..1651557840f 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -85,12 +85,6 @@ IF(WITH_INNODB_EXTRA_DEBUG) ENDIF() ADD_FEATURE_INFO(INNODB_EXTRA_DEBUG WITH_INNODB_EXTRA_DEBUG "Extra InnoDB debug checks") - -CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU) -IF(HAVE_SCHED_GETCPU) - ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1) -ENDIF() - IF(HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE) ADD_DEFINITIONS(-DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE=1) ENDIF() diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index d7370a240cc..db39874d067 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3085,10 +3085,8 @@ ha_innobase::ha_innobase( /*********************************************************************//** Destruct ha_innobase handler. */ -ha_innobase::~ha_innobase() +ha_innobase::~ha_innobase() = default; /*======================*/ -{ -} /*********************************************************************//** Updates the user_thd field in a handle and also allocates a new InnoDB diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index d17f7456a15..d33c5513dc5 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -1035,7 +1035,7 @@ even after we release the buffer pool mutex. */ class HazardPointer { public: - virtual ~HazardPointer() {} + virtual ~HazardPointer() = default; /** @return current value */ buf_page_t *get() const { mysql_mutex_assert_owner(m_mutex); return m_hp; } @@ -1074,16 +1074,15 @@ protected: class FlushHp : public HazardPointer { public: - ~FlushHp() override {} + ~FlushHp() override = default; /** Adjust the value of hp. This happens when some other thread working on the same list attempts to remove the hp from the list. @param bpage buffer block to be compared */ + MY_ATTRIBUTE((nonnull)) void adjust(const buf_page_t *bpage) override { - ut_ad(bpage != NULL); - /* We only support reverse traversal for now. */ if (is_hp(bpage)) m_hp= UT_LIST_GET_PREV(list, m_hp); @@ -1095,15 +1094,15 @@ public: /** Class implementing buf_pool.LRU hazard pointer */ class LRUHp : public HazardPointer { public: - ~LRUHp() override {} + ~LRUHp() override = default; /** Adjust the value of hp. This happens when some other thread working on the same list attempts to remove the hp from the list. @param bpage buffer block to be compared */ + MY_ATTRIBUTE((nonnull)) void adjust(const buf_page_t *bpage) override { - ut_ad(bpage); /** We only support reverse traversal for now. */ if (is_hp(bpage)) m_hp= UT_LIST_GET_PREV(LRU, m_hp); @@ -1118,8 +1117,7 @@ itr in that position and the other thread can start scan from there */ class LRUItr : public LRUHp { public: - LRUItr() : LRUHp() {} - ~LRUItr() override {} + ~LRUItr() override = default; /** Select from where to start a scan. If we have scanned too deep into the LRU list it resets the value to the tail diff --git a/storage/innobase/include/dict0types.h b/storage/innobase/include/dict0types.h index 271e4e1fb76..ec50e8cd951 100644 --- a/storage/innobase/include/dict0types.h +++ b/storage/innobase/include/dict0types.h @@ -105,7 +105,7 @@ struct table_name_t char* m_name; /** Default constructor */ - table_name_t() {} + table_name_t() = default; /** Constructor */ table_name_t(char* name) : m_name(name) {} diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index 5e8dc1c0160..91feef2a31e 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -275,15 +275,9 @@ private: @param lsn log sequence number of the shrink operation */ inline void trim(const page_id_t page_id, lsn_t lsn); - /** Undo tablespaces for which truncate has been logged - (indexed by page_id_t::space() - srv_undo_space_id_start) */ - struct trunc - { - /** log sequence number of FILE_CREATE, or 0 if none */ - lsn_t lsn; - /** truncated size of the tablespace, or 0 if not truncated */ - unsigned pages; - } truncated_undo_spaces[127]; + /** Truncated undo tablespace size for which truncate has been logged + (indexed by page_id_t::space() - srv_undo_space_id_start), or 0 */ + unsigned truncated_undo_spaces[127]; public: /** The contents of the doublewrite buffer */ diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h index dcf26e57e7e..2f038ab349f 100644 --- a/storage/innobase/include/rem0rec.h +++ b/storage/innobase/include/rem0rec.h @@ -1223,7 +1223,7 @@ public: } /** Destructor */ - ~rec_printer() override {} + ~rec_printer() override = default; private: /** Copy constructor */ diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index a49e2c3f441..a9f1c87d600 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -702,7 +702,7 @@ struct row_prebuilt_t { /** Callback for row_mysql_sys_index_iterate() */ struct SysIndexCallback { - virtual ~SysIndexCallback() { } + virtual ~SysIndexCallback() = default; /** Callback method @param mtr current mini transaction diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index 3711599bd8c..ac39d3ec45b 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -56,7 +56,7 @@ public: typedef trx_rsegs_t::iterator iterator; typedef trx_rsegs_t::const_iterator const_iterator; - TrxUndoRsegs() {} + TrxUndoRsegs() = default; /** Constructor */ TrxUndoRsegs(trx_rseg_t& rseg) diff --git a/storage/innobase/include/ut0new.h b/storage/innobase/include/ut0new.h index cd116cc3a20..f4183e4c61a 100644 --- a/storage/innobase/include/ut0new.h +++ b/storage/innobase/include/ut0new.h @@ -283,7 +283,7 @@ public: { } #else - ut_allocator() {} + ut_allocator() = default; ut_allocator(PSI_memory_key) {} #endif /* UNIV_PFS_MEMORY */ diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h index 89ff0ca709f..b7625b512a2 100644 --- a/storage/innobase/include/ut0ut.h +++ b/storage/innobase/include/ut0ut.h @@ -313,7 +313,7 @@ class logger { protected: /* This class must not be used directly */ - ATTRIBUTE_COLD ATTRIBUTE_NOINLINE logger() {} + ATTRIBUTE_COLD ATTRIBUTE_NOINLINE logger() = default; public: template<typename T> ATTRIBUTE_COLD ATTRIBUTE_NOINLINE logger& operator<<(const T& rhs) diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 2becd00cec6..c4d1bf7f137 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -2086,7 +2086,7 @@ inline bool page_recv_t::trim(lsn_t start_lsn) { while (log.head) { - if (log.head->lsn >= start_lsn) return false; + if (log.head->lsn > start_lsn) return false; last_offset= 1; /* the next record must not be same_page */ log_rec_t *next= log.head->next; recv_sys.free(log.head); @@ -2424,8 +2424,10 @@ same_page: goto record_corrupted; static_assert(UT_ARR_SIZE(truncated_undo_spaces) == TRX_SYS_MAX_UNDO_SPACES, "compatibility"); - truncated_undo_spaces[space_id - srv_undo_space_id_start]= - { recovered_lsn, page_no }; + /* The entire undo tablespace will be reinitialized by + innodb_undo_log_truncate=ON. Discard old log for all pages. */ + trim({space_id, 0}, recovered_lsn); + truncated_undo_spaces[space_id - srv_undo_space_id_start]= page_no; if (undo_space_trunc) undo_space_trunc(space_id); #endif @@ -3270,17 +3272,15 @@ void recv_sys_t::apply(bool last_batch) for (auto id= srv_undo_tablespaces_open; id--;) { - const trunc& t= truncated_undo_spaces[id]; - if (t.lsn) + if (unsigned pages= truncated_undo_spaces[id]) { - trim(page_id_t(id + srv_undo_space_id_start, 0), t.lsn); - if (fil_space_t *space = fil_space_get(id + srv_undo_space_id_start)) + if (fil_space_t *space= fil_space_get(id + srv_undo_space_id_start)) { ut_ad(UT_LIST_GET_LEN(space->chain) == 1); fil_node_t *file= UT_LIST_GET_FIRST(space->chain); ut_ad(file->is_open()); os_file_truncate(file->name, file->handle, - os_offset_t{t.pages} << srv_page_size_shift, true); + os_offset_t{pages} << srv_page_size_shift, true); } } } diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 861095b421e..6a2ee565b9e 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -353,8 +353,8 @@ public: << index->name; } - /** Descructor */ - ~IndexPurge() UNIV_NOTHROW { } + /** Destructor */ + ~IndexPurge() UNIV_NOTHROW = default; /** Purge delete marked records. @return DB_SUCCESS or error code. */ @@ -702,7 +702,7 @@ struct FetchIndexRootPages : public AbstractCallback { m_table(table), m_index(0, 0) UNIV_NOTHROW { } /** Destructor */ - ~FetchIndexRootPages() UNIV_NOTHROW override { } + ~FetchIndexRootPages() UNIV_NOTHROW override = default; /** Fetch the clustered index root page in the tablespace @param iter Tablespace iterator diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h index 6b4302145dd..2b8b5dc9742 100644 --- a/storage/maria/ha_maria.h +++ b/storage/maria/ha_maria.h @@ -64,7 +64,7 @@ private: public: ha_maria(handlerton *hton, TABLE_SHARE * table_arg); - ~ha_maria() {} + ~ha_maria() = default; handler *clone(const char *name, MEM_ROOT *mem_root) override final; const char *index_type(uint key_number) override final; ulonglong table_flags() const override final diff --git a/storage/mroonga/lib/mrn_count_skip_checker.cpp b/storage/mroonga/lib/mrn_count_skip_checker.cpp index dfa1a11d2b8..cd22be31ef2 100644 --- a/storage/mroonga/lib/mrn_count_skip_checker.cpp +++ b/storage/mroonga/lib/mrn_count_skip_checker.cpp @@ -40,8 +40,7 @@ namespace mrn { is_storage_mode_(is_storage_mode) { } - CountSkipChecker::~CountSkipChecker() { - } + CountSkipChecker::~CountSkipChecker() = default; bool CountSkipChecker::check() { MRN_DBUG_ENTER_METHOD(); diff --git a/storage/mroonga/lib/mrn_database_repairer.cpp b/storage/mroonga/lib/mrn_database_repairer.cpp index c0c4a90e8f7..08ddd84943e 100644 --- a/storage/mroonga/lib/mrn_database_repairer.cpp +++ b/storage/mroonga/lib/mrn_database_repairer.cpp @@ -57,8 +57,7 @@ namespace mrn { mrn_db_file_suffix_length_(strlen(MRN_DB_FILE_SUFFIX)) { } - DatabaseRepairer::~DatabaseRepairer() { - } + DatabaseRepairer::~DatabaseRepairer() = default; bool DatabaseRepairer::is_crashed(void) { MRN_DBUG_ENTER_METHOD(); diff --git a/storage/mroonga/lib/mrn_field_normalizer.cpp b/storage/mroonga/lib/mrn_field_normalizer.cpp index d7a81f749fc..db1af550a14 100644 --- a/storage/mroonga/lib/mrn_field_normalizer.cpp +++ b/storage/mroonga/lib/mrn_field_normalizer.cpp @@ -30,8 +30,7 @@ namespace mrn { field_(field) { } - FieldNormalizer::~FieldNormalizer() { - } + FieldNormalizer::~FieldNormalizer() = default; bool FieldNormalizer::should_normalize() { MRN_DBUG_ENTER_METHOD(); diff --git a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp index 73639685d0e..dd3165cdadf 100644 --- a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp +++ b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp @@ -70,8 +70,7 @@ namespace mrn { key_info_(key_info) { } - MultipleColumnKeyCodec::~MultipleColumnKeyCodec() { - } + MultipleColumnKeyCodec::~MultipleColumnKeyCodec() = default; int MultipleColumnKeyCodec::encode(const uchar *mysql_key, uint mysql_key_length, diff --git a/storage/mroonga/lib/mrn_query_parser.cpp b/storage/mroonga/lib/mrn_query_parser.cpp index 92387e259a8..b32ebd2c443 100644 --- a/storage/mroonga/lib/mrn_query_parser.cpp +++ b/storage/mroonga/lib/mrn_query_parser.cpp @@ -44,8 +44,7 @@ namespace mrn { match_columns_(match_columns) { } - QueryParser::~QueryParser() { - } + QueryParser::~QueryParser() = default; grn_rc QueryParser::parse(const char *query, size_t query_length) { MRN_DBUG_ENTER_METHOD(); diff --git a/storage/mroonga/lib/mrn_time_converter.cpp b/storage/mroonga/lib/mrn_time_converter.cpp index 9bb8d89a082..7d7555bb47a 100644 --- a/storage/mroonga/lib/mrn_time_converter.cpp +++ b/storage/mroonga/lib/mrn_time_converter.cpp @@ -33,11 +33,9 @@ #define MRN_CLASS_NAME "mrn::TimeConverter" namespace mrn { - TimeConverter::TimeConverter() { - } + TimeConverter::TimeConverter() = default; - TimeConverter::~TimeConverter() { - } + TimeConverter::~TimeConverter() = default; time_t TimeConverter::tm_to_time_gm(struct tm *time, bool *truncated) { MRN_DBUG_ENTER_METHOD(); diff --git a/storage/mroonga/vendor/groonga/lib/dat/array.hpp b/storage/mroonga/vendor/groonga/lib/dat/array.hpp index de60e3bd590..58186ff4127 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/array.hpp +++ b/storage/mroonga/vendor/groonga/lib/dat/array.hpp @@ -33,7 +33,7 @@ class GRN_DAT_API Array { } template <UInt32 U> explicit Array(T (&array)[U]) : ptr_(array), size_(U) {} - ~Array() {} + ~Array() = default; const T &operator[](UInt32 i) const { GRN_DAT_DEBUG_THROW_IF(i >= size_); diff --git a/storage/mroonga/vendor/groonga/lib/dat/cursor.hpp b/storage/mroonga/vendor/groonga/lib/dat/cursor.hpp index 357b5250e99..740a56edfde 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/cursor.hpp +++ b/storage/mroonga/vendor/groonga/lib/dat/cursor.hpp @@ -25,8 +25,8 @@ namespace dat { class GRN_DAT_API Cursor { public: - Cursor() {} - virtual ~Cursor() {} + Cursor() = default; + virtual ~Cursor() = default; virtual void close() = 0; diff --git a/storage/mroonga/vendor/groonga/lib/dat/dat.hpp b/storage/mroonga/vendor/groonga/lib/dat/dat.hpp index 1afbd0955bc..b6e2893ad07 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/dat.hpp +++ b/storage/mroonga/vendor/groonga/lib/dat/dat.hpp @@ -175,12 +175,8 @@ class Exception : public std::exception { file_(file), line_(line), what_((what != NULL) ? what : "") {} - Exception(const Exception &ex) throw() - : std::exception(ex), - file_(ex.file_), - line_(ex.line_), - what_(ex.what_) {} - virtual ~Exception() throw() {} + Exception(const Exception &ex) throw() = default; + virtual ~Exception() throw() = default; virtual ErrorCode code() const throw() = 0; virtual const char *file() const throw() { @@ -208,7 +204,7 @@ class Error : public Exception { : Exception(file, line, what) {} Error(const Error &ex) throw() : Exception(ex) {} - virtual ~Error() throw() {} + virtual ~Error() throw() = default; virtual ErrorCode code() const throw() { return T; diff --git a/storage/mroonga/vendor/groonga/lib/dat/id-cursor.cpp b/storage/mroonga/vendor/groonga/lib/dat/id-cursor.cpp index de969839586..d3caf510dcd 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/id-cursor.cpp +++ b/storage/mroonga/vendor/groonga/lib/dat/id-cursor.cpp @@ -33,7 +33,7 @@ IdCursor::IdCursor() end_(INVALID_KEY_ID), count_(0) {} -IdCursor::~IdCursor() {} +IdCursor::~IdCursor() = default; void IdCursor::open(const Trie &trie, const String &min_str, diff --git a/storage/mroonga/vendor/groonga/lib/dat/key.hpp b/storage/mroonga/vendor/groonga/lib/dat/key.hpp index eb0324cd8d3..717ad90a715 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/key.hpp +++ b/storage/mroonga/vendor/groonga/lib/dat/key.hpp @@ -99,7 +99,7 @@ class GRN_DAT_API Key { // Disallows instantiation. Key() : id_and_length_low_(INVALID_KEY_ID << 4), length_high_(0) {} - ~Key() {} + ~Key() = default; // Disallows copy and assignment. Key(const Key &); diff --git a/storage/mroonga/vendor/groonga/lib/dat/predictive-cursor.cpp b/storage/mroonga/vendor/groonga/lib/dat/predictive-cursor.cpp index 67520305703..d9fd995beae 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/predictive-cursor.cpp +++ b/storage/mroonga/vendor/groonga/lib/dat/predictive-cursor.cpp @@ -35,7 +35,7 @@ PredictiveCursor::PredictiveCursor() end_(0), min_length_(0) {} -PredictiveCursor::~PredictiveCursor() {} +PredictiveCursor::~PredictiveCursor() = default; void PredictiveCursor::open(const Trie &trie, const String &str, diff --git a/storage/mroonga/vendor/groonga/lib/dat/prefix-cursor.cpp b/storage/mroonga/vendor/groonga/lib/dat/prefix-cursor.cpp index 83adeb3731e..5f491c6644f 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/prefix-cursor.cpp +++ b/storage/mroonga/vendor/groonga/lib/dat/prefix-cursor.cpp @@ -33,7 +33,7 @@ PrefixCursor::PrefixCursor() cur_(0), end_(0) {} -PrefixCursor::~PrefixCursor() {} +PrefixCursor::~PrefixCursor() = default; void PrefixCursor::open(const Trie &trie, const String &str, diff --git a/storage/mroonga/vendor/groonga/lib/dat/string.hpp b/storage/mroonga/vendor/groonga/lib/dat/string.hpp index aead21cac18..281333ee18f 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/string.hpp +++ b/storage/mroonga/vendor/groonga/lib/dat/string.hpp @@ -35,9 +35,7 @@ class GRN_DAT_API String { explicit String(const char (&str)[T]) : ptr_(reinterpret_cast<const UInt8 *>(str)), length_(T - 1) {} - String(const String &rhs) - : ptr_(rhs.ptr_), - length_(rhs.length_) {} + String(const String &rhs) = default; String &operator=(const String &rhs) { set_ptr(rhs.ptr()); diff --git a/storage/mroonga/vendor/groonga/lib/dat/trie.cpp b/storage/mroonga/vendor/groonga/lib/dat/trie.cpp index b2c6a84ffa7..47d53209953 100644 --- a/storage/mroonga/vendor/groonga/lib/dat/trie.cpp +++ b/storage/mroonga/vendor/groonga/lib/dat/trie.cpp @@ -55,7 +55,7 @@ Trie::Trie() entries_(), key_buf_() {} -Trie::~Trie() {} +Trie::~Trie() = default; void Trie::create(const char *file_name, UInt64 file_size, diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h index 3843004cc6e..c4c46a63afa 100644 --- a/storage/myisam/ha_myisam.h +++ b/storage/myisam/ha_myisam.h @@ -53,7 +53,7 @@ class ha_myisam final : public handler public: ha_myisam(handlerton *hton, TABLE_SHARE *table_arg); - ~ha_myisam() {} + ~ha_myisam() = default; handler *clone(const char *name, MEM_ROOT *mem_root); const char *index_type(uint key_number); ulonglong table_flags() const { return int_table_flags; } diff --git a/storage/perfschema/cursor_by_account.h b/storage/perfschema/cursor_by_account.h index 30ee3761f37..59adf2e0fc8 100644 --- a/storage/perfschema/cursor_by_account.h +++ b/storage/perfschema/cursor_by_account.h @@ -51,8 +51,7 @@ protected: cursor_by_account(const PFS_engine_table_share *share); public: - ~cursor_by_account() - {} + ~cursor_by_account() = default; protected: virtual void make_row(PFS_account *account)= 0; diff --git a/storage/perfschema/cursor_by_host.h b/storage/perfschema/cursor_by_host.h index e7ae47fef72..a2ddae4b644 100644 --- a/storage/perfschema/cursor_by_host.h +++ b/storage/perfschema/cursor_by_host.h @@ -51,8 +51,7 @@ protected: cursor_by_host(const PFS_engine_table_share *share); public: - ~cursor_by_host() - {} + ~cursor_by_host() = default; protected: virtual void make_row(PFS_host *host)= 0; diff --git a/storage/perfschema/cursor_by_thread.h b/storage/perfschema/cursor_by_thread.h index 910291c2be3..89d97997a41 100644 --- a/storage/perfschema/cursor_by_thread.h +++ b/storage/perfschema/cursor_by_thread.h @@ -51,8 +51,7 @@ protected: cursor_by_thread(const PFS_engine_table_share *share); public: - ~cursor_by_thread() - {} + ~cursor_by_thread() = default; protected: virtual void make_row(PFS_thread *thread)= 0; diff --git a/storage/perfschema/cursor_by_thread_connect_attr.h b/storage/perfschema/cursor_by_thread_connect_attr.h index aa1b63ad51e..3c273708e39 100644 --- a/storage/perfschema/cursor_by_thread_connect_attr.h +++ b/storage/perfschema/cursor_by_thread_connect_attr.h @@ -70,8 +70,7 @@ protected: cursor_by_thread_connect_attr(const PFS_engine_table_share *share); public: - ~cursor_by_thread_connect_attr() - {} + ~cursor_by_thread_connect_attr() = default; protected: virtual void make_row(PFS_thread *thread, uint ordinal)= 0; diff --git a/storage/perfschema/cursor_by_user.h b/storage/perfschema/cursor_by_user.h index ca4fef9209c..f5b6800d9b1 100644 --- a/storage/perfschema/cursor_by_user.h +++ b/storage/perfschema/cursor_by_user.h @@ -51,8 +51,7 @@ protected: cursor_by_user(const PFS_engine_table_share *share); public: - ~cursor_by_user() - {} + ~cursor_by_user() = default; protected: virtual void make_row(PFS_user *user)= 0; diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc index 982876216aa..57aa40c7e86 100644 --- a/storage/perfschema/ha_perfschema.cc +++ b/storage/perfschema/ha_perfschema.cc @@ -238,8 +238,7 @@ ha_perfschema::ha_perfschema(handlerton *hton, TABLE_SHARE *share) : handler(hton, share), m_table_share(NULL), m_table(NULL) {} -ha_perfschema::~ha_perfschema() -{} +ha_perfschema::~ha_perfschema() = default; int ha_perfschema::open(const char *name, int mode, uint test_if_locked) { diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc index d8646938bdb..6a9351b9d91 100644 --- a/storage/perfschema/pfs_engine_table.cc +++ b/storage/perfschema/pfs_engine_table.cc @@ -670,11 +670,9 @@ int PFS_engine_table::update_row_values(TABLE *, class PFS_internal_schema_access : public ACL_internal_schema_access { public: - PFS_internal_schema_access() - {} + PFS_internal_schema_access() = default; - ~PFS_internal_schema_access() - {} + ~PFS_internal_schema_access() = default; ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const; diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h index 6280a3799b3..1f31c4fcdf6 100644 --- a/storage/perfschema/pfs_engine_table.h +++ b/storage/perfschema/pfs_engine_table.h @@ -125,8 +125,7 @@ public: void get_normalizer(PFS_instr_class *instr_class); /** Destructor. */ - virtual ~PFS_engine_table() - {} + virtual ~PFS_engine_table() = default; /** Helper, assign a value to a long field. @@ -337,11 +336,9 @@ struct PFS_engine_table_share class PFS_readonly_acl : public ACL_internal_table_access { public: - PFS_readonly_acl() - {} + PFS_readonly_acl() = default; - ~PFS_readonly_acl() - {} + ~PFS_readonly_acl() = default; virtual ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const; @@ -357,11 +354,9 @@ extern PFS_readonly_acl pfs_readonly_acl; class PFS_truncatable_acl : public ACL_internal_table_access { public: - PFS_truncatable_acl() - {} + PFS_truncatable_acl() = default; - ~PFS_truncatable_acl() - {} + ~PFS_truncatable_acl() = default; virtual ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const; @@ -377,11 +372,9 @@ extern PFS_truncatable_acl pfs_truncatable_acl; class PFS_updatable_acl : public ACL_internal_table_access { public: - PFS_updatable_acl() - {} + PFS_updatable_acl() = default; - ~PFS_updatable_acl() - {} + ~PFS_updatable_acl() = default; ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const; @@ -397,11 +390,9 @@ extern PFS_updatable_acl pfs_updatable_acl; class PFS_editable_acl : public ACL_internal_table_access { public: - PFS_editable_acl() - {} + PFS_editable_acl() = default; - ~PFS_editable_acl() - {} + ~PFS_editable_acl() = default; ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const; @@ -416,11 +407,9 @@ extern PFS_editable_acl pfs_editable_acl; class PFS_unknown_acl : public ACL_internal_table_access { public: - PFS_unknown_acl() - {} + PFS_unknown_acl() = default; - ~PFS_unknown_acl() - {} + ~PFS_unknown_acl() = default; ACL_internal_access_result check(privilege_t want_access, privilege_t *save_priv) const; diff --git a/storage/perfschema/pfs_visitor.cc b/storage/perfschema/pfs_visitor.cc index 4cb0673f1b2..17ef39448f9 100644 --- a/storage/perfschema/pfs_visitor.cc +++ b/storage/perfschema/pfs_visitor.cc @@ -895,8 +895,7 @@ PFS_connection_wait_visitor m_index= klass->m_event_name_index; } -PFS_connection_wait_visitor::~PFS_connection_wait_visitor() -{} +PFS_connection_wait_visitor::~PFS_connection_wait_visitor() = default; void PFS_connection_wait_visitor::visit_global() { @@ -959,12 +958,9 @@ void PFS_connection_wait_visitor::visit_thread(PFS_thread *pfs) } } -PFS_connection_all_wait_visitor -::PFS_connection_all_wait_visitor() -{} +PFS_connection_all_wait_visitor::PFS_connection_all_wait_visitor() = default; -PFS_connection_all_wait_visitor::~PFS_connection_all_wait_visitor() -{} +PFS_connection_all_wait_visitor::~PFS_connection_all_wait_visitor() = default; void PFS_connection_all_wait_visitor::visit_global() { @@ -1010,8 +1006,7 @@ PFS_connection_stage_visitor::PFS_connection_stage_visitor(PFS_stage_class *klas m_index= klass->m_event_name_index; } -PFS_connection_stage_visitor::~PFS_connection_stage_visitor() -{} +PFS_connection_stage_visitor::~PFS_connection_stage_visitor() = default; void PFS_connection_stage_visitor::visit_global() { @@ -1064,8 +1059,7 @@ PFS_connection_statement_visitor m_index= klass->m_event_name_index; } -PFS_connection_statement_visitor::~PFS_connection_statement_visitor() -{} +PFS_connection_statement_visitor::~PFS_connection_statement_visitor() = default; void PFS_connection_statement_visitor::visit_global() { @@ -1114,11 +1108,10 @@ void PFS_connection_statement_visitor::visit_thread(PFS_thread *pfs) /** Instance wait visitor */ PFS_connection_all_statement_visitor -::PFS_connection_all_statement_visitor() -{} +::PFS_connection_all_statement_visitor() = default; -PFS_connection_all_statement_visitor::~PFS_connection_all_statement_visitor() -{} +PFS_connection_all_statement_visitor +::~PFS_connection_all_statement_visitor() = default; void PFS_connection_all_statement_visitor::visit_global() { @@ -1259,11 +1252,9 @@ void PFS_connection_all_transaction_visitor::visit_thread(PFS_thread *pfs) } #endif -PFS_connection_stat_visitor::PFS_connection_stat_visitor() -{} +PFS_connection_stat_visitor::PFS_connection_stat_visitor() = default; -PFS_connection_stat_visitor::~PFS_connection_stat_visitor() -{} +PFS_connection_stat_visitor::~PFS_connection_stat_visitor() = default; void PFS_connection_stat_visitor::visit_global() {} @@ -1360,8 +1351,7 @@ PFS_connection_status_visitor(STATUS_VAR *status_vars) : m_status_vars(status_va memset(m_status_vars, 0, sizeof(STATUS_VAR)); } -PFS_connection_status_visitor::~PFS_connection_status_visitor() -{} +PFS_connection_status_visitor::~PFS_connection_status_visitor() = default; /** Aggregate from global status. */ void PFS_connection_status_visitor::visit_global() @@ -1396,11 +1386,9 @@ void PFS_connection_status_visitor::visit_THD(THD *thd) } -PFS_instance_wait_visitor::PFS_instance_wait_visitor() -{} +PFS_instance_wait_visitor::PFS_instance_wait_visitor() = default; -PFS_instance_wait_visitor::~PFS_instance_wait_visitor() -{} +PFS_instance_wait_visitor::~PFS_instance_wait_visitor() = default; void PFS_instance_wait_visitor::visit_mutex_class(PFS_mutex_class *pfs) { @@ -1460,11 +1448,9 @@ void PFS_instance_wait_visitor::visit_socket(PFS_socket *pfs) /** Table IO wait visitor */ -PFS_object_wait_visitor::PFS_object_wait_visitor() -{} +PFS_object_wait_visitor::PFS_object_wait_visitor() = default; -PFS_object_wait_visitor::~PFS_object_wait_visitor() -{} +PFS_object_wait_visitor::~PFS_object_wait_visitor() = default; void PFS_object_wait_visitor::visit_global() { @@ -1488,11 +1474,9 @@ void PFS_object_wait_visitor::visit_table(PFS_table *pfs) } } -PFS_table_io_wait_visitor::PFS_table_io_wait_visitor() -{} +PFS_table_io_wait_visitor::PFS_table_io_wait_visitor() = default; -PFS_table_io_wait_visitor::~PFS_table_io_wait_visitor() -{} +PFS_table_io_wait_visitor::~PFS_table_io_wait_visitor() = default; void PFS_table_io_wait_visitor::visit_global() { @@ -1545,11 +1529,9 @@ void PFS_table_io_wait_visitor::visit_table(PFS_table *pfs) /** Table IO stat visitor */ -PFS_table_io_stat_visitor::PFS_table_io_stat_visitor() -{} +PFS_table_io_stat_visitor::PFS_table_io_stat_visitor() = default; -PFS_table_io_stat_visitor::~PFS_table_io_stat_visitor() -{} +PFS_table_io_stat_visitor::~PFS_table_io_stat_visitor() = default; void PFS_table_io_stat_visitor::visit_table_share(PFS_table_share *pfs) { @@ -1591,11 +1573,9 @@ void PFS_table_io_stat_visitor::visit_table(PFS_table *pfs) /** Index IO stat visitor */ -PFS_index_io_stat_visitor::PFS_index_io_stat_visitor() -{} +PFS_index_io_stat_visitor::PFS_index_io_stat_visitor() = default; -PFS_index_io_stat_visitor::~PFS_index_io_stat_visitor() -{} +PFS_index_io_stat_visitor::~PFS_index_io_stat_visitor() = default; void PFS_index_io_stat_visitor::visit_table_share_index(PFS_table_share *pfs, uint index) { @@ -1613,11 +1593,9 @@ void PFS_index_io_stat_visitor::visit_table_index(PFS_table *pfs, uint index) /** Table lock wait visitor */ -PFS_table_lock_wait_visitor::PFS_table_lock_wait_visitor() -{} +PFS_table_lock_wait_visitor::PFS_table_lock_wait_visitor() = default; -PFS_table_lock_wait_visitor::~PFS_table_lock_wait_visitor() -{} +PFS_table_lock_wait_visitor::~PFS_table_lock_wait_visitor() = default; void PFS_table_lock_wait_visitor::visit_global() { @@ -1636,11 +1614,9 @@ void PFS_table_lock_wait_visitor::visit_table(PFS_table *pfs) /** Table lock stat visitor */ -PFS_table_lock_stat_visitor::PFS_table_lock_stat_visitor() -{} +PFS_table_lock_stat_visitor::PFS_table_lock_stat_visitor() = default; -PFS_table_lock_stat_visitor::~PFS_table_lock_stat_visitor() -{} +PFS_table_lock_stat_visitor::~PFS_table_lock_stat_visitor() = default; void PFS_table_lock_stat_visitor::visit_table_share(PFS_table_share *pfs) { @@ -1656,11 +1632,11 @@ void PFS_table_lock_stat_visitor::visit_table(PFS_table *pfs) m_stat.aggregate(& pfs->m_table_stat.m_lock_stat); } -PFS_instance_socket_io_stat_visitor::PFS_instance_socket_io_stat_visitor() -{} +PFS_instance_socket_io_stat_visitor +::PFS_instance_socket_io_stat_visitor() = default; -PFS_instance_socket_io_stat_visitor::~PFS_instance_socket_io_stat_visitor() -{} +PFS_instance_socket_io_stat_visitor +::~PFS_instance_socket_io_stat_visitor() = default; void PFS_instance_socket_io_stat_visitor::visit_socket_class(PFS_socket_class *pfs) { @@ -1674,11 +1650,11 @@ void PFS_instance_socket_io_stat_visitor::visit_socket(PFS_socket *pfs) m_socket_io_stat.aggregate(&pfs->m_socket_stat.m_io_stat); } -PFS_instance_file_io_stat_visitor::PFS_instance_file_io_stat_visitor() -{} +PFS_instance_file_io_stat_visitor +::PFS_instance_file_io_stat_visitor() = default; -PFS_instance_file_io_stat_visitor::~PFS_instance_file_io_stat_visitor() -{} +PFS_instance_file_io_stat_visitor +::~PFS_instance_file_io_stat_visitor() = default; void PFS_instance_file_io_stat_visitor::visit_file_class(PFS_file_class *pfs) { diff --git a/storage/perfschema/pfs_visitor.h b/storage/perfschema/pfs_visitor.h index 4644888ea33..c5e5f826b7c 100644 --- a/storage/perfschema/pfs_visitor.h +++ b/storage/perfschema/pfs_visitor.h @@ -67,8 +67,8 @@ struct PFS_connection_slice; class PFS_connection_visitor { public: - PFS_connection_visitor() {} - virtual ~PFS_connection_visitor() {} + PFS_connection_visitor() = default; + virtual ~PFS_connection_visitor() = default; /** Visit all connections. */ virtual void visit_global() {} /** Visit all connections of a host. */ @@ -159,8 +159,8 @@ public: class PFS_instance_visitor { public: - PFS_instance_visitor() {} - virtual ~PFS_instance_visitor() {} + PFS_instance_visitor() = default; + virtual ~PFS_instance_visitor() = default; /** Visit a mutex class. */ virtual void visit_mutex_class(PFS_mutex_class *pfs) {} /** Visit a rwlock class. */ @@ -270,8 +270,8 @@ public: class PFS_object_visitor { public: - PFS_object_visitor() {} - virtual ~PFS_object_visitor() {} + PFS_object_visitor() = default; + virtual ~PFS_object_visitor() = default; /** Visit global data. */ virtual void visit_global() {} /** Visit a table share. */ diff --git a/storage/perfschema/table_accounts.h b/storage/perfschema/table_accounts.h index f44d05b2700..239f278051d 100644 --- a/storage/perfschema/table_accounts.h +++ b/storage/perfschema/table_accounts.h @@ -67,8 +67,7 @@ protected: table_accounts(); public: - ~table_accounts() - {} + ~table_accounts() = default; private: virtual void make_row(PFS_account *pfs); diff --git a/storage/perfschema/table_all_instr.h b/storage/perfschema/table_all_instr.h index 7dfb27c6032..6895b0b2c47 100644 --- a/storage/perfschema/table_all_instr.h +++ b/storage/perfschema/table_all_instr.h @@ -84,8 +84,7 @@ protected: table_all_instr(const PFS_engine_table_share *share); public: - ~table_all_instr() - {} + ~table_all_instr() = default; protected: /** diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.h b/storage/perfschema/table_esgs_by_account_by_event_name.h index dd805f4d038..98bf82e2b96 100644 --- a/storage/perfschema/table_esgs_by_account_by_event_name.h +++ b/storage/perfschema/table_esgs_by_account_by_event_name.h @@ -105,8 +105,7 @@ protected: table_esgs_by_account_by_event_name(); public: - ~table_esgs_by_account_by_event_name() - {} + ~table_esgs_by_account_by_event_name() = default; protected: void make_row(PFS_account *account, PFS_stage_class *klass); diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.h b/storage/perfschema/table_esgs_by_host_by_event_name.h index 674b6bfb883..64349ecc7d9 100644 --- a/storage/perfschema/table_esgs_by_host_by_event_name.h +++ b/storage/perfschema/table_esgs_by_host_by_event_name.h @@ -105,8 +105,7 @@ protected: table_esgs_by_host_by_event_name(); public: - ~table_esgs_by_host_by_event_name() - {} + ~table_esgs_by_host_by_event_name() = default; protected: void make_row(PFS_host *host, PFS_stage_class *klass); diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.h b/storage/perfschema/table_esgs_by_thread_by_event_name.h index d009aabbdfc..4f32d76e256 100644 --- a/storage/perfschema/table_esgs_by_thread_by_event_name.h +++ b/storage/perfschema/table_esgs_by_thread_by_event_name.h @@ -109,8 +109,7 @@ protected: table_esgs_by_thread_by_event_name(); public: - ~table_esgs_by_thread_by_event_name() - {} + ~table_esgs_by_thread_by_event_name() = default; protected: void make_row(PFS_thread *thread, PFS_stage_class *klass); diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.h b/storage/perfschema/table_esgs_by_user_by_event_name.h index a62578ca9b6..3a211d19ad4 100644 --- a/storage/perfschema/table_esgs_by_user_by_event_name.h +++ b/storage/perfschema/table_esgs_by_user_by_event_name.h @@ -110,8 +110,7 @@ protected: table_esgs_by_user_by_event_name(); public: - ~table_esgs_by_user_by_event_name() - {} + ~table_esgs_by_user_by_event_name() = default; protected: void make_row(PFS_user *user, PFS_stage_class *klass); diff --git a/storage/perfschema/table_esgs_global_by_event_name.h b/storage/perfschema/table_esgs_global_by_event_name.h index ab70e8303ca..013e04308eb 100644 --- a/storage/perfschema/table_esgs_global_by_event_name.h +++ b/storage/perfschema/table_esgs_global_by_event_name.h @@ -76,8 +76,7 @@ protected: table_esgs_global_by_event_name(); public: - ~table_esgs_global_by_event_name() - {} + ~table_esgs_global_by_event_name() = default; protected: void make_row(PFS_stage_class *klass); diff --git a/storage/perfschema/table_esms_by_account_by_event_name.h b/storage/perfschema/table_esms_by_account_by_event_name.h index 1afe7cb09df..3ea7620204b 100644 --- a/storage/perfschema/table_esms_by_account_by_event_name.h +++ b/storage/perfschema/table_esms_by_account_by_event_name.h @@ -105,8 +105,7 @@ protected: table_esms_by_account_by_event_name(); public: - ~table_esms_by_account_by_event_name() - {} + ~table_esms_by_account_by_event_name() = default; protected: void make_row(PFS_account *account, PFS_statement_class *klass); diff --git a/storage/perfschema/table_esms_by_digest.h b/storage/perfschema/table_esms_by_digest.h index 27b916e66ac..d231d3388f8 100644 --- a/storage/perfschema/table_esms_by_digest.h +++ b/storage/perfschema/table_esms_by_digest.h @@ -78,8 +78,7 @@ protected: table_esms_by_digest(); public: - ~table_esms_by_digest() - {} + ~table_esms_by_digest() = default; protected: void make_row(PFS_statements_digest_stat*); diff --git a/storage/perfschema/table_esms_by_host_by_event_name.h b/storage/perfschema/table_esms_by_host_by_event_name.h index 2c47d4302b6..7c8c0e777e8 100644 --- a/storage/perfschema/table_esms_by_host_by_event_name.h +++ b/storage/perfschema/table_esms_by_host_by_event_name.h @@ -105,8 +105,7 @@ protected: table_esms_by_host_by_event_name(); public: - ~table_esms_by_host_by_event_name() - {} + ~table_esms_by_host_by_event_name() = default; protected: void make_row(PFS_host *host, PFS_statement_class *klass); diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.h b/storage/perfschema/table_esms_by_thread_by_event_name.h index e4100c076f6..e4b1ba63eb8 100644 --- a/storage/perfschema/table_esms_by_thread_by_event_name.h +++ b/storage/perfschema/table_esms_by_thread_by_event_name.h @@ -109,8 +109,7 @@ protected: table_esms_by_thread_by_event_name(); public: - ~table_esms_by_thread_by_event_name() - {} + ~table_esms_by_thread_by_event_name() = default; protected: void make_row(PFS_thread *thread, PFS_statement_class *klass); diff --git a/storage/perfschema/table_esms_by_user_by_event_name.h b/storage/perfschema/table_esms_by_user_by_event_name.h index 85399b18622..18516dfdb48 100644 --- a/storage/perfschema/table_esms_by_user_by_event_name.h +++ b/storage/perfschema/table_esms_by_user_by_event_name.h @@ -105,8 +105,7 @@ protected: table_esms_by_user_by_event_name(); public: - ~table_esms_by_user_by_event_name() - {} + ~table_esms_by_user_by_event_name() = default; protected: void make_row(PFS_user *user, PFS_statement_class *klass); diff --git a/storage/perfschema/table_esms_global_by_event_name.h b/storage/perfschema/table_esms_global_by_event_name.h index 780c7fa6e4f..67dd631c71c 100644 --- a/storage/perfschema/table_esms_global_by_event_name.h +++ b/storage/perfschema/table_esms_global_by_event_name.h @@ -76,8 +76,7 @@ protected: table_esms_global_by_event_name(); public: - ~table_esms_global_by_event_name() - {} + ~table_esms_global_by_event_name() = default; protected: void make_row(PFS_statement_class *klass); diff --git a/storage/perfschema/table_events_stages.h b/storage/perfschema/table_events_stages.h index 2ef37c16a11..b4941db54eb 100644 --- a/storage/perfschema/table_events_stages.h +++ b/storage/perfschema/table_events_stages.h @@ -107,8 +107,7 @@ protected: table_events_stages_common(const PFS_engine_table_share *share, void *pos); - ~table_events_stages_common() - {} + ~table_events_stages_common() = default; void make_row(PFS_events_stages *stage); @@ -138,8 +137,7 @@ protected: table_events_stages_current(); public: - ~table_events_stages_current() - {} + ~table_events_stages_current() = default; private: friend class table_events_stages_history; @@ -174,8 +172,7 @@ protected: table_events_stages_history(); public: - ~table_events_stages_history() - {} + ~table_events_stages_history() = default; private: /** Table share lock. */ @@ -207,8 +204,7 @@ protected: table_events_stages_history_long(); public: - ~table_events_stages_history_long() - {} + ~table_events_stages_history_long() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_events_statements.h b/storage/perfschema/table_events_statements.h index a7fb6fd0ec7..ca8bc804b01 100644 --- a/storage/perfschema/table_events_statements.h +++ b/storage/perfschema/table_events_statements.h @@ -190,8 +190,7 @@ protected: table_events_statements_common(const PFS_engine_table_share *share, void *pos); - ~table_events_statements_common() - {} + ~table_events_statements_common() = default; void make_row_part_1(PFS_events_statements *statement, sql_digest_storage *digest); @@ -225,8 +224,7 @@ protected: table_events_statements_current(); public: - ~table_events_statements_current() - {} + ~table_events_statements_current() = default; private: friend class table_events_statements_history; @@ -263,8 +261,7 @@ protected: table_events_statements_history(); public: - ~table_events_statements_history() - {} + ~table_events_statements_history() = default; private: /** Table share lock. */ @@ -298,8 +295,7 @@ protected: table_events_statements_history_long(); public: - ~table_events_statements_history_long() - {} + ~table_events_statements_history_long() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_events_waits.h b/storage/perfschema/table_events_waits.h index 926d54fd970..dcd0ea6231b 100644 --- a/storage/perfschema/table_events_waits.h +++ b/storage/perfschema/table_events_waits.h @@ -146,8 +146,7 @@ protected: table_events_waits_common(const PFS_engine_table_share *share, void *pos); - ~table_events_waits_common() - {} + ~table_events_waits_common() = default; void clear_object_columns(); int make_table_object_columns(PFS_events_waits *wait); @@ -182,8 +181,7 @@ protected: table_events_waits_current(); public: - ~table_events_waits_current() - {} + ~table_events_waits_current() = default; private: friend class table_events_waits_history; @@ -219,8 +217,7 @@ protected: table_events_waits_history(); public: - ~table_events_waits_history() - {} + ~table_events_waits_history() = default; private: /** Table share lock. */ @@ -253,8 +250,7 @@ protected: table_events_waits_history_long(); public: - ~table_events_waits_history_long() - {} + ~table_events_waits_history_long() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_events_waits_summary.h b/storage/perfschema/table_events_waits_summary.h index 0cc6f18be3c..a2b45c41fae 100644 --- a/storage/perfschema/table_events_waits_summary.h +++ b/storage/perfschema/table_events_waits_summary.h @@ -81,8 +81,7 @@ protected: table_events_waits_summary_by_instance(); public: - ~table_events_waits_summary_by_instance() - {} + ~table_events_waits_summary_by_instance() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_ews_by_account_by_event_name.h b/storage/perfschema/table_ews_by_account_by_event_name.h index 6ca0f2912bd..b50704e788b 100644 --- a/storage/perfschema/table_ews_by_account_by_event_name.h +++ b/storage/perfschema/table_ews_by_account_by_event_name.h @@ -116,8 +116,7 @@ protected: table_ews_by_account_by_event_name(); public: - ~table_ews_by_account_by_event_name() - {} + ~table_ews_by_account_by_event_name() = default; protected: void make_row(PFS_account *account, PFS_instr_class *klass); diff --git a/storage/perfschema/table_ews_by_host_by_event_name.h b/storage/perfschema/table_ews_by_host_by_event_name.h index ac07e698f13..0a554385511 100644 --- a/storage/perfschema/table_ews_by_host_by_event_name.h +++ b/storage/perfschema/table_ews_by_host_by_event_name.h @@ -116,8 +116,7 @@ protected: table_ews_by_host_by_event_name(); public: - ~table_ews_by_host_by_event_name() - {} + ~table_ews_by_host_by_event_name() = default; protected: void make_row(PFS_host *host, PFS_instr_class *klass); diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.h b/storage/perfschema/table_ews_by_thread_by_event_name.h index b811cd40962..9c526182bc8 100644 --- a/storage/perfschema/table_ews_by_thread_by_event_name.h +++ b/storage/perfschema/table_ews_by_thread_by_event_name.h @@ -115,8 +115,7 @@ protected: table_ews_by_thread_by_event_name(); public: - ~table_ews_by_thread_by_event_name() - {} + ~table_ews_by_thread_by_event_name() = default; protected: void make_row(PFS_thread *thread, PFS_instr_class *klass); diff --git a/storage/perfschema/table_ews_by_user_by_event_name.h b/storage/perfschema/table_ews_by_user_by_event_name.h index 2dc34203d9e..3a61c8bcd54 100644 --- a/storage/perfschema/table_ews_by_user_by_event_name.h +++ b/storage/perfschema/table_ews_by_user_by_event_name.h @@ -116,8 +116,7 @@ protected: table_ews_by_user_by_event_name(); public: - ~table_ews_by_user_by_event_name() - {} + ~table_ews_by_user_by_event_name() = default; protected: void make_row(PFS_user *user, PFS_instr_class *klass); diff --git a/storage/perfschema/table_ews_global_by_event_name.h b/storage/perfschema/table_ews_global_by_event_name.h index 811dfbb6812..46aad715c22 100644 --- a/storage/perfschema/table_ews_global_by_event_name.h +++ b/storage/perfschema/table_ews_global_by_event_name.h @@ -104,8 +104,7 @@ protected: table_ews_global_by_event_name(); public: - ~table_ews_global_by_event_name() - {} + ~table_ews_global_by_event_name() = default; protected: void make_mutex_row(PFS_mutex_class *klass); diff --git a/storage/perfschema/table_file_instances.h b/storage/perfschema/table_file_instances.h index adad5dadd06..6b8ffaeb591 100644 --- a/storage/perfschema/table_file_instances.h +++ b/storage/perfschema/table_file_instances.h @@ -74,8 +74,7 @@ private: table_file_instances(); public: - ~table_file_instances() - {} + ~table_file_instances() = default; private: void make_row(PFS_file *pfs); diff --git a/storage/perfschema/table_file_summary_by_event_name.h b/storage/perfschema/table_file_summary_by_event_name.h index 877adf9476a..0c2b592ab60 100644 --- a/storage/perfschema/table_file_summary_by_event_name.h +++ b/storage/perfschema/table_file_summary_by_event_name.h @@ -75,8 +75,7 @@ private: table_file_summary_by_event_name(); public: - ~table_file_summary_by_event_name() - {} + ~table_file_summary_by_event_name() = default; private: void make_row(PFS_file_class *klass); diff --git a/storage/perfschema/table_file_summary_by_instance.h b/storage/perfschema/table_file_summary_by_instance.h index 3b044fa064d..b8b2115aeed 100644 --- a/storage/perfschema/table_file_summary_by_instance.h +++ b/storage/perfschema/table_file_summary_by_instance.h @@ -83,8 +83,7 @@ private: table_file_summary_by_instance(); public: - ~table_file_summary_by_instance() - {} + ~table_file_summary_by_instance() = default; private: void make_row(PFS_file *pfs); diff --git a/storage/perfschema/table_host_cache.h b/storage/perfschema/table_host_cache.h index bb1cb444c33..482b8a2d66a 100644 --- a/storage/perfschema/table_host_cache.h +++ b/storage/perfschema/table_host_cache.h @@ -127,8 +127,7 @@ protected: table_host_cache(); public: - ~table_host_cache() - {} + ~table_host_cache() = default; private: void materialize(THD *thd); diff --git a/storage/perfschema/table_hosts.h b/storage/perfschema/table_hosts.h index 8262beabda5..cf94bdcbf79 100644 --- a/storage/perfschema/table_hosts.h +++ b/storage/perfschema/table_hosts.h @@ -67,8 +67,7 @@ protected: table_hosts(); public: - ~table_hosts() - {} + ~table_hosts() = default; private: virtual void make_row(PFS_host *pfs); diff --git a/storage/perfschema/table_os_global_by_type.h b/storage/perfschema/table_os_global_by_type.h index 8009d2125b3..632bed522ed 100644 --- a/storage/perfschema/table_os_global_by_type.h +++ b/storage/perfschema/table_os_global_by_type.h @@ -106,8 +106,7 @@ protected: table_os_global_by_type(); public: - ~table_os_global_by_type() - {} + ~table_os_global_by_type() = default; protected: void make_table_row(PFS_table_share *table_share); diff --git a/storage/perfschema/table_performance_timers.h b/storage/perfschema/table_performance_timers.h index 5479c6f577d..15bdb5bfa93 100644 --- a/storage/perfschema/table_performance_timers.h +++ b/storage/perfschema/table_performance_timers.h @@ -73,8 +73,7 @@ protected: table_performance_timers(); public: - ~table_performance_timers() - {} + ~table_performance_timers() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_session_account_connect_attrs.h b/storage/perfschema/table_session_account_connect_attrs.h index ea8d26b719b..d556394515c 100644 --- a/storage/perfschema/table_session_account_connect_attrs.h +++ b/storage/perfschema/table_session_account_connect_attrs.h @@ -43,8 +43,7 @@ protected: table_session_account_connect_attrs(); public: - ~table_session_account_connect_attrs() - {} + ~table_session_account_connect_attrs() = default; protected: virtual bool thread_fits(PFS_thread *thread); diff --git a/storage/perfschema/table_session_connect_attrs.h b/storage/perfschema/table_session_connect_attrs.h index c35f4b89f4e..f115ea1b168 100644 --- a/storage/perfschema/table_session_connect_attrs.h +++ b/storage/perfschema/table_session_connect_attrs.h @@ -43,8 +43,7 @@ protected: table_session_connect_attrs(); public: - ~table_session_connect_attrs() - {} + ~table_session_connect_attrs() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_setup_actors.h b/storage/perfschema/table_setup_actors.h index 758d3b22ef7..da5fdc37950 100644 --- a/storage/perfschema/table_setup_actors.h +++ b/storage/perfschema/table_setup_actors.h @@ -93,8 +93,7 @@ protected: table_setup_actors(); public: - ~table_setup_actors() - {} + ~table_setup_actors() = default; private: void make_row(PFS_setup_actor *actor); diff --git a/storage/perfschema/table_setup_consumers.h b/storage/perfschema/table_setup_consumers.h index 8c3479a88b1..c72108beb46 100644 --- a/storage/perfschema/table_setup_consumers.h +++ b/storage/perfschema/table_setup_consumers.h @@ -77,8 +77,7 @@ protected: table_setup_consumers(); public: - ~table_setup_consumers() - {} + ~table_setup_consumers() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_setup_instruments.h b/storage/perfschema/table_setup_instruments.h index 4b6ad9b46dd..ce979c40e48 100644 --- a/storage/perfschema/table_setup_instruments.h +++ b/storage/perfschema/table_setup_instruments.h @@ -115,8 +115,7 @@ protected: table_setup_instruments(); public: - ~table_setup_instruments() - {} + ~table_setup_instruments() = default; private: void make_row(PFS_instr_class *klass, bool update_enabled, bool update_timed); diff --git a/storage/perfschema/table_setup_objects.h b/storage/perfschema/table_setup_objects.h index 2d17e2e15ff..d6cb9bc30c3 100644 --- a/storage/perfschema/table_setup_objects.h +++ b/storage/perfschema/table_setup_objects.h @@ -92,8 +92,7 @@ protected: table_setup_objects(); public: - ~table_setup_objects() - {} + ~table_setup_objects() = default; private: void make_row(PFS_setup_object *pfs); diff --git a/storage/perfschema/table_setup_timers.h b/storage/perfschema/table_setup_timers.h index 68bf9a55130..9fff43c33a3 100644 --- a/storage/perfschema/table_setup_timers.h +++ b/storage/perfschema/table_setup_timers.h @@ -73,8 +73,7 @@ protected: table_setup_timers(); public: - ~table_setup_timers() - {} + ~table_setup_timers() = default; private: /** Table share lock. */ diff --git a/storage/perfschema/table_socket_instances.h b/storage/perfschema/table_socket_instances.h index 763860d08c1..fdd978b5c3a 100644 --- a/storage/perfschema/table_socket_instances.h +++ b/storage/perfschema/table_socket_instances.h @@ -86,8 +86,7 @@ private: table_socket_instances(); public: - ~table_socket_instances() - {} + ~table_socket_instances() = default; private: void make_row(PFS_socket *pfs); diff --git a/storage/perfschema/table_socket_summary_by_event_name.h b/storage/perfschema/table_socket_summary_by_event_name.h index f386d62f8ee..3a243572979 100644 --- a/storage/perfschema/table_socket_summary_by_event_name.h +++ b/storage/perfschema/table_socket_summary_by_event_name.h @@ -76,8 +76,7 @@ private: table_socket_summary_by_event_name(); public: - ~table_socket_summary_by_event_name() - {} + ~table_socket_summary_by_event_name() = default; private: void make_row(PFS_socket_class *socket_class); diff --git a/storage/perfschema/table_socket_summary_by_instance.h b/storage/perfschema/table_socket_summary_by_instance.h index c7712871c51..b8a08db3e36 100644 --- a/storage/perfschema/table_socket_summary_by_instance.h +++ b/storage/perfschema/table_socket_summary_by_instance.h @@ -79,8 +79,7 @@ private: table_socket_summary_by_instance(); public: - ~table_socket_summary_by_instance() - {} + ~table_socket_summary_by_instance() = default; private: void make_row(PFS_socket *pfs); diff --git a/storage/perfschema/table_sync_instances.h b/storage/perfschema/table_sync_instances.h index ce756cef50c..2682c7c88a8 100644 --- a/storage/perfschema/table_sync_instances.h +++ b/storage/perfschema/table_sync_instances.h @@ -78,8 +78,7 @@ private: table_mutex_instances(); public: - ~table_mutex_instances() - {} + ~table_mutex_instances() = default; private: void make_row(PFS_mutex *pfs); @@ -137,8 +136,7 @@ private: table_rwlock_instances(); public: - ~table_rwlock_instances() - {} + ~table_rwlock_instances() = default; private: void make_row(PFS_rwlock *pfs); @@ -190,8 +188,7 @@ private: table_cond_instances(); public: - ~table_cond_instances() - {} + ~table_cond_instances() = default; private: void make_row(PFS_cond *pfs); diff --git a/storage/perfschema/table_threads.h b/storage/perfschema/table_threads.h index 078dbbda5a9..ff9f7ccb2a3 100644 --- a/storage/perfschema/table_threads.h +++ b/storage/perfschema/table_threads.h @@ -110,8 +110,7 @@ protected: table_threads(); public: - ~table_threads() - {} + ~table_threads() = default; private: virtual void make_row(PFS_thread *pfs); diff --git a/storage/perfschema/table_tiws_by_index_usage.h b/storage/perfschema/table_tiws_by_index_usage.h index 64e08683b9b..5f0c85874bd 100644 --- a/storage/perfschema/table_tiws_by_index_usage.h +++ b/storage/perfschema/table_tiws_by_index_usage.h @@ -101,8 +101,7 @@ protected: table_tiws_by_index_usage(); public: - ~table_tiws_by_index_usage() - {} + ~table_tiws_by_index_usage() = default; protected: void make_row(PFS_table_share *table_share, uint index); diff --git a/storage/perfschema/table_tiws_by_table.h b/storage/perfschema/table_tiws_by_table.h index fed3b694fde..933a6164de9 100644 --- a/storage/perfschema/table_tiws_by_table.h +++ b/storage/perfschema/table_tiws_by_table.h @@ -76,8 +76,7 @@ protected: table_tiws_by_table(); public: - ~table_tiws_by_table() - {} + ~table_tiws_by_table() = default; protected: void make_row(PFS_table_share *table_share); diff --git a/storage/perfschema/table_tlws_by_table.h b/storage/perfschema/table_tlws_by_table.h index ba0668e5938..49188abd905 100644 --- a/storage/perfschema/table_tlws_by_table.h +++ b/storage/perfschema/table_tlws_by_table.h @@ -76,8 +76,7 @@ protected: table_tlws_by_table(); public: - ~table_tlws_by_table() - {} + ~table_tlws_by_table() = default; protected: void make_row(PFS_table_share *table_share); diff --git a/storage/perfschema/table_users.h b/storage/perfschema/table_users.h index 2adc77569d9..a81c143ae2e 100644 --- a/storage/perfschema/table_users.h +++ b/storage/perfschema/table_users.h @@ -67,8 +67,7 @@ protected: table_users(); public: - ~table_users() - {} + ~table_users() = default; private: virtual void make_row(PFS_user *pfs); diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake index fd23b7ba470..7ccd52283f3 100644 --- a/storage/rocksdb/build_rocksdb.cmake +++ b/storage/rocksdb/build_rocksdb.cmake @@ -129,10 +129,6 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64") ADD_DEFINITIONS(-DHAVE_POWER8 -DHAS_ALTIVEC) endif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64") -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64") - set(SYSTEM_LIBS ${SYSTEM_LIBS} -latomic) -endif() - option(WITH_FALLOCATE "build with fallocate" ON) if(WITH_FALLOCATE AND UNIX) @@ -161,9 +157,9 @@ include_directories(SYSTEM ${ROCKSDB_SOURCE_DIR}/third-party/gtest-1.7.0/fused-s find_package(Threads REQUIRED) if(WIN32) - set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib) + set(SYSTEM_LIBS ${SYSTEM_LIBS} ${ATOMIC_EXTRA_LIBS} Shlwapi.lib Rpcrt4.lib) else() - set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${CMAKE_DL_LIBS}) + set(SYSTEM_LIBS ${SYSTEM_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${CMAKE_DL_LIBS} ${ATOMIC_EXTRA_LIBS}) endif() set(ROCKSDB_LIBS rocksdblib}) diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index 3e165d89c92..8030a1e3453 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -2263,7 +2263,7 @@ static inline uint32_t rocksdb_perf_context_level(THD *const thd) { */ interface Rdb_tx_list_walker { - virtual ~Rdb_tx_list_walker() {} + virtual ~Rdb_tx_list_walker() = default; virtual void process_tran(const Rdb_transaction *const) = 0; }; diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h index c05fb5c56ee..8580dcbc2e5 100644 --- a/storage/rocksdb/ha_rocksdb.h +++ b/storage/rocksdb/ha_rocksdb.h @@ -1049,7 +1049,7 @@ struct Rdb_inplace_alter_ctx : public my_core::inplace_alter_handler_ctx { m_n_dropped_keys(n_dropped_keys), m_max_auto_incr(max_auto_incr) {} - ~Rdb_inplace_alter_ctx() {} + ~Rdb_inplace_alter_ctx() = default; private: /* Disable Copying */ diff --git a/storage/rocksdb/rdb_compact_filter.h b/storage/rocksdb/rdb_compact_filter.h index 1cd27273b56..93767b23787 100644 --- a/storage/rocksdb/rdb_compact_filter.h +++ b/storage/rocksdb/rdb_compact_filter.h @@ -204,9 +204,9 @@ class Rdb_compact_filter_factory : public rocksdb::CompactionFilterFactory { Rdb_compact_filter_factory(const Rdb_compact_filter_factory &) = delete; Rdb_compact_filter_factory &operator=(const Rdb_compact_filter_factory &) = delete; - Rdb_compact_filter_factory() {} + Rdb_compact_filter_factory() = default; - ~Rdb_compact_filter_factory() {} + ~Rdb_compact_filter_factory() = default; const char *Name() const override { return "Rdb_compact_filter_factory"; } diff --git a/storage/rocksdb/rdb_datadic.h b/storage/rocksdb/rdb_datadic.h index fb368a17fba..acff43ab565 100644 --- a/storage/rocksdb/rdb_datadic.h +++ b/storage/rocksdb/rdb_datadic.h @@ -1177,7 +1177,7 @@ class Rdb_seq_generator { interface Rdb_tables_scanner { virtual int add_table(Rdb_tbl_def * tdef) = 0; - virtual ~Rdb_tables_scanner() {} /* Keep the compiler happy */ + virtual ~Rdb_tables_scanner() = default; /* Keep the compiler happy */ }; /* @@ -1214,7 +1214,7 @@ class Rdb_ddl_manager { public: Rdb_ddl_manager(const Rdb_ddl_manager &) = delete; Rdb_ddl_manager &operator=(const Rdb_ddl_manager &) = delete; - Rdb_ddl_manager() {} + Rdb_ddl_manager() = default; /* Load the data dictionary from on-disk storage */ bool init(Rdb_dict_manager *const dict_arg, Rdb_cf_manager *const cf_manager, diff --git a/storage/rocksdb/rdb_mutex_wrapper.h b/storage/rocksdb/rdb_mutex_wrapper.h index 33eefe9d50c..fd0790aa8e6 100644 --- a/storage/rocksdb/rdb_mutex_wrapper.h +++ b/storage/rocksdb/rdb_mutex_wrapper.h @@ -122,7 +122,7 @@ class Rdb_mutex_factory : public rocksdb::TransactionDBMutexFactory { public: Rdb_mutex_factory(const Rdb_mutex_factory &) = delete; Rdb_mutex_factory &operator=(const Rdb_mutex_factory &) = delete; - Rdb_mutex_factory() {} + Rdb_mutex_factory() = default; /* Override parent class's virtual methods of interrest. */ @@ -137,7 +137,7 @@ class Rdb_mutex_factory : public rocksdb::TransactionDBMutexFactory { return std::make_shared<Rdb_cond_var>(); } - virtual ~Rdb_mutex_factory() override {} + virtual ~Rdb_mutex_factory() override = default; }; } // namespace myrocks diff --git a/storage/rocksdb/rdb_threads.h b/storage/rocksdb/rdb_threads.h index 7d89fe0616b..d23419df3b9 100644 --- a/storage/rocksdb/rdb_threads.h +++ b/storage/rocksdb/rdb_threads.h @@ -125,7 +125,7 @@ class Rdb_thread { void uninit(); - virtual ~Rdb_thread() {} + virtual ~Rdb_thread() = default; private: static void *thread_func(void *const thread_ptr); diff --git a/storage/sequence/sequence.cc b/storage/sequence/sequence.cc index f5a18094521..b2bce9325ac 100644 --- a/storage/sequence/sequence.cc +++ b/storage/sequence/sequence.cc @@ -382,7 +382,7 @@ public: // Reset limit because we are handling it now orig_lim->set_unlimited(); } - ~ha_seq_group_by_handler() {} + ~ha_seq_group_by_handler() = default; int init_scan() { first_row= 1 ; return 0; } int next_row(); int end_scan() { return 0; } diff --git a/storage/spider/hs_client/hstcpcli.hpp b/storage/spider/hs_client/hstcpcli.hpp index 6894716e469..aac02ce7f46 100644 --- a/storage/spider/hs_client/hstcpcli.hpp +++ b/storage/spider/hs_client/hstcpcli.hpp @@ -51,7 +51,7 @@ struct hstresult { }; struct hstcpcli_i { - virtual ~hstcpcli_i() { } + virtual ~hstcpcli_i() = default; virtual void close() = 0; virtual int reconnect() = 0; virtual bool stable_point() = 0; diff --git a/storage/spider/hs_client/util.hpp b/storage/spider/hs_client/util.hpp index 93d78cc7dc0..60b5441703d 100644 --- a/storage/spider/hs_client/util.hpp +++ b/storage/spider/hs_client/util.hpp @@ -13,7 +13,7 @@ namespace dena { /* boost::noncopyable */ struct noncopyable { - noncopyable() { } + noncopyable() = default; private: noncopyable(const noncopyable&); noncopyable& operator =(const noncopyable&); diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h index e04f67897dc..a7c9a571aef 100644 --- a/storage/spider/spd_db_include.h +++ b/storage/spider/spd_db_include.h @@ -822,8 +822,8 @@ class spider_db_util { public: uint dbton_id; - spider_db_util() {} - virtual ~spider_db_util() {} + spider_db_util() = default; + virtual ~spider_db_util() = default; virtual int append_name( spider_string *str, const char *name, @@ -970,7 +970,7 @@ public: uint dbton_id; SPIDER_DB_ROW *next_pos; spider_db_row(uint in_dbton_id) : dbton_id(in_dbton_id), next_pos(NULL) {} - virtual ~spider_db_row() {} + virtual ~spider_db_row() = default; virtual int store_to_field( Field *field, CHARSET_INFO *access_charset @@ -1002,8 +1002,8 @@ public: class spider_db_result_buffer { public: - spider_db_result_buffer() {} - virtual ~spider_db_result_buffer() {} + spider_db_result_buffer() = default; + virtual ~spider_db_result_buffer() = default; virtual void clear() = 0; virtual bool check_size( longlong size @@ -1016,7 +1016,7 @@ public: SPIDER_DB_CONN *db_conn; uint dbton_id; spider_db_result(SPIDER_DB_CONN *in_db_conn); - virtual ~spider_db_result() {} + virtual ~spider_db_result() = default; virtual void set_limit(longlong value) {} virtual bool has_result() = 0; virtual void free_result() = 0; @@ -1083,7 +1083,7 @@ public: spider_db_conn( SPIDER_CONN *in_conn ); - virtual ~spider_db_conn() {} + virtual ~spider_db_conn() = default; virtual int init() = 0; virtual void set_limit(longlong value) {} virtual bool is_connected() = 0; @@ -1310,7 +1310,7 @@ public: st_spider_share *share, uint dbton_id ) : dbton_id(dbton_id), spider_share(share) {} - virtual ~spider_db_share() {} + virtual ~spider_db_share() = default; virtual int init() = 0; virtual uint get_column_name_length( uint field_index @@ -1358,7 +1358,7 @@ public: spider_db_handler(ha_spider *spider, spider_db_share *db_share) : dbton_id(db_share->dbton_id), spider(spider), db_share(db_share), first_link_idx(-1) {} - virtual ~spider_db_handler() {} + virtual ~spider_db_handler() = default; virtual int init() = 0; virtual int append_index_hint( spider_string *str, @@ -1857,7 +1857,7 @@ public: spider_db_share *db_share; spider_db_copy_table(spider_db_share *db_share) : dbton_id(db_share->dbton_id), db_share(db_share) {} - virtual ~spider_db_copy_table() {} + virtual ~spider_db_copy_table() = default; virtual int init() = 0; virtual void set_sql_charset( CHARSET_INFO *cs diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index de59cfea264..221f81e18b0 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -33857,6 +33857,11 @@ create_tailoring(struct charset_info_st *cs, { src_uca= &my_uca_v520; cs->caseinfo= &my_unicase_unicode520; + if (cs->mbminlen == 1 && cs->mbmaxlen >=3) + { + cs->caseup_multiply= 2; + cs->casedn_multiply= 2; + } } else if (rules.version == 400) /* Unicode-4.0.0 requested */ { @@ -35689,8 +35694,8 @@ struct charset_info_st my_charset_utf8mb3_myanmar_uca_ci= NULL, /* state_map */ NULL, /* ident_map */ 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 3, /* mbmaxlen */ 9, /* min_sort_char */ @@ -35722,8 +35727,8 @@ struct charset_info_st my_charset_utf8mb3_unicode_520_ci= NULL, /* state_map */ NULL, /* ident_map */ 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 3, /* mbmaxlen */ 9, /* min_sort_char */ @@ -35754,8 +35759,8 @@ struct charset_info_st my_charset_utf8mb3_thai_520_w2= NULL, /* state_map */ NULL, /* ident_map */ 4, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 3, /* mbmaxlen */ 9, /* min_sort_char */ @@ -35852,8 +35857,8 @@ struct charset_info_st my_charset_utf8mb3_unicode_520_nopad_ci= NULL, /* state_map */ NULL, /* ident_map */ 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 3, /* mbmaxlen */ 9, /* min_sort_char */ @@ -36667,8 +36672,8 @@ struct charset_info_st my_charset_utf8mb4_myanmar_uca_ci= NULL, /* state_map */ NULL, /* ident_map */ 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 4, /* mbmaxlen */ 9, /* min_sort_char */ @@ -36699,8 +36704,8 @@ struct charset_info_st my_charset_utf8mb4_thai_520_w2= NULL, /* state_map */ NULL, /* ident_map */ 4, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 4, /* mbmaxlen */ 9, /* min_sort_char */ @@ -36731,8 +36736,8 @@ struct charset_info_st my_charset_utf8mb4_unicode_520_ci= NULL, /* state_map */ NULL, /* ident_map */ 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 4, /* mbmaxlen */ 9, /* min_sort_char */ @@ -36830,8 +36835,8 @@ struct charset_info_st my_charset_utf8mb4_unicode_520_nopad_ci= NULL, /* state_map */ NULL, /* ident_map */ 8, /* strxfrm_multiply */ - 1, /* caseup_multiply */ - 1, /* casedn_multiply */ + 2, /* caseup_multiply */ + 2, /* casedn_multiply */ 1, /* mbminlen */ 4, /* mbmaxlen */ 9, /* min_sort_char */ diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc index 5d01c588a88..507c6b9264f 100644 --- a/tpool/aio_linux.cc +++ b/tpool/aio_linux.cc @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/ # include <thread> # include <atomic> +# include <cstdio> # include <libaio.h> # include <sys/syscall.h> diff --git a/win/packaging/heidisql.cmake b/win/packaging/heidisql.cmake index b406e918b8f..45a407371ba 100644 --- a/win/packaging/heidisql.cmake +++ b/win/packaging/heidisql.cmake @@ -1,4 +1,4 @@ -SET(HEIDISQL_BASE_NAME "HeidiSQL_11.3_32_Portable") +SET(HEIDISQL_BASE_NAME "HeidiSQL_12.3_32_Portable") SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip") SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}") SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME}) diff --git a/win/packaging/heidisql.wxi.in b/win/packaging/heidisql.wxi.in index 58d95210783..831efb6971f 100644 --- a/win/packaging/heidisql.wxi.in +++ b/win/packaging/heidisql.wxi.in @@ -34,7 +34,6 @@ <Shortcut Id="startmenuHeidiSQL" Directory="ShortcutFolder" Name="HeidiSQL" Target="[D.HeidiSQL]\heidisql.exe"/> </Component> - <Component Id="component.HeidiSQL_libmysql.dll" Guid="*" Win64="no"> <File Id="heidisql.libmysql.dll" Name="libmysql.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libmysql.dll" /> </Component> @@ -63,6 +62,29 @@ <File Id="heidisql.sqlite3.dll" Name="sqlite3.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\sqlite3.dll" /> </Component> + <Component Id="component.HeidiSQL_fbclient_4.0.dll" Guid="*" Win64="no"> + <File Id="fbclient4.0.dll" Name="fbclient-4.0.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\fbclient-4.0.dll" /> + </Component> + <Component Id="component.HeidiSQL_gds32_14.1.dll" Guid="*" Win64="no"> + <File Id="gds32_14.1.dll" Name="gds32-14.1.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\gds32-14.1.dll" /> + </Component> + <Component Id="component.HeidiSQL_plink.exe" Guid="*" Win64="no"> + <File Id="plink.exe" Name="plink.exe" Source="${HEIDISQL_DOWNLOAD_DIR}\plink.exe" /> + </Component> + + <Component Id="component.HeidiSQL_LICENSE_openssl" Guid="*" Win64="no"> + <File Id="LICENSE_openssl" Name="LICENSE-openssl" Source="${HEIDISQL_DOWNLOAD_DIR}\LICENSE-openssl" /> + </Component> + + <?define functions_dblist=interbase;mariadb;mssql;mysql;postgresql;redshift;sqlite?> + + <?foreach db in $(var.functions_dblist) ?> + <Component Id="component.HeidiSQL_functions_$(var.db).ini" Guid="*" Win64="no"> + <File Id="functions_$(var.db).ini" Name="functions-$(var.db).ini" + Source="${HEIDISQL_DOWNLOAD_DIR}\functions-$(var.db).ini" /> + </Component> + <?endforeach?> + <Directory Id="D.HeidiSQL.plugins" Name="plugins"> <?foreach dll in $(var.pluginlist) ?> <Component Id="component.HeidiSQL_$(var.dll)" Guid="*" Win64="no"> @@ -91,6 +113,13 @@ <ComponentRef Id="component.HeidiSQL_libiconv_2.dll" /> <ComponentRef Id="component.HeidiSQL_sqlite3.dll" /> <ComponentRef Id="component.HeidiSQL_libmysql_6.1.dll" /> + <ComponentRef Id="component.HeidiSQL_fbclient_4.0.dll" /> + <ComponentRef Id="component.HeidiSQL_gds32_14.1.dll" /> + <ComponentRef Id="component.HeidiSQL_plink.exe" /> + <ComponentRef Id="component.HeidiSQL_LICENSE_openssl" /> + <?foreach db in $(var.functions_dblist) ?> + <ComponentRef Id="component.HeidiSQL_functions_$(var.db).ini" /> + <?endforeach?> <?foreach dll in $(var.pluginlist)?> <ComponentRef Id="component.HeidiSQL_$(var.dll)" /> <?endforeach?> |