From f6663bfbd3f1dd321cd7d53291e3fa08a190ab2f Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Tue, 11 Feb 2020 00:19:37 +0400 Subject: MDEV-17941 ALTER USER IF EXISTS does not work, although documentation says it should. Mistake in syntax definition fixed - should be ALTER USER IF EXISTS, not ALTER IF EXISTS USER. --- mysql-test/r/alter_user.result | 2 +- mysql-test/t/alter_user.test | 2 +- sql/sql_yacc.yy | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/alter_user.result b/mysql-test/r/alter_user.result index ac668bba8fa..b67705c4fc4 100644 --- a/mysql-test/r/alter_user.result +++ b/mysql-test/r/alter_user.result @@ -43,7 +43,7 @@ SET GLOBAL read_only = @start_read_only; alter user boo; ERROR HY000: Operation ALTER USER failed for 'boo' #--warning ER_CANNOT_USER -alter if exists user boo; +alter user if exists boo; Warnings: Error 1133 Can't find any matching row in the user table Note 1396 Operation ALTER USER failed for 'boo' diff --git a/mysql-test/t/alter_user.test b/mysql-test/t/alter_user.test index ca444f70a70..3a1052a98f6 100644 --- a/mysql-test/t/alter_user.test +++ b/mysql-test/t/alter_user.test @@ -41,7 +41,7 @@ SET GLOBAL read_only = @start_read_only; --error ER_CANNOT_USER alter user boo; --echo #--warning ER_CANNOT_USER -alter if exists user boo; +alter user if exists boo; --echo # Test password related altering. alter user foo identified by 'something'; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index fe7f3021be6..386c86cb3e2 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7294,10 +7294,10 @@ alter: lex->server_options.reset($3); } OPTIONS_SYM '(' server_options_list ')' { } /* ALTER USER foo is allowed for MySQL compatibility. */ - | ALTER opt_if_exists USER_SYM clear_privileges grant_list + | ALTER USER_SYM opt_if_exists clear_privileges grant_list opt_require_clause opt_resource_options { - Lex->create_info.set($2); + Lex->create_info.set($3); Lex->sql_command= SQLCOM_ALTER_USER; } ; -- cgit v1.2.1 From a6b92690e612bf88b2c042b33878c04fec5c50ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 12 Feb 2020 10:32:30 +0200 Subject: MDEV-21556 : galera.lp1376747-4 MTR failed: Result length mismatch Add proper wait condition instead of sleeps. --- mysql-test/suite/galera/t/lp1376747-4.test | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-test/suite/galera/t/lp1376747-4.test index 0c707d6d681..6ae89fe9df4 100644 --- a/mysql-test/suite/galera/t/lp1376747-4.test +++ b/mysql-test/suite/galera/t/lp1376747-4.test @@ -27,25 +27,24 @@ INSERT INTO t1 VALUES (2,3); --connection node_2a SET session wsrep_sync_wait=0; SET session wsrep_causal_reads=OFF; + SHOW CREATE TABLE t1; ---sleep 1 --send FLUSH TABLES t1 WITH READ LOCK; --connection node_2 -# let the flush table wait in pause state before we unlock -# table otherwise there is window where-in flush table is -# yet to wait in pause and unlock allows alter table to proceed. -# this is because send in asynchronous. ---sleep 3 -# this will release existing lock but will not resume -# the cluster as there is new FTRL that is still pausing it. +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%'; +--source include/wait_condition.inc + UNLOCK TABLES; SHOW CREATE TABLE t1; --connection node_2a --reap UNLOCK TABLES; ---sleep 2 + +--let $wait_condition = SELECT COUNT(*) = 2 FROM t1; +--source include/wait_condition.inc + SHOW CREATE TABLE t1; SELECT * from t1; -- cgit v1.2.1 From be77fa914c30e92e33e60feb5a3e098c765798af Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 12 Feb 2020 14:30:31 +0100 Subject: MDEV-21646: Failure to compile my_addr_resolve.c with binutils-2.34 Emulate older API --- mysys/my_addr_resolve.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mysys/my_addr_resolve.c b/mysys/my_addr_resolve.c index 7b14a561ba5..d318f6bf965 100644 --- a/mysys/my_addr_resolve.c +++ b/mysys/my_addr_resolve.c @@ -49,6 +49,18 @@ static const char *strip_path(const char *s) static bfd *bfdh= 0; static asymbol **symtable= 0; +#ifndef bfd_get_section_flags +#define bfd_get_section_flags(H, S) bfd_section_flags(S) +#endif /* bfd_get_section_flags */ + +#ifndef bfd_get_section_size +#define bfd_get_section_size(S) bfd_section_size(S) +#endif /* bfd_get_section_size */ + +#ifndef bfd_get_section_vma +#define bfd_get_section_vma(H, S) bfd_section_vma(S) +#endif /* bfd_get_section_vma */ + /** finds a file name, a line number, and a function name corresponding to addr. -- cgit v1.2.1 From 6c1e0c0493f09205bf9cd83c51c881e06d0e1305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 13 Feb 2020 10:30:40 +0200 Subject: MDEV-21421 : Galera test sporadic failure on galera.galera_as_slave_gtid_myisam: Result length mismatch In Galera 3 nodes 2 and 3 are galera nodes and node_1 should be non galera. --- mysql-test/suite/galera/disabled.def | 1 - mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result | 3 +++ mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 6f0f1fbdde5..f7ba0b3c08c 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -15,7 +15,6 @@ MW-328A : MDEV-21483 galera.MW-328A galera.MW-328B MW-328B : MDEV-21483 galera.MW-328A galera.MW-328B MW-329 : MDEV-19962 Galera test failure on MW-329 galera.galera_defaults : MDEV-21494 Galera test sporadic failure on galera.galera_defaults -galera_as_slave_gtid_myisam : MDEV-21421 galera.galera_as_slave_gtid_myisam galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event() galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result index 0e5c6425d6a..d8a9f0d6f57 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result @@ -1,4 +1,7 @@ connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +SELECT @@WSREP_ON; +@@WSREP_ON +0 connection node_2; ALTER TABLE mysql.gtid_slave_pos engine = InnoDB; START SLAVE; diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test index faa9ddfd5c8..33668da11be 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test @@ -16,6 +16,7 @@ # As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc --connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 --source include/galera_cluster.inc +SELECT @@WSREP_ON; --connection node_2 # make sure gtid_slave_pos is of innodb engine, mtr does not currently provide that -- cgit v1.2.1 From ed10a8cd97ab227e32c3218c538baac3e5735c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 13 Feb 2020 12:51:50 +0200 Subject: MDEV-21515 : Galera test sporadic failure on galera.galera_wsrep_new_cluster: Result content mismatch Use correct configuration and wait for nodes to reach correct state with wait conditions. --- .../suite/galera/r/galera_wsrep_new_cluster.result | 2 +- .../galera/t/galera_wsrep_new_cluster-master.opt | 1 + .../suite/galera/t/galera_wsrep_new_cluster.cnf | 10 --------- .../suite/galera/t/galera_wsrep_new_cluster.test | 26 ++++++++++++++++++++++ 4 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt delete mode 100644 mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf diff --git a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result index 24484fb66d2..ca388496794 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result +++ b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result @@ -25,7 +25,7 @@ VARIABLE_VALUE = 'ON' 1 SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; VARIABLE_VALUE = 0 -0 +1 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; VARIABLE_VALUE = 'ON' 1 diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt b/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt new file mode 100644 index 00000000000..c31150c46af --- /dev/null +++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt @@ -0,0 +1 @@ +--wsrep-new-cluster diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf deleted file mode 100644 index 0acbcfb7843..00000000000 --- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf +++ /dev/null @@ -1,10 +0,0 @@ -!include ../galera_2nodes.cnf - -[mysqld.1] -wsrep-new-cluster - -[mysqld.2] - - - - diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test index 6ba8ce786c8..59350222a4c 100644 --- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test +++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test @@ -7,6 +7,19 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'on' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc + SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; @@ -16,6 +29,19 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR --connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'on' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc + SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; -- cgit v1.2.1 From 1f0e72f874bde5096a5c5c22e320a7723ff66b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 12 Feb 2020 10:44:46 +0200 Subject: Deb: Remove unnecessary manual libzstd1 dependency from RocksDB plugin The Debian build tools add all run-time dependencies automatically. For the mariadb-rocksdb-plugin the "${misc:Depends}, ${shlibs:Depends}" will become (based on the build dependencies at build time): Depends: mariadb-server-10.4 (= 1:10.4.12-1), rocksdb-tools, libc6 (>= 2.29), liblz4-1 (>= 0.0~r130), libsnappy1v5 (>= 1.1.8), libstdc++6 (>= 7), libzstd1 (>= 1.3.3), zlib1g (>= 1:1.1.4) There is no need to manually add run-time build dependencies. Only external dependencies need to be defined, for example rocksdb-tools could come in question for mariadb-plugin-rocksdb, and it will be eventually added when downstream official Debian packaging is merged upstream in a later commit. --- debian/autobake-deb.sh | 1 - debian/control | 1 - 2 files changed, 2 deletions(-) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 4dba4de26b7..919dbd61c4f 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -77,7 +77,6 @@ fi if ! apt-cache madison libzstd-dev | grep 'libzstd-dev' >/dev/null 2>&1 then sed '/libzstd-dev/d' -i debian/control - sed '/libzstd1/d' -i debian/control fi # The binaries should be fully hardened by default. However TokuDB compilation seems to fail on diff --git a/debian/control b/debian/control index 8896f4d1dcd..b4447c71580 100644 --- a/debian/control +++ b/debian/control @@ -538,7 +538,6 @@ Description: Connect storage engine for MariaDB Package: mariadb-plugin-rocksdb Architecture: amd64 arm64 mips64el ppc64el Depends: mariadb-server-10.3 (= ${binary:Version}), - libzstd1, ${misc:Depends}, ${shlibs:Depends} Breaks: mariadb-rocksdb-engine-10.2, -- cgit v1.2.1 From 85d4a45d15078512562d84273f489e8d225c1da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Sun, 9 Feb 2020 22:27:51 +0200 Subject: Deb: Run 'wrap-and-sort -a' so comparison across releases is easier No functional changes. Apply this in 10.3 so eventually it is merged to 10.4 and 10.5, which in turn will have separate wrap-and-sort runs but only for new lines, and not affecting badly next merges from 10.3 to 10.4 to 10.5. Also remove a duplicate line that was found thanks to wrap-and-sort. --- debian/control | 7 ++++--- debian/libmariadb3.install | 1 - debian/libmariadbd-dev.install | 4 ++-- debian/mariadb-plugin-rocksdb.install | 2 +- debian/mariadb-server-10.3.install | 4 ++-- debian/mariadb-test-data.install | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/debian/control b/debian/control index b4447c71580..18fea70f073 100644 --- a/debian/control +++ b/debian/control @@ -234,7 +234,8 @@ Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf) Package: mariadb-client-core-10.3 Architecture: any -Depends: mariadb-common (>= ${source:Version}), libmariadb3, +Depends: libmariadb3, + mariadb-common (>= ${source:Version}), ${misc:Depends}, ${shlibs:Depends} Conflicts: mariadb-client-10.0, @@ -569,8 +570,8 @@ Description: OQGraph storage engine for MariaDB Package: mariadb-plugin-tokudb Architecture: amd64 -Depends: mariadb-server-10.3 (= ${binary:Version}), - libjemalloc1 (>= 3.0.0~) | libjemalloc2, +Depends: libjemalloc1 (>= 3.0.0~) | libjemalloc2, + mariadb-server-10.3 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Breaks: mariadb-server-10.0, diff --git a/debian/libmariadb3.install b/debian/libmariadb3.install index 9783e7b0b01..8636166a493 100644 --- a/debian/libmariadb3.install +++ b/debian/libmariadb3.install @@ -3,4 +3,3 @@ usr/lib/mysql/plugin/client_ed25519.so usr/lib/mysql/plugin/dialog.so usr/lib/mysql/plugin/mysql_clear_password.so usr/lib/mysql/plugin/sha256_password.so -usr/lib/mysql/plugin/client_ed25519.so diff --git a/debian/libmariadbd-dev.install b/debian/libmariadbd-dev.install index 2c14af5ab31..13d961409cc 100644 --- a/debian/libmariadbd-dev.install +++ b/debian/libmariadbd-dev.install @@ -1,4 +1,4 @@ -usr/lib/*/libmysqld.a usr/lib/*/libmariadbd.a -usr/lib/*/libmysqld.so usr/lib/*/libmariadbd.so +usr/lib/*/libmysqld.a +usr/lib/*/libmysqld.so diff --git a/debian/mariadb-plugin-rocksdb.install b/debian/mariadb-plugin-rocksdb.install index b9a6f7dc432..403c7f291b6 100644 --- a/debian/mariadb-plugin-rocksdb.install +++ b/debian/mariadb-plugin-rocksdb.install @@ -1,5 +1,5 @@ etc/mysql/conf.d/rocksdb.cnf etc/mysql/mariadb.conf.d -usr/bin/mysql_ldb usr/bin/myrocks_hotbackup +usr/bin/mysql_ldb usr/bin/sst_dump usr/lib/mysql/plugin/ha_rocksdb.so diff --git a/debian/mariadb-server-10.3.install b/debian/mariadb-server-10.3.install index eca7d572251..7cd81e785bf 100644 --- a/debian/mariadb-server-10.3.install +++ b/debian/mariadb-server-10.3.install @@ -4,8 +4,8 @@ debian/additions/echo_stderr usr/share/mysql debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d etc/apparmor.d/usr.sbin.mysqld etc/security/user_map.conf -lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf lib/*/security/pam_user_map.so +lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf usr/bin/aria_chk usr/bin/aria_dump_log usr/bin/aria_ftdump @@ -88,9 +88,9 @@ usr/share/man/man1/replace.1 usr/share/man/man1/resolve_stack_dump.1 usr/share/man/man1/resolveip.1 usr/share/man/man1/wsrep_sst_common.1 +usr/share/man/man1/wsrep_sst_mariabackup.1 usr/share/man/man1/wsrep_sst_mysqldump.1 usr/share/man/man1/wsrep_sst_rsync.1 -usr/share/man/man1/wsrep_sst_mariabackup.1 usr/share/mysql/errmsg-utf8.txt usr/share/mysql/fill_help_tables.sql usr/share/mysql/maria_add_gis_sp_bootstrap.sql diff --git a/debian/mariadb-test-data.install b/debian/mariadb-test-data.install index 9e5356d061f..26b69c2941b 100644 --- a/debian/mariadb-test-data.install +++ b/debian/mariadb-test-data.install @@ -1,7 +1,7 @@ usr/share/mysql/mysql-test/collections usr/share/mysql/mysql-test/include -usr/share/mysql/mysql-test/plugin usr/share/mysql/mysql-test/main +usr/share/mysql/mysql-test/plugin usr/share/mysql/mysql-test/std_data usr/share/mysql/mysql-test/suite usr/share/mysql/mysql-test/unstable-tests -- cgit v1.2.1 From 93dc3e2652634dc99bcd715ebf1e020614dfef9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 13 Feb 2020 13:33:41 +0200 Subject: MDEV-21488 : Galera test sporadic failure on galera.galera_var_notify_cmd Add wait condition and cleanup. --- mysql-test/suite/galera/disabled.def | 1 - mysql-test/suite/galera/r/galera_var_notify_cmd.result | 16 ++++++++-------- .../suite/galera/t/galera_var_notify_cmd-master.opt | 1 + mysql-test/suite/galera/t/galera_var_notify_cmd.cnf | 13 ------------- mysql-test/suite/galera/t/galera_var_notify_cmd.test | 14 ++++++++++---- 5 files changed, 19 insertions(+), 26 deletions(-) create mode 100644 mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt delete mode 100644 mysql-test/suite/galera/t/galera_var_notify_cmd.cnf diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index f7ba0b3c08c..bd505bfc490 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -30,7 +30,6 @@ galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encr galera_sst_mariabackup_table_options: MDEV-19741 Galera test failure on galera.galera_sst_mariabackup_table_options galera_var_innodb_disallow_writes : MDEV-20928 galera.galera_var_innodb_disallow_writes galera_var_node_address : MDEV-20485 Galera test failure -galera_var_notify_cmd : MDEV-21488 galera.galera_var_notify_cmd galera_wan : MDEV-17259 Test failure on galera.galera_wan mysql-wsrep#33 : MDEV-21420 galera.mysql-wsrep#33 partition : MDEV-19958 Galera test failure on galera.partition diff --git a/mysql-test/suite/galera/r/galera_var_notify_cmd.result b/mysql-test/suite/galera/r/galera_var_notify_cmd.result index 2b390d0db8d..823407fbba7 100644 --- a/mysql-test/suite/galera/r/galera_var_notify_cmd.result +++ b/mysql-test/suite/galera/r/galera_var_notify_cmd.result @@ -1,11 +1,11 @@ connection node_1; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership; -COUNT(DISTINCT uuid) +SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership; +EXPECT_2 2 -SELECT MAX(size) FROM mtr_wsrep_notify.status; -MAX(size) +SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status; +EXPECT_2 2 -SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status; -COUNT(DISTINCT idx) -1 +SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status; +EXPECT_2 +2 +DROP SCHEMA mtr_wsrep_notify; diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt b/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt new file mode 100644 index 00000000000..70dfc98736b --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt @@ -0,0 +1 @@ +--wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh --wsrep-sync-wait=0 diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf b/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf deleted file mode 100644 index 69df4f0e7e0..00000000000 --- a/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf +++ /dev/null @@ -1,13 +0,0 @@ -!include ../galera_2nodes.cnf - -[mysqld.1] -wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh -wsrep-sync-wait=0 - -[mysqld.2] - - - - - - diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd.test b/mysql-test/suite/galera/t/galera_var_notify_cmd.test index 2b0852b4870..fda61bf2914 100644 --- a/mysql-test/suite/galera/t/galera_var_notify_cmd.test +++ b/mysql-test/suite/galera/t/galera_var_notify_cmd.test @@ -4,9 +4,15 @@ # --source include/galera_cluster.inc +--source include/force_restart.inc --connection node_1 -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership; -SELECT MAX(size) FROM mtr_wsrep_notify.status; -SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status; +--let $wait_condition = SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership; +--source include/wait_condition.inc + +SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership; +SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status; +SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status; + +# CLEANUP +DROP SCHEMA mtr_wsrep_notify; -- cgit v1.2.1 From 959fc0c0ccaac0c0946a9c07bceb9b82116c8b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 17 Feb 2020 14:01:16 +0200 Subject: MDEV-21591 : galera.galera_rsu_add_pk MTR failed: Result content mismatch Add missing wait condition before we check the end database state. --- mysql-test/suite/galera/r/galera_rsu_add_pk.result | 24 +++++++++++----------- mysql-test/suite/galera/t/galera_rsu_add_pk.test | 14 +++++++++---- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_rsu_add_pk.result b/mysql-test/suite/galera/r/galera_rsu_add_pk.result index 4c79da154e2..2df08c3e4ff 100644 --- a/mysql-test/suite/galera/r/galera_rsu_add_pk.result +++ b/mysql-test/suite/galera/r/galera_rsu_add_pk.result @@ -9,19 +9,19 @@ SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); SET SESSION wsrep_OSU_method = "TOI"; INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +EXPECT_300000 +300000 +SELECT MAX(f1) AS EXPECT_299999 FROM t1; +EXPECT_299999 +299999 connection node_1; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +EXPECT_300000 +300000 +SELECT MAX(f1) AS EXPECT_299999 FROM t1; +EXPECT_299999 +299999 SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); SET SESSION wsrep_OSU_method = "TOI"; diff --git a/mysql-test/suite/galera/t/galera_rsu_add_pk.test b/mysql-test/suite/galera/t/galera_rsu_add_pk.test index 7db990d7be1..094048f6caa 100644 --- a/mysql-test/suite/galera/t/galera_rsu_add_pk.test +++ b/mysql-test/suite/galera/t/galera_rsu_add_pk.test @@ -26,14 +26,20 @@ SET SESSION wsrep_OSU_method = "TOI"; # Insert values after the ALTER INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +SELECT MAX(f1) AS EXPECT_299999 FROM t1; --connection node_1 --reap -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; + +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +SELECT MAX(f1) AS EXPECT_299999 FROM t1; SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); -- cgit v1.2.1 From affe7fabc7baa36083e7632eb6c3611578d74b48 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Wed, 19 Feb 2020 21:27:38 +0300 Subject: MDEV-21628: Index condition pushdown condition ... not used with BKA (Backport to 10.3) Partitioning storage now supports MRR but doesn't support Index Condition Pushdown (aka ICP). This causes counter-intuitive query plans for queries that use BKA and conditions that depend on index fields: - If the condition refers to other tables, BKA's variant of ICP is used to handle it. - If the condition depends on this table only, the optimizer will try to use regular ICP for it, which will fail because the storage engine doesn't support ICP. Make the optimizer be smarter in the second case: if we were not able to use regular ICP, use BKA's variant of ICP.. --- mysql-test/main/partition_mrr_myisam.result | 59 +++++++++++++++++++++++++++++ mysql-test/main/partition_mrr_myisam.test | 59 +++++++++++++++++++++++++++++ sql/opt_index_cond_pushdown.cc | 15 ++++++++ 3 files changed, 133 insertions(+) diff --git a/mysql-test/main/partition_mrr_myisam.result b/mysql-test/main/partition_mrr_myisam.result index 1f1cea8e9d6..d989536324c 100644 --- a/mysql-test/main/partition_mrr_myisam.result +++ b/mysql-test/main/partition_mrr_myisam.result @@ -77,3 +77,62 @@ ID part_id key_col col2 28 8 2 123456 29 9 2 123456 drop table t1,t3; +# +# MDEV-21628: Index condition pushdown for a simple condition over +# index fields is not used for ref access of partitioned tables when employing BKA +# +create table t0 ( +tp int, a int, b int, c varchar(12), index idx (a,b) +); +insert into t0 values +(1,3,30,'yyzy'), (1,3,30,'yxxyy'), (1,3,30,'yyxy'), (1,3,30,'xxyy'), +(1,3,30,'yyxz'), (1,3,30,'yyzz'), (1,3,30,'xxyzy'), (1,3,30,'yyyy'), +(1,3,30,'yzzy'), (1,93,30,'zzzy'), +(2,3,40,'yxx'), (2,4,40,'xx'), (2,3,10,'zxz'), +(2,3,40,'yyx'), (2,4,40,'xxx'), (2,3,10,'zyyz'), +(2,3,40,'xzzzz'), (2,4,40,'yyyxx'), (2,3,10,'zyz'), +(2,3,40,'xxx'), (2,4,40,'xx'), (2,3,10,'zzz'), +(2,3,40,'yyxzx'), (2,4,40,'xyx'), (2,3,10,'xzz'), +(2,3,40,'xxxzz'), (2,4,40,'xxz'), (2,3,10,'zzzy'), +(2,3,40,'zzxxx'), (2,4,40,'zxx'), (2,3,10,'yzzz'), +(2,3,40,'xyyxx'), (2,4,40,'xzzzx'), (2,3,10,'zzxxz'), +(2,3,40,'yzxxx'), (2,4,40,'xxzy'), (2,3,10,'zzzyx'), +(2,93,40,'xzx'), (2,94,40,'xz'), (2,93,10,'zyyyz'), +(3,4,30,'yx'), (3,4,30,'yyxxx'), (3,4,30,'zzyy'), (3,4,30,'zxyy'), +(3,4,30,'xxyy'), (3,4,30,'yyzx'), (3,4,30,'zyyy'), (3,4,30,'yzy'), +(3,4,30,'zzzyy'), (3,94,30,'yyz'); +create table t1 ( +tp int, a int, b int, c varchar(12), index idx (a,b) +) engine=myisam +partition by list (tp) +( partition p1 values in (1), +partition p2 values in (2), +partition p3 values in (3)); +insert into t1 select * from t0; +create table t2 (a int, index idx(a)) engine=myisam; +insert into t2 values (1), (2), (3), (4), (5); +insert into t2 select a+10 from t2; +insert into t2 select a+20 from t2; +analyze table t0,t1,t2; +Table Op Msg_type Msg_text +test.t0 analyze status Engine-independent statistics collected +test.t0 analyze status OK +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 +set @tmp1=@@join_cache_level, @tmp2=@@optimizer_switch; +set join_cache_level=6, optimizer_switch='mrr=on'; +explain +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 12 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan +# This will use "Using index condition(BKA)" +explain +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 12 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +set join_cache_level=@tmp1, optimizer_switch=@tmp2; +drop table t0,t1,t2; diff --git a/mysql-test/main/partition_mrr_myisam.test b/mysql-test/main/partition_mrr_myisam.test index d67a37ab3d2..eb30319d81f 100644 --- a/mysql-test/main/partition_mrr_myisam.test +++ b/mysql-test/main/partition_mrr_myisam.test @@ -1,3 +1,62 @@ let $engine_type= myisam; --source include/partition_mrr.inc + +--echo # +--echo # MDEV-21628: Index condition pushdown for a simple condition over +--echo # index fields is not used for ref access of partitioned tables when employing BKA +--echo # + +create table t0 ( +tp int, a int, b int, c varchar(12), index idx (a,b) +); + +insert into t0 values +(1,3,30,'yyzy'), (1,3,30,'yxxyy'), (1,3,30,'yyxy'), (1,3,30,'xxyy'), +(1,3,30,'yyxz'), (1,3,30,'yyzz'), (1,3,30,'xxyzy'), (1,3,30,'yyyy'), +(1,3,30,'yzzy'), (1,93,30,'zzzy'), +(2,3,40,'yxx'), (2,4,40,'xx'), (2,3,10,'zxz'), +(2,3,40,'yyx'), (2,4,40,'xxx'), (2,3,10,'zyyz'), +(2,3,40,'xzzzz'), (2,4,40,'yyyxx'), (2,3,10,'zyz'), +(2,3,40,'xxx'), (2,4,40,'xx'), (2,3,10,'zzz'), +(2,3,40,'yyxzx'), (2,4,40,'xyx'), (2,3,10,'xzz'), +(2,3,40,'xxxzz'), (2,4,40,'xxz'), (2,3,10,'zzzy'), +(2,3,40,'zzxxx'), (2,4,40,'zxx'), (2,3,10,'yzzz'), +(2,3,40,'xyyxx'), (2,4,40,'xzzzx'), (2,3,10,'zzxxz'), +(2,3,40,'yzxxx'), (2,4,40,'xxzy'), (2,3,10,'zzzyx'), +(2,93,40,'xzx'), (2,94,40,'xz'), (2,93,10,'zyyyz'), +(3,4,30,'yx'), (3,4,30,'yyxxx'), (3,4,30,'zzyy'), (3,4,30,'zxyy'), +(3,4,30,'xxyy'), (3,4,30,'yyzx'), (3,4,30,'zyyy'), (3,4,30,'yzy'), +(3,4,30,'zzzyy'), (3,94,30,'yyz'); + +create table t1 ( +tp int, a int, b int, c varchar(12), index idx (a,b) +) engine=myisam +partition by list (tp) +( partition p1 values in (1), + partition p2 values in (2), + partition p3 values in (3)); +insert into t1 select * from t0; + +create table t2 (a int, index idx(a)) engine=myisam; +insert into t2 values (1), (2), (3), (4), (5); +insert into t2 select a+10 from t2; +insert into t2 select a+20 from t2; + +analyze table t0,t1,t2; + +set @tmp1=@@join_cache_level, @tmp2=@@optimizer_switch; +set join_cache_level=6, optimizer_switch='mrr=on'; + +explain +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; + +--echo # This will use "Using index condition(BKA)" +explain +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; + +set join_cache_level=@tmp1, optimizer_switch=@tmp2; + +drop table t0,t1,t2; + + diff --git a/sql/opt_index_cond_pushdown.cc b/sql/opt_index_cond_pushdown.cc index 8f3f9cdac72..af6a75cdef2 100644 --- a/sql/opt_index_cond_pushdown.cc +++ b/sql/opt_index_cond_pushdown.cc @@ -393,8 +393,23 @@ void push_index_cond(JOIN_TAB *tab, uint keyno) ~(tab->table->map | tab->join->const_table_map))) tab->cache_idx_cond= idx_cond; else + { idx_remainder_cond= tab->table->file->idx_cond_push(keyno, idx_cond); + /* + If (1) there is an index condition that we couldn't push using ICP, + (2) we are using Join Buffering + (3) and we are using BKA + then use BKA's Index Condition Pushdown mechanism to check it. + */ + if (idx_remainder_cond && tab->use_join_cache && // (1) && (2) + tab->icp_other_tables_ok) // (3) + { + tab->cache_idx_cond= idx_remainder_cond; + idx_remainder_cond= NULL; + } + } + /* Disable eq_ref's "lookup cache" if we've pushed down an index condition. -- cgit v1.2.1 From fb01cc3766be9131402b82730adfa0e45e6e3511 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 9 Nov 2018 14:38:22 +1100 Subject: my_getncpus based on threads available Detecting the cpus based on sysconf of the online CPUs can significantly over estimate the number of cpus available. Wheither via numactl, cgroups, taskset, systemd constraints, docker containers and probably other mechanisms, the number of threads mysqld can be run on can be quite less. As such we use the pthread_getaffinity_np function on Linux and FreeBSD (identical API) to get the number of CPUs. The number of CPUs is the default for the thread_pool_size and a too high default will resulting in large memory usage and high context switching overhead. Closes PR #922 --- cmake/os/WindowsCache.cmake | 2 ++ config.h.cmake | 3 +++ configure.cmake | 2 ++ mysys/my_getncpus.c | 31 ++++++++++++++++++++++++++++++- 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index 1cb6c81b627..1dbedfc24f2 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -127,6 +127,8 @@ SET(HAVE_PTHREAD_ATTR_GETSTACKSIZE CACHE INTERNAL "") SET(HAVE_PTHREAD_ATTR_SETSCOPE CACHE INTERNAL "") SET(HAVE_PTHREAD_ATTR_SETSTACKSIZE CACHE INTERNAL "") SET(HAVE_PTHREAD_CONDATTR_CREATE CACHE INTERNAL "") +SET(HAVE_PTHREAD_CONDATTR_SETCLOCK CACHE INTERNAL "") +SET(HAVE_PTHREAD_GETAFFINITY_NP CACHE INTERNAL "") SET(HAVE_PTHREAD_INIT CACHE INTERNAL "") SET(HAVE_PTHREAD_KEY_DELETE CACHE INTERNAL "") SET(HAVE_PTHREAD_RWLOCK_RDLOCK CACHE INTERNAL "") diff --git a/config.h.cmake b/config.h.cmake index 6e4af65c40e..fdaba640ad6 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -200,6 +200,9 @@ #cmakedefine HAVE_PTHREAD_ATTR_SETSCOPE 1 #cmakedefine HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #cmakedefine HAVE_PTHREAD_CONDATTR_CREATE 1 +#cmakedefine HAVE_PTHREAD_CONDATTR_SETCLOCK 1 +#cmakedefine HAVE_PTHREAD_GETAFFINITY_NP 1 +#cmakedefine HAVE_PTHREAD_KEY_DELETE 1 #cmakedefine HAVE_PTHREAD_KEY_DELETE 1 #cmakedefine HAVE_PTHREAD_KILL 1 #cmakedefine HAVE_PTHREAD_RWLOCK_RDLOCK 1 diff --git a/configure.cmake b/configure.cmake index f94fb3642a5..a85652a8345 100644 --- a/configure.cmake +++ b/configure.cmake @@ -375,6 +375,8 @@ CHECK_FUNCTION_EXISTS (pthread_attr_setscope HAVE_PTHREAD_ATTR_SETSCOPE) CHECK_FUNCTION_EXISTS (pthread_attr_getguardsize HAVE_PTHREAD_ATTR_GETGUARDSIZE) CHECK_FUNCTION_EXISTS (pthread_attr_setstacksize HAVE_PTHREAD_ATTR_SETSTACKSIZE) CHECK_FUNCTION_EXISTS (pthread_condattr_create HAVE_PTHREAD_CONDATTR_CREATE) +CHECK_FUNCTION_EXISTS (pthread_condattr_setclock HAVE_PTHREAD_CONDATTR_SETCLOCK) +CHECK_FUNCTION_EXISTS (pthread_getaffinity_np HAVE_PTHREAD_GETAFFINITY_NP) CHECK_FUNCTION_EXISTS (pthread_key_delete HAVE_PTHREAD_KEY_DELETE) CHECK_FUNCTION_EXISTS (pthread_rwlock_rdlock HAVE_PTHREAD_RWLOCK_RDLOCK) CHECK_FUNCTION_EXISTS (pthread_sigmask HAVE_PTHREAD_SIGMASK) diff --git a/mysys/my_getncpus.c b/mysys/my_getncpus.c index 38585161c22..0ee03631da8 100644 --- a/mysys/my_getncpus.c +++ b/mysys/my_getncpus.c @@ -21,10 +21,36 @@ #include #endif +#if defined(__FreeBSD__) && defined(HAVE_PTHREAD_GETAFFINITY_NP) +#include +#include +#endif + static int ncpus=0; -int my_getncpus() +int my_getncpus(void) { +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(HAVE_PTHREAD_GETAFFINITY_NP) + cpu_set_t set; + + if (!ncpus) + { + if (pthread_getaffinity_np(pthread_self(), sizeof(set), &set) == 0) + { + ncpus= CPU_COUNT(&set); + } + else + { +#ifdef _SC_NPROCESSORS_ONLN + ncpus= sysconf(_SC_NPROCESSORS_ONLN); +#else + ncpus= 2; +#endif + } + } + +#else /* __linux__ || FreeBSD && HAVE_PTHREAD_GETAFFINITY_NP */ + if (!ncpus) { #ifdef _SC_NPROCESSORS_ONLN @@ -46,5 +72,8 @@ int my_getncpus() ncpus= 2; #endif } + +#endif /* __linux__ || FreeBSD && HAVE_PTHREAD_GETAFFINITY_NP */ + return ncpus; } -- cgit v1.2.1 From 0d1dd2e79d4411ef8aaac9e789569253061caec9 Mon Sep 17 00:00:00 2001 From: Anel Husakovic Date: Thu, 20 Feb 2020 09:25:05 +0100 Subject: Clean wrong cherry-pick from previous commit - Delete variable HAVE_PTHREAD_CONDATTR_SETCLOCK and check - Delete second HAVE_PTHREAD_KEY_DELETE --- cmake/os/WindowsCache.cmake | 1 - config.h.cmake | 2 -- configure.cmake | 1 - 3 files changed, 4 deletions(-) diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index 1dbedfc24f2..a18f7cc7fe2 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -127,7 +127,6 @@ SET(HAVE_PTHREAD_ATTR_GETSTACKSIZE CACHE INTERNAL "") SET(HAVE_PTHREAD_ATTR_SETSCOPE CACHE INTERNAL "") SET(HAVE_PTHREAD_ATTR_SETSTACKSIZE CACHE INTERNAL "") SET(HAVE_PTHREAD_CONDATTR_CREATE CACHE INTERNAL "") -SET(HAVE_PTHREAD_CONDATTR_SETCLOCK CACHE INTERNAL "") SET(HAVE_PTHREAD_GETAFFINITY_NP CACHE INTERNAL "") SET(HAVE_PTHREAD_INIT CACHE INTERNAL "") SET(HAVE_PTHREAD_KEY_DELETE CACHE INTERNAL "") diff --git a/config.h.cmake b/config.h.cmake index fdaba640ad6..170bb80b691 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -200,10 +200,8 @@ #cmakedefine HAVE_PTHREAD_ATTR_SETSCOPE 1 #cmakedefine HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #cmakedefine HAVE_PTHREAD_CONDATTR_CREATE 1 -#cmakedefine HAVE_PTHREAD_CONDATTR_SETCLOCK 1 #cmakedefine HAVE_PTHREAD_GETAFFINITY_NP 1 #cmakedefine HAVE_PTHREAD_KEY_DELETE 1 -#cmakedefine HAVE_PTHREAD_KEY_DELETE 1 #cmakedefine HAVE_PTHREAD_KILL 1 #cmakedefine HAVE_PTHREAD_RWLOCK_RDLOCK 1 #cmakedefine HAVE_PTHREAD_SIGMASK 1 diff --git a/configure.cmake b/configure.cmake index a85652a8345..dec28f47d72 100644 --- a/configure.cmake +++ b/configure.cmake @@ -375,7 +375,6 @@ CHECK_FUNCTION_EXISTS (pthread_attr_setscope HAVE_PTHREAD_ATTR_SETSCOPE) CHECK_FUNCTION_EXISTS (pthread_attr_getguardsize HAVE_PTHREAD_ATTR_GETGUARDSIZE) CHECK_FUNCTION_EXISTS (pthread_attr_setstacksize HAVE_PTHREAD_ATTR_SETSTACKSIZE) CHECK_FUNCTION_EXISTS (pthread_condattr_create HAVE_PTHREAD_CONDATTR_CREATE) -CHECK_FUNCTION_EXISTS (pthread_condattr_setclock HAVE_PTHREAD_CONDATTR_SETCLOCK) CHECK_FUNCTION_EXISTS (pthread_getaffinity_np HAVE_PTHREAD_GETAFFINITY_NP) CHECK_FUNCTION_EXISTS (pthread_key_delete HAVE_PTHREAD_KEY_DELETE) CHECK_FUNCTION_EXISTS (pthread_rwlock_rdlock HAVE_PTHREAD_RWLOCK_RDLOCK) -- cgit v1.2.1 From 3ce49a0a5225eb7d185361e1ece65d03813ec550 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Thu, 20 Feb 2020 14:04:09 +0530 Subject: MDEV-21563 FTS thread aborts during shutdown - Add warning suppression in misc_debug2 test. --- mysql-test/suite/innodb_fts/r/misc_debug2.result | 1 + mysql-test/suite/innodb_fts/t/misc_debug2.test | 1 + 2 files changed, 2 insertions(+) diff --git a/mysql-test/suite/innodb_fts/r/misc_debug2.result b/mysql-test/suite/innodb_fts/r/misc_debug2.result index e9daa2d6b30..b3bc12f92cc 100644 --- a/mysql-test/suite/innodb_fts/r/misc_debug2.result +++ b/mysql-test/suite/innodb_fts/r/misc_debug2.result @@ -1,4 +1,5 @@ call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded."); +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB; set debug_dbug="+d,fts_instrument_sync_request"; INSERT INTO mdev21563 VALUES('This is a test'); diff --git a/mysql-test/suite/innodb_fts/t/misc_debug2.test b/mysql-test/suite/innodb_fts/t/misc_debug2.test index 31c026e3db9..0a9e137dd80 100644 --- a/mysql-test/suite/innodb_fts/t/misc_debug2.test +++ b/mysql-test/suite/innodb_fts/t/misc_debug2.test @@ -2,6 +2,7 @@ --source include/have_debug.inc --source include/not_embedded.inc call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded."); +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB; set debug_dbug="+d,fts_instrument_sync_request"; -- cgit v1.2.1 From b9689712e00bec64fa5dfad7ed65e6a82df8be23 Mon Sep 17 00:00:00 2001 From: Anel Husakovic Date: Tue, 31 Dec 2019 18:02:54 +0100 Subject: MDEV-21374: When "--help --verbose" prints out configuration file paths, the --defaults-file option is not considered * `--defaults-file` option is showed only in `--help --verbose` if applied * `--default-extra-file` is showing correctly now in `--help --verbose`, previously it was treated as a directory with appended `my.cnf` --- mysql-test/r/mysqld--defaults-file.result | 12 ++++++++++++ mysql-test/t/mysqld--defaults-file.test | 16 ++++++++++++++++ mysys/my_default.c | 10 ++++++++++ 3 files changed, 38 insertions(+) diff --git a/mysql-test/r/mysqld--defaults-file.result b/mysql-test/r/mysqld--defaults-file.result index 5fd5ca8d95a..be62580c47e 100644 --- a/mysql-test/r/mysqld--defaults-file.result +++ b/mysql-test/r/mysqld--defaults-file.result @@ -10,3 +10,15 @@ Could not open required defaults file: MYSQL_TEST_DIR/with.ext Fatal error in defaults handling. Program aborted Could not open required defaults file: MYSQL_TEST_DIR/no_extension Fatal error in defaults handling. Program aborted +# +# MDEV-21374: When "--help --verbose" prints out configuration file paths, +# the --defaults-file option is not considered +# +# Test on `defaults-file` +Default options are read from the following files in the given order: +MYSQLTEST_VARDIR/my.cnf +The following groups are read: mysqld server mysqld-10.1 mariadb mariadb-10.1 client-server galera +# Test on `defaults-extra-file` +Default options are read from the following files in the given order: + MYSQLTEST_VARDIR/my_test.cnf ~/.my.cnf +The following groups are read: mysqld server mysqld-10.1 mariadb mariadb-10.1 client-server galera diff --git a/mysql-test/t/mysqld--defaults-file.test b/mysql-test/t/mysqld--defaults-file.test index 3bfe0aa891f..acc1cea5b8c 100644 --- a/mysql-test/t/mysqld--defaults-file.test +++ b/mysql-test/t/mysqld--defaults-file.test @@ -29,3 +29,19 @@ exec $MYSQLD --defaults-file=with.ext --print-defaults 2>&1; --error 1 exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1; +--echo # +--echo # MDEV-21374: When "--help --verbose" prints out configuration file paths, +--echo # the --defaults-file option is not considered +--echo # + +--echo # Test on `defaults-file` +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --help --verbose | grep -A 2 'Default options are read'; + +--echo # Test on `defaults-extra-file` +# = `/etc/my.cnf /etc/mysql/my.cnf` +# Using sysconfdir configuration, we don't always have `/etc/mysql/my.cnf`, so replace them with a regex as well. +copy_file $MYSQLTEST_VARDIR/my.cnf $MYSQLTEST_VARDIR/my_test.cnf; +--replace_regex /.*my_test.cnf/ MYSQLTEST_VARDIR\/my_test.cnf/ +exec $MYSQLD --defaults-extra-file=$MYSQLTEST_VARDIR/my_test.cnf --help --verbose | grep -A 2 'Default options are read'; +remove_file $MYSQLTEST_VARDIR/my_test.cnf; diff --git a/mysys/my_default.c b/mysys/my_default.c index 32faf2045f9..6f080bb35fe 100644 --- a/mysys/my_default.c +++ b/mysys/my_default.c @@ -1035,6 +1035,11 @@ void my_print_default_files(const char *conf_file) char name[FN_REFLEN], **ext; puts("\nDefault options are read from the following files in the given order:"); + if (my_defaults_file) + { + puts(my_defaults_file); + return; + } if (dirname_length(conf_file)) fputs(conf_file,stdout); @@ -1059,7 +1064,12 @@ void my_print_default_files(const char *conf_file) if (**dirs) pos= *dirs; else if (my_defaults_extra_file) + { pos= my_defaults_extra_file; + fputs(pos, stdout); + fputs(" ", stdout); + continue; + } else continue; end= convert_dirname(name, pos, NullS); -- cgit v1.2.1 From 4618c974e4b467624d38bb256c2993afb4ac93b1 Mon Sep 17 00:00:00 2001 From: seppo Date: Sun, 23 Feb 2020 10:29:42 +0200 Subject: MDEV-21723 Async slave thread BF abort and replaying fixes (#1448) If async replication slave thread conflicts with cluster replication, then the async slave transaction should be BF aborted, and depending on the state of async slave transaction execution, potentially also replayed. There were problems in such BF abort implementation and the replaying was not started. This pull request contains fixes which make sure that if async slave thread is marked to abort and replay, it will complete carry out the rollback and release all locks and resources before starting the replaying. After replaying, async slave transactions is treated as successful, so the slave thread will continue as usual, handling next replication event. There is also new mtr test: galera.galera_slave_replay, which stresses both a certification failure for async slave thread and a successful BF abort followed by replaying. --- .../suite/galera/r/galera_slave_replay.result | 95 ++++++++++ mysql-test/suite/galera/t/galera_slave_replay.cnf | 1 + mysql-test/suite/galera/t/galera_slave_replay.test | 198 +++++++++++++++++++++ sql/log_event.cc | 8 + sql/slave.cc | 24 ++- sql/wsrep_thd.cc | 8 +- 6 files changed, 329 insertions(+), 5 deletions(-) create mode 100644 mysql-test/suite/galera/r/galera_slave_replay.result create mode 100644 mysql-test/suite/galera/t/galera_slave_replay.cnf create mode 100644 mysql-test/suite/galera/t/galera_slave_replay.test diff --git a/mysql-test/suite/galera/r/galera_slave_replay.result b/mysql-test/suite/galera/r/galera_slave_replay.result new file mode 100644 index 00000000000..760617be5f7 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_slave_replay.result @@ -0,0 +1,95 @@ +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; +connection node_1; +RESET MASTER; +connection node_2a; +START SLAVE; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb; +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (3, 'a'); +set binlog_format=STATEMENT; +SET AUTOCOMMIT=ON; +START TRANSACTION; +SELECT * FROM t1 FOR UPDATE; +f1 f2 +1 a +3 a +UPDATE t1 SET f2 = 'c' WHERE f1 > 1; +connection node_2a; +SET SESSION wsrep_sync_wait = 0; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_3; +SET SESSION wsrep_sync_wait = 0; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; +connection node_3; +INSERT INTO test.t1 VALUES (2, 'b'); +connection node_1; +COMMIT; +connection node_2a; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync'; +connection node_1; +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a'; +COUNT(*) = 1 +1 +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c'; +COUNT(*) = 1 +1 +SELECT * FROM t1; +f1 f2 +1 a +3 c +connection node_2a; +set session wsrep_sync_wait=15; +set session wsrep_sync_wait=0; +wsrep_local_replays +1 +SELECT * FROM t1; +f1 f2 +1 a +2 b +3 c +SET DEBUG_SYNC = "RESET"; +# +# test phase with real abort +# +connection node_1; +set binlog_format=ROW; +insert into t1 values (4, 'd'); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE t1 SET f2 = 'd' WHERE f1 = 3; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; +connection node_3; +UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3; +connection node_1; +COMMIT; +connection node_2a; +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync'; +SET DEBUG_SYNC = "RESET"; +connection node_2a; +set session wsrep_sync_wait=15; +SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e'; +COUNT(*) = 1 +1 +set session wsrep_sync_wait=0; +STOP SLAVE; +RESET SLAVE; +DROP TABLE t1; +connection node_1; +DROP TABLE t1; +RESET MASTER; diff --git a/mysql-test/suite/galera/t/galera_slave_replay.cnf b/mysql-test/suite/galera/t/galera_slave_replay.cnf new file mode 100644 index 00000000000..9449ec9cf40 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_slave_replay.cnf @@ -0,0 +1 @@ +!include ../galera_2nodes_as_slave.cnf diff --git a/mysql-test/suite/galera/t/galera_slave_replay.test b/mysql-test/suite/galera/t/galera_slave_replay.test new file mode 100644 index 00000000000..1d133e90e88 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_slave_replay.test @@ -0,0 +1,198 @@ +# +# This test tests the operation of transaction replay for async replication slave. +# If a potentially conflicting galera transaction arrives at +# just the right time during the commit and has lock conflict with async replication transaction +# applied by slave SQL thread, then the async replication transaction should either abort +# or rollback and replay (depending on the nature of lock conflict). +# + +--source include/have_innodb.inc +--source include/have_debug_sync.inc + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 + +--connection node_2a +--source include/galera_cluster.inc +#--source suite/galera/include/galera_have_debug_sync.inc + +# +# node 1 is native MariaDB server operating as async replication master +# +--connection node_1 +RESET MASTER; + +--connection node_2a +# +# count the number of wsrep replay's done in the node +# +--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + + +# +# nodes 2 and 3 form a galera cluster, node 2 operates as slave for native MariaDB naster in node 1 +# +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1; +--enable_query_log +START SLAVE; + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb; +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (3, 'a'); + +# +# use statement format replication to cause a false positive conflict with async replication transaction +# and galera replication. The conflict will be on GAP lock, and slave SQL thread should rollback +# and replay +# +set binlog_format=STATEMENT; + +SET AUTOCOMMIT=ON; +START TRANSACTION; + +SELECT * FROM t1 FOR UPDATE; +UPDATE t1 SET f2 = 'c' WHERE f1 > 1; + +--connection node_2a +# wait for create table and inserts to be replicated from master +SET SESSION wsrep_sync_wait = 0; +--let $wait_condition = SELECT COUNT(*) = 2 FROM test.t1; +--source include/wait_condition.inc + +# wait for create table and inserts to be replicated in cluster +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--connection node_3 +SET SESSION wsrep_sync_wait = 0; +--let $wait_condition = SELECT COUNT(*) = 2 FROM test.t1; +--source include/wait_condition.inc + +--connection node_2a +# Block the future commit of async replication +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc + +# block also the applier before applying begins +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; + +# +# now inject a conflicting insert from node 3, it will replicate with +# earlier seqno (than async transaction) and pause before applying in node 2 +# +--connection node_3 +INSERT INTO test.t1 VALUES (2, 'b'); + +# +# send the update from master, this will succeed here, beceuase of async replication. +# async replication will apply this in node 2 and pause before commit phase, +--connection node_1 +--error 0 +COMMIT; + +# Wait until async slave commit is blocked in node_2 +--connection node_2a +--source include/galera_wait_sync_point.inc + +# +# release the applier +# note: have to clear wsrep_apply_cb sync point first, as async replication will go for replay +# and as this sync point, after BF applier is released to progress +# +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +# Unblock the async slave commit +--connection node_2a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc + +--connection node_1 + +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a'; +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c'; +SELECT * FROM t1; + +--connection node_2a + +# wsrep_local_replays has increased by 1 +set session wsrep_sync_wait=15; +--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` +set session wsrep_sync_wait=0; + +--disable_query_log +--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays; +--enable_query_log + +# +# replaying of async transaction should be effective, and row 3 having 'c' in f2 +# +SELECT * FROM t1; +SET DEBUG_SYNC = "RESET"; + +#******************************************************************************** +# test phase 2 +#******************************************************************************** + +--echo # +--echo # test phase with real abort +--echo # + +--connection node_1 + +set binlog_format=ROW; + +insert into t1 values (4, 'd'); + +SET AUTOCOMMIT=ON; +START TRANSACTION; + +UPDATE t1 SET f2 = 'd' WHERE f1 = 3; + +--connection node_2a +# wait for the last insert to be replicated from master +--let $wait_condition = SELECT COUNT(*) = 4 FROM test.t1; +--source include/wait_condition.inc + +# Block the commit +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc + +# block applier +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; + +# Inject a conflicting update from node 3 +--connection node_3 +UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3; + +# send the update from master +--connection node_1 +--error 0 +COMMIT; + +--connection node_2a + +# release the applier +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + + +# Unblock the async slave commit +--connection node_2a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc +SET DEBUG_SYNC = "RESET"; + +--connection node_2a + +set session wsrep_sync_wait=15; +SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e'; +set session wsrep_sync_wait=0; + +STOP SLAVE; +RESET SLAVE; + +DROP TABLE t1; + +--connection node_1 +DROP TABLE t1; +RESET MASTER; diff --git a/sql/log_event.cc b/sql/log_event.cc index d5066fdabdf..29cb4d6d7d7 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -8567,8 +8567,16 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi) res= trans_commit(thd); /* Automatically rolls back on error. */ thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + if (WSREP(thd)) mysql_mutex_lock(&thd->LOCK_thd_data); + if ((!res || (WSREP(thd) && thd->wsrep_conflict_state == MUST_REPLAY)) && sub_id) +#else if (!res && sub_id) +#endif /* WITH_WSREP */ rpl_global_gtid_slave_state->update_state_hash(sub_id, >id, rgi); +#ifdef WITH_WSREP + if (WSREP(thd)) mysql_mutex_unlock(&thd->LOCK_thd_data); +#endif /* WITH_WSREP */ /* Increment the global status commit count variable diff --git a/sql/slave.cc b/sql/slave.cc index 01a86979648..3f8c1ce546b 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3567,14 +3567,34 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi, exec_res= ev->apply_event(rgi); #ifdef WITH_WSREP - if (exec_res && thd->wsrep_conflict_state != NO_CONFLICT) - { + if (exec_res) + { + switch (thd->wsrep_conflict_state) { + case NO_CONFLICT: break; + case MUST_REPLAY: + WSREP_DEBUG("SQL apply failed for MUST_REPLAY, res %d", exec_res); + mysql_mutex_lock(&thd->LOCK_thd_data); + wsrep_replay_transaction(thd); + switch (thd->wsrep_conflict_state) { + case NO_CONFLICT: + exec_res = 0; /* replaying succeeded, and slave may continue */ + break; + case ABORTED: break; /* replaying has failed, trx is rolled back */ + default: + WSREP_WARN("unexpected result of slave transaction replaying: %lld, %d", + thd->thread_id, thd->wsrep_conflict_state); + } + mysql_mutex_unlock(&thd->LOCK_thd_data); + break; + default: WSREP_DEBUG("SQL apply failed, res %d conflict state: %d", exec_res, thd->wsrep_conflict_state); rli->abort_slave= 1; rli->report(ERROR_LEVEL, ER_UNKNOWN_COM_ERROR, rgi->gtid_info(), "Node has dropped from cluster"); + break; } + } #endif #ifndef DBUG_OFF diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index de2ad6d1a1f..a7b6e8ff1b1 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -153,8 +153,9 @@ static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow) if (!thd->wsrep_rgi) thd->wsrep_rgi= wsrep_relay_group_init("wsrep_relay"); /* thd->system_thread_info.rpl_sql_info isn't initialized. */ - thd->system_thread_info.rpl_sql_info= - new rpl_sql_thread_info(thd->wsrep_rgi->rli->mi->rpl_filter); + if (!thd->slave_thread) + thd->system_thread_info.rpl_sql_info= + new rpl_sql_thread_info(thd->wsrep_rgi->rli->mi->rpl_filter); thd->wsrep_exec_mode= REPL_RECV; thd->net.vio= 0; @@ -181,7 +182,8 @@ static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) thd->user_time = shadow->user_time; thd->reset_db(shadow->db, shadow->db_length); - delete thd->system_thread_info.rpl_sql_info; + if (!thd->slave_thread) + delete thd->system_thread_info.rpl_sql_info; delete thd->wsrep_rgi->rli->mi; delete thd->wsrep_rgi->rli; -- cgit v1.2.1 From cd5d864fef7945bff1e4a0e8431f728fcf38dad7 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 25 Feb 2020 15:58:42 +1100 Subject: mariadb{,@}.service comment typo open-file-limit -> open-files-limit --- support-files/mariadb.service.in | 2 +- support-files/mariadb@.service.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in index ede97c04112..38f55cb7e8f 100644 --- a/support-files/mariadb.service.in +++ b/support-files/mariadb.service.in @@ -133,7 +133,7 @@ TimeoutStopSec=900 ## isn't executed. ## -# Number of files limit. previously [mysqld_safe] open-file-limit +# Number of files limit. previously [mysqld_safe] open-files-limit LimitNOFILE=16364 # Maximium core size. previously [mysqld_safe] core-file-size diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in index 1f84b582e4e..475f3830a78 100644 --- a/support-files/mariadb@.service.in +++ b/support-files/mariadb@.service.in @@ -154,7 +154,7 @@ TimeoutStopSec=900 ## isn't executed. ## -# Number of files limit. previously [mysqld_safe] open-file-limit +# Number of files limit. previously [mysqld_safe] open-files-limit LimitNOFILE=16364 # Maximium core size. previously [mysqld_safe] core-file-size -- cgit v1.2.1 From c749eb2b41545377166a94e25b3ab84991729bab Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 15 Oct 2019 14:35:46 +1100 Subject: MDEV-16662: cmake: CMP0026 compatible for dtrace cmake enabling -DENABLE_DTRACE=ON is particularlly noisy with CMP0026 errors. Fixed in the same way as 6b53f9d781cc19cbec96c3eb048e6407021685a2 --- cmake/dtrace.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake index 4e0f7501045..1e29ba685e0 100644 --- a/cmake/dtrace.cmake +++ b/cmake/dtrace.cmake @@ -147,11 +147,10 @@ FUNCTION(DTRACE_INSTRUMENT target) # Note: DTrace probes in static libraries are unusable currently # (see explanation for DTRACE_INSTRUMENT_STATIC_LIBS below) # but maybe one day this will be fixed. - GET_TARGET_PROPERTY(target_location ${target} LOCATION) ADD_CUSTOM_COMMAND( TARGET ${target} POST_BUILD - COMMAND ${CMAKE_AR} r ${target_location} ${outfile} - COMMAND ${CMAKE_RANLIB} ${target_location} + COMMAND ${CMAKE_AR} r $ ${outfile} + COMMAND ${CMAKE_RANLIB} $ ) # Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS SET(TARGET_OBJECT_DIRECTORY_${target} ${objdir} CACHE INTERNAL "") -- cgit v1.2.1 From f6b9a29820d5f30d4e607c8a334f8ffea861e940 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 15 Oct 2019 15:03:53 +1100 Subject: MDEV-16662: cmake remove empty INSTALL_DEBUG_TARGET No adverse effects since this was made a null function in 6b53f9d781cc19cbec96c3eb048e6407021685a2. This function had the last remaining cmake CMP0026 violation. --- cmake/install_macros.cmake | 87 ----------------------------------- cmake/plugin.cmake | 1 - mysys/CMakeLists.txt | 4 -- plugin/win_auth_client/CMakeLists.txt | 3 -- 4 files changed, 95 deletions(-) diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index f28720e97bc..c40c196c3d0 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -262,93 +262,6 @@ GET_FILENAME_COMPONENT(BINARY_PARENTDIR ${CMAKE_BINARY_DIR} PATH) SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug build") -FUNCTION(INSTALL_DEBUG_TARGET target) - RETURN() # XXX unused? - CMAKE_PARSE_ARGUMENTS(ARG - "" - "DESTINATION;RENAME;PDB_DESTINATION;COMPONENT" - "" - ${ARGN} - ) - GET_TARGET_PROPERTY(target_type ${target} TYPE) - IF(ARG_RENAME) - SET(RENAME_PARAM RENAME ${ARG_RENAME}${CMAKE_${target_type}_SUFFIX}) - ELSE() - SET(RENAME_PARAM) - ENDIF() - IF(NOT ARG_DESTINATION) - MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET") - ENDIF() - GET_TARGET_PROPERTY(target_location ${target} LOCATION) - IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja") - STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}" debug_target_location "${target_location}") - ELSE() - STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" ) - ENDIF() - IF(NOT ARG_COMPONENT) - SET(ARG_COMPONENT DebugBinaries) - ENDIF() - - # Define permissions - # For executable files - SET(PERMISSIONS_EXECUTABLE - PERMISSIONS - OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE) - - # Permissions for shared library (honors CMAKE_INSTALL_NO_EXE which is - # typically set on Debian) - IF(CMAKE_INSTALL_SO_NO_EXE) - SET(PERMISSIONS_SHARED_LIBRARY - PERMISSIONS - OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ) - ELSE() - SET(PERMISSIONS_SHARED_LIBRARY ${PERMISSIONS_EXECUTABLE}) - ENDIF() - - # Shared modules get the same permissions as shared libraries - SET(PERMISSIONS_MODULE_LIBRARY ${PERMISSIONS_SHARED_LIBRARY}) - - # Define permissions for static library - SET(PERMISSIONS_STATIC_LIBRARY - PERMISSIONS - OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ) - - INSTALL(FILES ${debug_target_location} - DESTINATION ${ARG_DESTINATION} - ${RENAME_PARAM} - ${PERMISSIONS_${target_type}} - CONFIGURATIONS Release RelWithDebInfo - COMPONENT ${ARG_COMPONENT} - OPTIONAL) - - IF(MSVC) - GET_FILENAME_COMPONENT(ext ${debug_target_location} EXT) - STRING(REPLACE "${ext}" ".pdb" debug_pdb_target_location "${debug_target_location}" ) - IF (RENAME_PARAM) - IF(NOT ARG_PDB_DESTINATION) - STRING(REPLACE "${ext}" ".pdb" "${ARG_RENAME}" pdb_rename) - SET(PDB_RENAME_PARAM RENAME "${pdb_rename}") - ENDIF() - ENDIF() - IF(NOT ARG_PDB_DESTINATION) - SET(ARG_PDB_DESTINATION "${ARG_DESTINATION}") - ENDIF() - INSTALL(FILES ${debug_pdb_target_location} - DESTINATION ${ARG_PDB_DESTINATION} - ${PDB_RENAME_PARAM} - CONFIGURATIONS Release RelWithDebInfo - COMPONENT ${ARG_COMPONENT} - OPTIONAL) - ENDIF() -ENDFUNCTION() - - FUNCTION(INSTALL_MYSQL_TEST from to) IF(INSTALL_MYSQLTESTDIR) INSTALL( diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 5a1e8f81f0a..486f5b00590 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -249,7 +249,6 @@ MACRO(MYSQL_ADD_PLUGIN) SET(ARG_COMPONENT Server) ENDIF() MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT ${ARG_COMPONENT}) - #INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug COMPONENT ${ARG_COMPONENT}) ENDIF() GET_FILENAME_COMPONENT(subpath ${CMAKE_CURRENT_SOURCE_DIR} NAME) diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 438d6b428e0..0a61c856506 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -102,7 +102,3 @@ SET_TARGET_PROPERTIES(thr_timer PROPERTIES COMPILE_FLAGS "-DMAIN") ADD_EXECUTABLE(test_hash hash.c) TARGET_LINK_LIBRARIES(test_hash mysys) SET_TARGET_PROPERTIES(test_hash PROPERTIES COMPILE_FLAGS "-DMAIN") - -IF(MSVC) - INSTALL_DEBUG_TARGET(mysys DESTINATION ${INSTALL_LIBDIR}/debug) -ENDIF() diff --git a/plugin/win_auth_client/CMakeLists.txt b/plugin/win_auth_client/CMakeLists.txt index 435c5b8966a..8c7696347aa 100644 --- a/plugin/win_auth_client/CMakeLists.txt +++ b/plugin/win_auth_client/CMakeLists.txt @@ -31,7 +31,4 @@ IF(WIN32) LINK_LIBRARIES Secur32 MODULE_ONLY COMPONENT ClientPlugins) - #IF(MSVC) - # INSTALL_DEBUG_TARGET(auth_win_client DESTINATION ${INSTALL_LIBDIR}/debug) - #ENDIF() ENDIF(WIN32) -- cgit v1.2.1 From cfa0506f8a7bc9855cbc8869c9cfbb4e9faf21eb Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Tue, 25 Feb 2020 00:47:03 -0800 Subject: MDEV-21554 Crash in JOIN_CACHE_BKAH::skip_index_tuple when mrr=on and join_cache_level=6+ The patch fixes two similar bugs in the commit 8eeb689e9fc57afe19a8dbff354b5f9f167867a9 that added multi_range_read support to partitions. The commit opened a possibility to join a partition table using BKA+MRR. However in some cases it could lead to wrong results or even crashes. This could happened when - index condition pushdown was used to join the table or - the joined table was an inner table of an outer join and 'not exist' optimization was applied or - the join table was the inner table of a semi-join and the first match optimization was applied The bugs were in the code of the call-back functions - partition_multi_range_key_skip_record() and - partition_multi_range_key_skip_index_tuple(). Each of this function consist only of an invocation of another function. Yet a wrong parameter was passed at this invocation. The fix was suggested by Sergey Petrunia and it is apparently in line with original design. The corresponding comprehensive test cases demonstrating the problems caused by the bugs were constructed by me. --- mysql-test/include/partition_mrr.inc | 92 ++++++++++++++++ mysql-test/main/partition_mrr_aria.result | 157 ++++++++++++++++++++++++++ mysql-test/main/partition_mrr_innodb.result | 157 ++++++++++++++++++++++++++ mysql-test/main/partition_mrr_myisam.result | 164 +++++++++++++++++++++++++++- sql/ha_partition.cc | 6 +- 5 files changed, 569 insertions(+), 7 deletions(-) diff --git a/mysql-test/include/partition_mrr.inc b/mysql-test/include/partition_mrr.inc index 4c285791ec7..f372cccfdd2 100644 --- a/mysql-test/include/partition_mrr.inc +++ b/mysql-test/include/partition_mrr.inc @@ -36,11 +36,103 @@ insert into t3 select 123456 from t1 A, t1 B; +set @save_optimizer_switch=@@optimizer_switch; + set optimizer_switch='mrr=on'; --replace_column 9 # explain select * from t3 force index (key_col) where key_col < 3; select * from t3 force index (key_col) where key_col < 3; +set optimizer_switch=@save_optimizer_switch; + drop table t1,t3; +--echo # +--echo # MDEV-21544: partitioned table is joined with BKA+MRR +--echo # + +set @save_join_cache_level=@@join_cache_level; +set @save_optimizer_switch=@@optimizer_switch; + +create table t0 ( + tp int, a int, b int not null, c varchar(12), index idx (a,b) +); +insert into t0 values +(1,3,30,'yyzy'), (1,3,30,'yxxyy'), (1,3,30,'yyxy'), (1,3,30,'xxyy'), +(1,3,30,'yyxz'), (1,3,30,'yyzz'), (1,3,30,'xxyzy'), (1,3,30,'yyyy'), +(1,3,30,'yzzy'), (1,93,30,'zzzy'), +(2,3,40,'yxx'), (2,4,40,'xx'), (2,3,10,'zxz'), +(2,3,40,'yyx'), (2,4,40,'xxx'), (2,3,10,'zyyz'), +(2,3,40,'xzzzz'), (2,4,40,'yyyxx'), (2,3,10,'zyz'), +(2,3,40,'xxx'), (2,4,40,'xx'), (2,3,10,'zzz'), +(2,3,40,'yyxzx'), (2,4,40,'xyx'), (2,3,10,'xzz'), +(2,3,40,'xxxzz'), (2,4,40,'xxz'), (2,3,10,'zzzy'), +(2,3,40,'zzxxx'), (2,4,40,'zxx'), (2,3,10,'yzzz'), +(2,3,40,'xyyxx'), (2,4,40,'xzzzx'), (2,3,10,'zzxxz'), +(2,3,40,'yzxxx'), (2,4,40,'xxzy'), (2,3,10,'zzzyx'), +(2,93,40,'xzx'), (2,94,40,'xz'), (2,93,10,'zyyyz'), +(3,4,30,'yx'), (3,4,30,'yyxxx'), (3,4,30,'zzyy'), (3,4,30,'zxyy'), +(3,4,30,'xxyy'), (3,4,30,'yyzx'), (3,4,30,'zyyy'), (3,4,30,'yzy'), +(3,4,30,'zzzyy'), (3,94,30,'yyz'); + +create table t1 ( + tp int, a int, b int not null, c varchar(12), index idx (a,b) +) +partition by list (tp) +( partition p1 values in (1), + partition p2 values in (2), + partition p3 values in (3)); +insert into t1 select * from t0; + +# tables t0 and t1 contain the same set of records. + +create table t2 (a int, index idx(a)); +insert into t2 values +(1), (2), (3), (4), (5); +insert into t2 select a+10 from t2; +insert into t2 select a+20 from t2; + +analyze table t0,t1,t2; + +set join_cache_level=6; +set optimizer_switch='mrr=on'; + +let $q1= +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1; +eval explain extended $q1; +eval $q1; + +let $q2= +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1; +eval explain extended $q2; +eval $q2; + +let $q1= +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +eval explain extended $q1; +eval $q1; + +let $q2= +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +eval explain extended $q2; +eval $q2; + +insert into t2 values +(3), (4), (5); +analyze table t2; + +let $q1= +select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null; +eval explain extended $q1; +eval $q1; + +let $q2= +select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null; +eval explain extended $q2; +eval $q2; + +set join_cache_level=@save_join_cache_level; +set optimizer_switch=@save_optimizer_switch; + +drop table t0,t1,t2; diff --git a/mysql-test/main/partition_mrr_aria.result b/mysql-test/main/partition_mrr_aria.result index 7a0c35a309e..c2be6ee4703 100644 --- a/mysql-test/main/partition_mrr_aria.result +++ b/mysql-test/main/partition_mrr_aria.result @@ -39,6 +39,7 @@ A.a, B.a, 123456 from t1 A, t1 B; +set @save_optimizer_switch=@@optimizer_switch; set optimizer_switch='mrr=on'; explain select * from t3 force index (key_col) where key_col < 3; @@ -76,4 +77,160 @@ ID part_id key_col col2 27 7 2 123456 28 8 2 123456 29 9 2 123456 +set optimizer_switch=@save_optimizer_switch; drop table t1,t3; +# +# MDEV-21544: partitioned table is joined with BKA+MRR +# +set @save_join_cache_level=@@join_cache_level; +set @save_optimizer_switch=@@optimizer_switch; +create table t0 ( +tp int, a int, b int not null, c varchar(12), index idx (a,b) +); +insert into t0 values +(1,3,30,'yyzy'), (1,3,30,'yxxyy'), (1,3,30,'yyxy'), (1,3,30,'xxyy'), +(1,3,30,'yyxz'), (1,3,30,'yyzz'), (1,3,30,'xxyzy'), (1,3,30,'yyyy'), +(1,3,30,'yzzy'), (1,93,30,'zzzy'), +(2,3,40,'yxx'), (2,4,40,'xx'), (2,3,10,'zxz'), +(2,3,40,'yyx'), (2,4,40,'xxx'), (2,3,10,'zyyz'), +(2,3,40,'xzzzz'), (2,4,40,'yyyxx'), (2,3,10,'zyz'), +(2,3,40,'xxx'), (2,4,40,'xx'), (2,3,10,'zzz'), +(2,3,40,'yyxzx'), (2,4,40,'xyx'), (2,3,10,'xzz'), +(2,3,40,'xxxzz'), (2,4,40,'xxz'), (2,3,10,'zzzy'), +(2,3,40,'zzxxx'), (2,4,40,'zxx'), (2,3,10,'yzzz'), +(2,3,40,'xyyxx'), (2,4,40,'xzzzx'), (2,3,10,'zzxxz'), +(2,3,40,'yzxxx'), (2,4,40,'xxzy'), (2,3,10,'zzzyx'), +(2,93,40,'xzx'), (2,94,40,'xz'), (2,93,10,'zyyyz'), +(3,4,30,'yx'), (3,4,30,'yyxxx'), (3,4,30,'zzyy'), (3,4,30,'zxyy'), +(3,4,30,'xxyy'), (3,4,30,'yyzx'), (3,4,30,'zyyy'), (3,4,30,'yzy'), +(3,4,30,'zzzyy'), (3,94,30,'yyz'); +create table t1 ( +tp int, a int, b int not null, c varchar(12), index idx (a,b) +) +partition by list (tp) +( partition p1 values in (1), +partition p2 values in (2), +partition p3 values in (3)); +insert into t1 select * from t0; +create table t2 (a int, index idx(a)); +insert into t2 values +(1), (2), (3), (4), (5); +insert into t2 select a+10 from t2; +insert into t2 select a+20 from t2; +analyze table t0,t1,t2; +Table Op Msg_type Msg_text +test.t0 analyze status OK +test.t1 analyze status OK +test.t2 analyze status OK +set join_cache_level=6; +set optimizer_switch='mrr=on'; +explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1 +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1; +tp a b c a +3 4 30 yx 4 +3 4 30 yyxxx 4 +3 4 30 zzyy 4 +3 4 30 zxyy 4 +3 4 30 xxyy 4 +3 4 30 yyzx 4 +3 4 30 zyyy 4 +3 4 30 yzy 4 +3 4 30 zzzyy 4 +explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 8 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1 +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1; +tp a b c a +3 4 30 yx 4 +3 4 30 yyxxx 4 +3 4 30 zzyy 4 +3 4 30 zxyy 4 +3 4 30 xxyy 4 +3 4 30 yyzx 4 +3 4 30 zyyy 4 +3 4 30 yzy 4 +3 4 30 zzzyy 4 +explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4 +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +tp a b c a +2 3 40 yxx 3 +2 4 40 xx 4 +2 3 40 yyx 3 +2 4 40 xxx 4 +2 3 40 xzzzz 3 +2 4 40 yyyxx 4 +2 3 40 xxx 3 +2 4 40 xx 4 +2 3 40 yyxzx 3 +2 4 40 xyx 4 +2 3 40 xxxzz 3 +2 4 40 xxz 4 +2 3 40 zzxxx 3 +2 4 40 zxx 4 +2 3 40 xyyxx 3 +2 4 40 xzzzx 4 +2 3 40 yzxxx 3 +2 4 40 xxzy 4 +explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4 +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +tp a b c a +2 3 40 yxx 3 +2 4 40 xx 4 +2 3 40 yyx 3 +2 4 40 xxx 4 +2 3 40 xzzzz 3 +2 4 40 yyyxx 4 +2 3 40 xxx 3 +2 4 40 xx 4 +2 3 40 yyxzx 3 +2 4 40 xyx 4 +2 3 40 xxxzz 3 +2 4 40 xxz 4 +2 3 40 zzxxx 3 +2 4 40 zxx 4 +2 3 40 xyyxx 3 +2 4 40 xzzzx 4 +2 3 40 yzxxx 3 +2 4 40 xxzy 4 +insert into t2 values +(3), (4), (5); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null +select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null; +a tp a b c +explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null +select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null; +a tp a b c +set join_cache_level=@save_join_cache_level; +set optimizer_switch=@save_optimizer_switch; +drop table t0,t1,t2; diff --git a/mysql-test/main/partition_mrr_innodb.result b/mysql-test/main/partition_mrr_innodb.result index c188f7e9929..ecef67817a3 100644 --- a/mysql-test/main/partition_mrr_innodb.result +++ b/mysql-test/main/partition_mrr_innodb.result @@ -39,6 +39,7 @@ A.a, B.a, 123456 from t1 A, t1 B; +set @save_optimizer_switch=@@optimizer_switch; set optimizer_switch='mrr=on'; explain select * from t3 force index (key_col) where key_col < 3; @@ -76,4 +77,160 @@ ID part_id key_col col2 27 7 2 123456 28 8 2 123456 29 9 2 123456 +set optimizer_switch=@save_optimizer_switch; drop table t1,t3; +# +# MDEV-21544: partitioned table is joined with BKA+MRR +# +set @save_join_cache_level=@@join_cache_level; +set @save_optimizer_switch=@@optimizer_switch; +create table t0 ( +tp int, a int, b int not null, c varchar(12), index idx (a,b) +); +insert into t0 values +(1,3,30,'yyzy'), (1,3,30,'yxxyy'), (1,3,30,'yyxy'), (1,3,30,'xxyy'), +(1,3,30,'yyxz'), (1,3,30,'yyzz'), (1,3,30,'xxyzy'), (1,3,30,'yyyy'), +(1,3,30,'yzzy'), (1,93,30,'zzzy'), +(2,3,40,'yxx'), (2,4,40,'xx'), (2,3,10,'zxz'), +(2,3,40,'yyx'), (2,4,40,'xxx'), (2,3,10,'zyyz'), +(2,3,40,'xzzzz'), (2,4,40,'yyyxx'), (2,3,10,'zyz'), +(2,3,40,'xxx'), (2,4,40,'xx'), (2,3,10,'zzz'), +(2,3,40,'yyxzx'), (2,4,40,'xyx'), (2,3,10,'xzz'), +(2,3,40,'xxxzz'), (2,4,40,'xxz'), (2,3,10,'zzzy'), +(2,3,40,'zzxxx'), (2,4,40,'zxx'), (2,3,10,'yzzz'), +(2,3,40,'xyyxx'), (2,4,40,'xzzzx'), (2,3,10,'zzxxz'), +(2,3,40,'yzxxx'), (2,4,40,'xxzy'), (2,3,10,'zzzyx'), +(2,93,40,'xzx'), (2,94,40,'xz'), (2,93,10,'zyyyz'), +(3,4,30,'yx'), (3,4,30,'yyxxx'), (3,4,30,'zzyy'), (3,4,30,'zxyy'), +(3,4,30,'xxyy'), (3,4,30,'yyzx'), (3,4,30,'zyyy'), (3,4,30,'yzy'), +(3,4,30,'zzzyy'), (3,94,30,'yyz'); +create table t1 ( +tp int, a int, b int not null, c varchar(12), index idx (a,b) +) +partition by list (tp) +( partition p1 values in (1), +partition p2 values in (2), +partition p3 values in (3)); +insert into t1 select * from t0; +create table t2 (a int, index idx(a)); +insert into t2 values +(1), (2), (3), (4), (5); +insert into t2 select a+10 from t2; +insert into t2 select a+20 from t2; +analyze table t0,t1,t2; +Table Op Msg_type Msg_text +test.t0 analyze status OK +test.t1 analyze status OK +test.t2 analyze status OK +set join_cache_level=6; +set optimizer_switch='mrr=on'; +explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1 +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1; +tp a b c a +3 4 30 yx 4 +3 4 30 yyxxx 4 +3 4 30 zzyy 4 +3 4 30 zxyy 4 +3 4 30 xxyy 4 +3 4 30 yyzx 4 +3 4 30 zyyy 4 +3 4 30 yzy 4 +3 4 30 zzzyy 4 +explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 8 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1 +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1; +tp a b c a +3 4 30 yx 4 +3 4 30 yyxxx 4 +3 4 30 zzyy 4 +3 4 30 zxyy 4 +3 4 30 xxyy 4 +3 4 30 yyzx 4 +3 4 30 zyyy 4 +3 4 30 yzy 4 +3 4 30 zzzyy 4 +explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4 +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +tp a b c a +2 3 40 yxx 3 +2 4 40 xx 4 +2 3 40 yyx 3 +2 4 40 xxx 4 +2 3 40 xzzzz 3 +2 4 40 yyyxx 4 +2 3 40 xxx 3 +2 4 40 xx 4 +2 3 40 yyxzx 3 +2 4 40 xyx 4 +2 3 40 xxxzz 3 +2 4 40 xxz 4 +2 3 40 zzxxx 3 +2 4 40 zxx 4 +2 3 40 xyyxx 3 +2 4 40 xzzzx 4 +2 3 40 yzxxx 3 +2 4 40 xxzy 4 +explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4 +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +tp a b c a +2 3 40 yxx 3 +2 4 40 xx 4 +2 3 40 yyx 3 +2 4 40 xxx 4 +2 3 40 xzzzz 3 +2 4 40 yyyxx 4 +2 3 40 xxx 3 +2 4 40 xx 4 +2 3 40 yyxzx 3 +2 4 40 xyx 4 +2 3 40 xxxzz 3 +2 4 40 xxz 4 +2 3 40 zzxxx 3 +2 4 40 zxx 4 +2 3 40 xyyxx 3 +2 4 40 xzzzx 4 +2 3 40 yzxxx 3 +2 4 40 xxzy 4 +insert into t2 values +(3), (4), (5); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null +select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null; +a tp a b c +explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null +select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null; +a tp a b c +set join_cache_level=@save_join_cache_level; +set optimizer_switch=@save_optimizer_switch; +drop table t0,t1,t2; diff --git a/mysql-test/main/partition_mrr_myisam.result b/mysql-test/main/partition_mrr_myisam.result index d989536324c..ff23982ff1a 100644 --- a/mysql-test/main/partition_mrr_myisam.result +++ b/mysql-test/main/partition_mrr_myisam.result @@ -39,6 +39,7 @@ A.a, B.a, 123456 from t1 A, t1 B; +set @save_optimizer_switch=@@optimizer_switch; set optimizer_switch='mrr=on'; explain select * from t3 force index (key_col) where key_col < 3; @@ -76,8 +77,164 @@ ID part_id key_col col2 27 7 2 123456 28 8 2 123456 29 9 2 123456 +set optimizer_switch=@save_optimizer_switch; drop table t1,t3; # +# MDEV-21544: partitioned table is joined with BKA+MRR +# +set @save_join_cache_level=@@join_cache_level; +set @save_optimizer_switch=@@optimizer_switch; +create table t0 ( +tp int, a int, b int not null, c varchar(12), index idx (a,b) +); +insert into t0 values +(1,3,30,'yyzy'), (1,3,30,'yxxyy'), (1,3,30,'yyxy'), (1,3,30,'xxyy'), +(1,3,30,'yyxz'), (1,3,30,'yyzz'), (1,3,30,'xxyzy'), (1,3,30,'yyyy'), +(1,3,30,'yzzy'), (1,93,30,'zzzy'), +(2,3,40,'yxx'), (2,4,40,'xx'), (2,3,10,'zxz'), +(2,3,40,'yyx'), (2,4,40,'xxx'), (2,3,10,'zyyz'), +(2,3,40,'xzzzz'), (2,4,40,'yyyxx'), (2,3,10,'zyz'), +(2,3,40,'xxx'), (2,4,40,'xx'), (2,3,10,'zzz'), +(2,3,40,'yyxzx'), (2,4,40,'xyx'), (2,3,10,'xzz'), +(2,3,40,'xxxzz'), (2,4,40,'xxz'), (2,3,10,'zzzy'), +(2,3,40,'zzxxx'), (2,4,40,'zxx'), (2,3,10,'yzzz'), +(2,3,40,'xyyxx'), (2,4,40,'xzzzx'), (2,3,10,'zzxxz'), +(2,3,40,'yzxxx'), (2,4,40,'xxzy'), (2,3,10,'zzzyx'), +(2,93,40,'xzx'), (2,94,40,'xz'), (2,93,10,'zyyyz'), +(3,4,30,'yx'), (3,4,30,'yyxxx'), (3,4,30,'zzyy'), (3,4,30,'zxyy'), +(3,4,30,'xxyy'), (3,4,30,'yyzx'), (3,4,30,'zyyy'), (3,4,30,'yzy'), +(3,4,30,'zzzyy'), (3,94,30,'yyz'); +create table t1 ( +tp int, a int, b int not null, c varchar(12), index idx (a,b) +) +partition by list (tp) +( partition p1 values in (1), +partition p2 values in (2), +partition p3 values in (3)); +insert into t1 select * from t0; +create table t2 (a int, index idx(a)); +insert into t2 values +(1), (2), (3), (4), (5); +insert into t2 select a+10 from t2; +insert into t2 select a+20 from t2; +analyze table t0,t1,t2; +Table Op Msg_type Msg_text +test.t0 analyze status OK +test.t1 analyze status OK +test.t2 analyze status OK +set join_cache_level=6; +set optimizer_switch='mrr=on'; +explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1 +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1; +tp a b c a +3 4 30 yx 4 +3 4 30 yyxxx 4 +3 4 30 zzyy 4 +3 4 30 zxyy 4 +3 4 30 xxyy 4 +3 4 30 yyzx 4 +3 4 30 zyyy 4 +3 4 30 yzy 4 +3 4 30 zzzyy 4 +explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 8 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1 +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1; +tp a b c a +3 4 30 yx 4 +3 4 30 yyxxx 4 +3 4 30 zzyy 4 +3 4 30 zxyy 4 +3 4 30 xxyy 4 +3 4 30 yyzx 4 +3 4 30 zyyy 4 +3 4 30 yzy 4 +3 4 30 zzzyy 4 +explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4 +select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; +tp a b c a +2 3 40 yxx 3 +2 4 40 xx 4 +2 3 40 yyx 3 +2 4 40 xxx 4 +2 3 40 xzzzz 3 +2 4 40 yyyxx 4 +2 3 40 xxx 3 +2 4 40 xx 4 +2 3 40 yyxzx 3 +2 4 40 xyx 4 +2 3 40 xxxzz 3 +2 4 40 xxz 4 +2 3 40 zzxxx 3 +2 4 40 zxx 4 +2 3 40 xyyxx 3 +2 4 40 xzzzx 4 +2 3 40 yzxxx 3 +2 4 40 xxzy 4 +explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4 +select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; +tp a b c a +2 3 40 yxx 3 +2 4 40 xx 4 +2 3 40 yyx 3 +2 4 40 xxx 4 +2 3 40 xzzzz 3 +2 4 40 yyyxx 4 +2 3 40 xxx 3 +2 4 40 xx 4 +2 3 40 yyxzx 3 +2 4 40 xyx 4 +2 3 40 xxxzz 3 +2 4 40 xxz 4 +2 3 40 zzxxx 3 +2 4 40 zxx 4 +2 3 40 xyyxx 3 +2 4 40 xzzzx 4 +2 3 40 yzxxx 3 +2 4 40 xxzy 4 +insert into t2 values +(3), (4), (5); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null +select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null; +a tp a b c +explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null +select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null; +a tp a b c +set join_cache_level=@save_join_cache_level; +set optimizer_switch=@save_optimizer_switch; +drop table t0,t1,t2; +# # MDEV-21628: Index condition pushdown for a simple condition over # index fields is not used for ref access of partitioned tables when employing BKA # @@ -115,11 +272,8 @@ insert into t2 select a+10 from t2; insert into t2 select a+20 from t2; analyze table t0,t1,t2; Table Op Msg_type Msg_text -test.t0 analyze status Engine-independent statistics collected test.t0 analyze status OK -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 set @tmp1=@@join_cache_level, @tmp2=@@optimizer_switch; set join_cache_level=6, optimizer_switch='mrr=on'; @@ -127,12 +281,12 @@ explain select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index -1 SIMPLE t0 ref idx idx 5 test.t2.a 12 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan +1 SIMPLE t0 ref idx idx 5 test.t2.a 13 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan # This will use "Using index condition(BKA)" explain select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index -1 SIMPLE t1 ref idx idx 5 test.t2.a 12 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan +1 SIMPLE t1 ref idx idx 5 test.t2.a 8 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan set join_cache_level=@tmp1, optimizer_switch=@tmp2; drop table t0,t1,t2; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 130c7f7e4d5..48610cabd4f 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -6264,9 +6264,10 @@ static bool partition_multi_range_key_skip_record(range_seq_t seq, { PARTITION_PART_KEY_MULTI_RANGE_HLD *hld= (PARTITION_PART_KEY_MULTI_RANGE_HLD *)seq; + PARTITION_KEY_MULTI_RANGE *pkmr= (PARTITION_KEY_MULTI_RANGE *)range_info; DBUG_ENTER("partition_multi_range_key_skip_record"); DBUG_RETURN(hld->partition->m_seq_if->skip_record(hld->partition->m_seq, - range_info, rowid)); + pkmr->ptr, rowid)); } @@ -6275,9 +6276,10 @@ static bool partition_multi_range_key_skip_index_tuple(range_seq_t seq, { PARTITION_PART_KEY_MULTI_RANGE_HLD *hld= (PARTITION_PART_KEY_MULTI_RANGE_HLD *)seq; + PARTITION_KEY_MULTI_RANGE *pkmr= (PARTITION_KEY_MULTI_RANGE *)range_info; DBUG_ENTER("partition_multi_range_key_skip_index_tuple"); DBUG_RETURN(hld->partition->m_seq_if->skip_index_tuple(hld->partition->m_seq, - range_info)); + pkmr->ptr)); } ha_rows ha_partition::multi_range_read_info_const(uint keyno, -- cgit v1.2.1 From a662cb9b4329abc6f3895fed97c80434e8f78b20 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Tue, 25 Feb 2020 14:55:15 +0300 Subject: Better comments --- sql/ha_partition.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/sql/ha_partition.h b/sql/ha_partition.h index fc6c8c4d570..6bc067af3e7 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -224,7 +224,7 @@ typedef struct st_partition_key_multi_range /* - List of ranges to be scanned in a certain [sub]partition. + List of ranges to be scanned in a certain [sub]partition The idea is that there's a list of ranges to be scanned in the table (formed by PARTITION_KEY_MULTI_RANGE structures), @@ -260,10 +260,10 @@ typedef struct st_partition_part_key_multi_range_hld /* Owner object */ ha_partition *partition; - // id of the the partition this structure is for + /* id of the the partition this structure is for */ uint32 part_id; - // Current range we're iterating through. + /* Current range we're iterating through */ PARTITION_PART_KEY_MULTI_RANGE *partition_part_key_multi_range; } PARTITION_PART_KEY_MULTI_RANGE_HLD; @@ -867,28 +867,31 @@ public: uint m_mrr_new_full_buffer_size; MY_BITMAP m_mrr_used_partitions; uint *m_stock_range_seq; - // not used: uint m_current_range_seq; + /* not used: uint m_current_range_seq; */ - // Value of mrr_mode passed to ha_partition::multi_range_read_init + /* Value of mrr_mode passed to ha_partition::multi_range_read_init */ uint m_mrr_mode; - // Value of n_ranges passed to ha_partition::multi_range_read_init + /* Value of n_ranges passed to ha_partition::multi_range_read_init */ uint m_mrr_n_ranges; /* Ordered MRR mode: m_range_info[N] has the range_id of the last record that - we've got from partition N. + we've got from partition N */ range_id_t *m_range_info; - // TRUE <=> This ha_partition::multi_range_read_next() call is the first one + /* + TRUE <=> This ha_partition::multi_range_read_next() call is the first one + */ bool m_multi_range_read_first; - // not used: uint m_mrr_range_init_flags; + + /* not used: uint m_mrr_range_init_flags; */ /* Number of elements in the list pointed by m_mrr_range_first. Not used */ uint m_mrr_range_length; - // Linked list of ranges to scan + /* Linked list of ranges to scan */ PARTITION_KEY_MULTI_RANGE *m_mrr_range_first; PARTITION_KEY_MULTI_RANGE *m_mrr_range_current; @@ -897,21 +900,19 @@ public: */ uint *m_part_mrr_range_length; - /* - For each partition: List of ranges to scan in this partition. - */ + /* For each partition: List of ranges to scan in this partition */ PARTITION_PART_KEY_MULTI_RANGE **m_part_mrr_range_first; PARTITION_PART_KEY_MULTI_RANGE **m_part_mrr_range_current; PARTITION_PART_KEY_MULTI_RANGE_HLD *m_partition_part_key_multi_range_hld; /* - Sequence of ranges to be scanned (TODO: why not stores this in + Sequence of ranges to be scanned (TODO: why not store this in handler::mrr_{iter,funcs}?) */ range_seq_t m_seq; RANGE_SEQ_IF *m_seq_if; - // Range iterator structure to be supplied to partitions + /* Range iterator structure to be supplied to partitions */ RANGE_SEQ_IF m_part_seq_if; virtual int multi_range_key_create_key( -- cgit v1.2.1 From 42b29d41335d2f6991b8c9f110fe1e1476764ace Mon Sep 17 00:00:00 2001 From: Alexey Bychko Date: Tue, 25 Feb 2020 17:59:49 +0700 Subject: MENT-645 Undefined symbols for architecture x86_64: _pam_syslog added cmake checks for pam_ext.h and pam_appl.h headers added check for pam_syslog() added pam_syslog() if doesn't exist all cmake checks performed from inside the plugin --- plugin/auth_pam/CMakeLists.txt | 14 ++++++++++++++ plugin/auth_pam/mapper/pam_user_map.c | 30 ++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt index 0efb0b07feb..c826b422240 100644 --- a/plugin/auth_pam/CMakeLists.txt +++ b/plugin/auth_pam/CMakeLists.txt @@ -1,10 +1,24 @@ INCLUDE (CheckIncludeFiles) INCLUDE (CheckFunctionExists) +CHECK_INCLUDE_FILES (security/pam_ext.h HAVE_PAM_EXT_H) CHECK_INCLUDE_FILES (security/pam_appl.h HAVE_PAM_APPL_H) CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP) +SET(CMAKE_REQUIRED_LIBRARIES pam) +CHECK_FUNCTION_EXISTS(pam_syslog HAVE_PAM_SYSLOG) +SET(CMAKE_REQUIRED_LIBRARIES) + +IF(HAVE_PAM_SYSLOG) + ADD_DEFINITIONS(-DHAVE_PAM_SYSLOG) +ENDIF() + +IF(HAVE_PAM_EXT_H) + ADD_DEFINITIONS(-DHAVE_PAM_EXT_H) +ENDIF() + IF(HAVE_PAM_APPL_H) + ADD_DEFINITIONS(-DHAVE_PAM_APPL_H) IF(HAVE_STRNDUP) ADD_DEFINITIONS(-DHAVE_STRNDUP) ENDIF(HAVE_STRNDUP) diff --git a/plugin/auth_pam/mapper/pam_user_map.c b/plugin/auth_pam/mapper/pam_user_map.c index e1d11acabb9..9d7ed53f8b1 100644 --- a/plugin/auth_pam/mapper/pam_user_map.c +++ b/plugin/auth_pam/mapper/pam_user_map.c @@ -2,7 +2,7 @@ Pam module to change user names arbitrarily in the pam stack. Compile as - + gcc pam_user_map.c -shared -lpam -fPIC -o pam_user_map.so Install as appropriate (for example, in /lib/security/). @@ -39,14 +39,36 @@ and usually end up in /var/log/secure file. #include #include +#ifdef HAVE_PAM_EXT_H #include +#endif + +#ifdef HAVE_PAM_APPL_H +#include +#include +#endif + #include +#ifndef HAVE_PAM_SYSLOG +#include +static void +pam_syslog (const pam_handle_t *pamh, int priority, + const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + vsyslog (priority, fmt, args); + va_end (args); +} +#endif + #define FILENAME "/etc/security/user_map.conf" #define skip(what) while (*s && (what)) s++ +#define SYSLOG_DEBUG if (mode_debug) pam_syslog #define GROUP_BUFFER_SIZE 100 - +static const char debug_keyword[]= "debug"; static int populate_user_groups(const char *user, gid_t **groups) { @@ -128,10 +150,6 @@ static void print_groups(pam_handle_t *pamh, const gid_t *user_groups, int ng) ng, (ng == 1) ? "group" : "groups", buf+1); } - -static const char debug_keyword[]= "debug"; -#define SYSLOG_DEBUG if (mode_debug) pam_syslog - int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { -- cgit v1.2.1 From 8382f106916b8369b8e903d24dbd7233b48ceb80 Mon Sep 17 00:00:00 2001 From: Alexey Bychko Date: Wed, 26 Feb 2020 13:01:18 +0700 Subject: MENT-606 Error while setting value 'aes_ctr' to 'file-key-management-encryption-algorithm' cmake cannot detect openssl headers on Mac during checks. the solution is to add path to openssl includes to CMAKE_REQUIRED_INCLUDES before checks. --- cmake/ssl.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index b00250cf367..d87d2c8fbd0 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -147,6 +147,7 @@ MACRO (MYSQL_CHECK_SSL) SET(SSL_DEFINES "-DHAVE_OPENSSL") SET(CMAKE_REQUIRED_LIBRARIES ${SSL_LIBRARIES}) + SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h" HAVE_ERR_remove_thread_state) CHECK_SYMBOL_EXISTS(EVP_aes_128_ctr "openssl/evp.h" -- cgit v1.2.1 From f21592c675e198ba6298748b40e5d695a17f4e5f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 1 Nov 2018 13:16:11 -0400 Subject: mariadb.pc: remove unnecessary include directory When installing, no headers are installed into the parent directory of `${includedir}`. --- support-files/mariadb.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/mariadb.pc.in b/support-files/mariadb.pc.in index bc84a5c5c4c..7d321f28491 100644 --- a/support-files/mariadb.pc.in +++ b/support-files/mariadb.pc.in @@ -20,4 +20,4 @@ Description: @CPACK_PACKAGE_DESCRIPTION_SUMMARY@ URL: @CPACK_PACKAGE_URL@ Version: @VERSION@ Libs: -L${libdir} @LIBS_FOR_CLIENTS@ -Cflags: -I${includedir} -I${includedir}/.. @CFLAGS_FOR_CLIENTS@ +Cflags: -I${includedir} @CFLAGS_FOR_CLIENTS@ -- cgit v1.2.1 From 395f23a10d44a63732dd69f79fb7372bc5834443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Fri, 28 Feb 2020 19:54:08 +0200 Subject: Remove unneded extra context line from test file to make it version independent --- mysql-test/r/mysqld--defaults-file.result | 2 -- mysql-test/t/mysqld--defaults-file.test | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/mysqld--defaults-file.result b/mysql-test/r/mysqld--defaults-file.result index be62580c47e..ccad1d119fc 100644 --- a/mysql-test/r/mysqld--defaults-file.result +++ b/mysql-test/r/mysqld--defaults-file.result @@ -17,8 +17,6 @@ Fatal error in defaults handling. Program aborted # Test on `defaults-file` Default options are read from the following files in the given order: MYSQLTEST_VARDIR/my.cnf -The following groups are read: mysqld server mysqld-10.1 mariadb mariadb-10.1 client-server galera # Test on `defaults-extra-file` Default options are read from the following files in the given order: MYSQLTEST_VARDIR/my_test.cnf ~/.my.cnf -The following groups are read: mysqld server mysqld-10.1 mariadb mariadb-10.1 client-server galera diff --git a/mysql-test/t/mysqld--defaults-file.test b/mysql-test/t/mysqld--defaults-file.test index acc1cea5b8c..91d30eb1617 100644 --- a/mysql-test/t/mysqld--defaults-file.test +++ b/mysql-test/t/mysqld--defaults-file.test @@ -36,12 +36,12 @@ exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1; --echo # Test on `defaults-file` --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --help --verbose | grep -A 2 'Default options are read'; +exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --help --verbose | grep -A 1 'Default options are read'; --echo # Test on `defaults-extra-file` # = `/etc/my.cnf /etc/mysql/my.cnf` # Using sysconfdir configuration, we don't always have `/etc/mysql/my.cnf`, so replace them with a regex as well. copy_file $MYSQLTEST_VARDIR/my.cnf $MYSQLTEST_VARDIR/my_test.cnf; --replace_regex /.*my_test.cnf/ MYSQLTEST_VARDIR\/my_test.cnf/ -exec $MYSQLD --defaults-extra-file=$MYSQLTEST_VARDIR/my_test.cnf --help --verbose | grep -A 2 'Default options are read'; +exec $MYSQLD --defaults-extra-file=$MYSQLTEST_VARDIR/my_test.cnf --help --verbose | grep -A 1 'Default options are read'; remove_file $MYSQLTEST_VARDIR/my_test.cnf; -- cgit v1.2.1 From f0d2542a37ccd0509ab37ebaa7661604f00db80d Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 2 Mar 2020 16:35:57 +0100 Subject: MDEV-21857 - Fix sporadic failure of mdev375 status threads_connected can temporarily be bigger than max_connections+1 If SHOW STATUS LIKE "Threads_connected" comes after ER_CON_COUNT_ERROR is sent to the client, but before the counter is decremented, Threads_connected can differ from the expected value. --- mysql-test/t/mdev375.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/t/mdev375.test b/mysql-test/t/mdev375.test index 9e35190b927..6fdb35016ca 100644 --- a/mysql-test/t/mdev375.test +++ b/mysql-test/t/mdev375.test @@ -27,6 +27,8 @@ SELECT 2; --connection default SELECT 0; +let $count_sessions=11; +--source include/wait_until_count_sessions.inc show status like "Threads_connected"; SET GLOBAL log_warnings=@save_log_warnings; -- cgit v1.2.1 From f8ab5ca374243977f331cdf6e569386230a7fddb Mon Sep 17 00:00:00 2001 From: Anel Husakovic Date: Fri, 28 Feb 2020 14:40:00 +0100 Subject: MDEV-20382: SHOW PRIVILEGES displays "Delete versioning rows" rather than "Delete History" --- mysql-test/main/grant.result | 2 +- sql/sql_show.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result index d89afbc320c..56d2eb8e6b1 100644 --- a/mysql-test/main/grant.result +++ b/mysql-test/main/grant.result @@ -612,7 +612,7 @@ Create temporary tables Databases To use CREATE TEMPORARY TABLE Create view Tables To create new views Create user Server Admin To create new users Delete Tables To delete existing rows -Delete versioning rows Tables To delete versioning table historical rows +Delete history Tables To delete versioning table historical rows Drop Databases,Tables To drop databases, tables, and views Event Server Admin To create, alter, drop and execute events Execute Functions,Procedures To execute stored routines diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 0b35789b869..7240cb3264c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -592,7 +592,7 @@ static struct show_privileges_st sys_privileges[]= {"Create view", "Tables", "To create new views"}, {"Create user", "Server Admin", "To create new users"}, {"Delete", "Tables", "To delete existing rows"}, - {"Delete versioning rows", "Tables", "To delete versioning table historical rows"}, + {"Delete history", "Tables", "To delete versioning table historical rows"}, {"Drop", "Databases,Tables", "To drop databases, tables, and views"}, #ifdef HAVE_EVENT_SCHEDULER {"Event","Server Admin","To create, alter, drop and execute events"}, -- cgit v1.2.1 From c5c1027c6eb0db9738c231731b664f9736970d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Wed, 26 Feb 2020 13:46:27 +0200 Subject: MDEV-19208 mariadb.pc: install into libdir The .pc file installed by mariadb mentions archful directories and therefore must be archful itself. This fixes MDEV-14340. --- debian/libmariadb-dev.install | 2 +- support-files/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/libmariadb-dev.install b/debian/libmariadb-dev.install index e62aad1b43f..856cdacfd95 100644 --- a/debian/libmariadb-dev.install +++ b/debian/libmariadb-dev.install @@ -5,5 +5,5 @@ usr/lib/*/libmysqlclient.so usr/lib/*/libmariadbclient.so usr/lib/*/libmariadbclient.a usr/lib/*/libmysqlservices.a +usr/lib/*/pkgconfig/mariadb.pc usr/share/aclocal/mysql.m4 -usr/share/pkgconfig/mariadb.pc diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 92a46b7b12a..038e7163901 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -100,7 +100,7 @@ IF(UNIX) ENDIF() CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig COMPONENT Development) INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) -- cgit v1.2.1 From 91aae18cc44e4ae7931b380077920124c3e42179 Mon Sep 17 00:00:00 2001 From: Stepan Patryshev Date: Fri, 6 Mar 2020 13:46:19 +0200 Subject: Enable galera.galera_ist_mariabackup and galera.mysql-wsrep#33. --- mysql-test/suite/galera/disabled.def | 2 -- 1 file changed, 2 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index bd505bfc490..27691c8f4b5 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -19,7 +19,6 @@ galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc galera_gcache_recover_manytrx : MDEV-18834 Galera test failure -galera_ist_mariabackup : MDEV-18829 test leaves port open galera_ist_progress : MDEV-15236 fails when trying to read transfer status galera_load_data : MDEV-19968 galera.galera_load_data galera_parallel_autoinc_largetrx : MDEV-20916 galera.galera_parallel_autoinc_largetrx @@ -31,7 +30,6 @@ galera_sst_mariabackup_table_options: MDEV-19741 Galera test failure on galera.g galera_var_innodb_disallow_writes : MDEV-20928 galera.galera_var_innodb_disallow_writes galera_var_node_address : MDEV-20485 Galera test failure galera_wan : MDEV-17259 Test failure on galera.galera_wan -mysql-wsrep#33 : MDEV-21420 galera.mysql-wsrep#33 partition : MDEV-19958 Galera test failure on galera.partition query_cache: MDEV-15805 Test failure on galera.query_cache sql_log_bin : MDEV-21491 galera.sql_log_bin -- cgit v1.2.1