mirror of
https://github.com/MariaDB/server.git
synced 2025-01-25 08:14:18 +01:00
Merge 10.5 into 10.6
This commit is contained in:
commit
8bd5a3de7f
43 changed files with 447 additions and 134 deletions
mysql-test
sql
item.ccitem_cmpfunc.ccitem_cmpfunc.hsp_cache.ccsql_class.hsql_lex.ccwsrep_mysqld.ccwsrep_mysqld.hwsrep_plugin.ccwsrep_thd.ccwsrep_thd.h
storage/innobase
win/packaging
|
@ -11,3 +11,39 @@ Database Create Database
|
|||
mysql_TEST CREATE DATABASE `mysql_TEST` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */
|
||||
DROP DATABASE mysql_test;
|
||||
DROP DATABASE mysql_TEST;
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-33019 The database part is not case sensitive in SP names
|
||||
#
|
||||
CREATE DATABASE DB1;
|
||||
CREATE DATABASE db1;
|
||||
CREATE PROCEDURE DB1.sp() SELECT 'This is DB1.sp' AS ret;
|
||||
CREATE PROCEDURE db1.sp() SELECT 'This is db1.sp' AS ret;
|
||||
CALL DB1.sp();
|
||||
ret
|
||||
This is DB1.sp
|
||||
CALL db1.sp();
|
||||
ret
|
||||
This is db1.sp
|
||||
DROP DATABASE DB1;
|
||||
CALL DB1.sp();
|
||||
ERROR 42000: PROCEDURE DB1.sp does not exist
|
||||
CALL db1.sp();
|
||||
ret
|
||||
This is db1.sp
|
||||
DROP DATABASE db1;
|
||||
CREATE PROCEDURE SP() SELECT 'This is SP' AS ret;
|
||||
CREATE PROCEDURE sp() SELECT 'This is sp' AS ret;
|
||||
ERROR 42000: PROCEDURE sp already exists
|
||||
CALL SP();
|
||||
ret
|
||||
This is SP
|
||||
CALL sp();
|
||||
ret
|
||||
This is SP
|
||||
DROP PROCEDURE SP;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
|
|
@ -18,3 +18,34 @@ DROP DATABASE mysql_test;
|
|||
DROP DATABASE mysql_TEST;
|
||||
|
||||
# End of 10.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33019 The database part is not case sensitive in SP names
|
||||
--echo #
|
||||
|
||||
CREATE DATABASE DB1;
|
||||
CREATE DATABASE db1;
|
||||
CREATE PROCEDURE DB1.sp() SELECT 'This is DB1.sp' AS ret;
|
||||
CREATE PROCEDURE db1.sp() SELECT 'This is db1.sp' AS ret;
|
||||
CALL DB1.sp();
|
||||
CALL db1.sp();
|
||||
DROP DATABASE DB1;
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
CALL DB1.sp();
|
||||
CALL db1.sp();
|
||||
DROP DATABASE db1;
|
||||
|
||||
CREATE PROCEDURE SP() SELECT 'This is SP' AS ret;
|
||||
--error ER_SP_ALREADY_EXISTS
|
||||
CREATE PROCEDURE sp() SELECT 'This is sp' AS ret;
|
||||
CALL SP();
|
||||
CALL sp();
|
||||
DROP PROCEDURE SP;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
|
|
@ -3224,4 +3224,83 @@ FROM x
|
|||
)
|
||||
);
|
||||
ERROR 21000: Operand should contain 2 column(s)
|
||||
#
|
||||
# MDEV-29362: Constant subquery used as left part of IN subquery
|
||||
#
|
||||
CREATE TABLE t1 (a int) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (15), (1), (2);
|
||||
CREATE TABLE t2 (b int) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (15), (1);
|
||||
CREATE TABLE t3 (c int) ENGINE=MyISAM;
|
||||
INSERT INTO t3 VALUES (15), (1);
|
||||
SET optimizer_switch='condition_pushdown_from_having=off';
|
||||
SELECT a FROM t1 GROUP BY a
|
||||
HAVING a = ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) ) + 1;
|
||||
a
|
||||
2
|
||||
SELECT a FROM t1 GROUP BY a
|
||||
HAVING a IN ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) );
|
||||
a
|
||||
1
|
||||
SET optimizer_switch='condition_pushdown_from_having=on';
|
||||
SELECT a FROM t1 GROUP BY a
|
||||
HAVING a = ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) ) + 1;
|
||||
a
|
||||
2
|
||||
SELECT a FROM t1 GROUP BY a
|
||||
HAVING a IN ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) );
|
||||
a
|
||||
1
|
||||
EXPLAIN FORMAT=JSON SELECT a FROM t1 GROUP BY a
|
||||
HAVING a = ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) ) + 1;
|
||||
EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t1.a = <cache>((<in_optimizer>((subquery#2),<exists>(subquery#3))) + 1)"
|
||||
},
|
||||
"subqueries": [
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"having_condition": "trigcond(t3.c is null)",
|
||||
"table": {
|
||||
"table_name": "t3",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "trigcond(1 = t3.c or t3.c is null)"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t2.b = 1"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
PREPARE stmt FROM "SELECT a FROM t1 GROUP BY a
|
||||
HAVING a = ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) ) + 1";
|
||||
EXECUTE stmt;
|
||||
a
|
||||
2
|
||||
EXECUTE stmt;
|
||||
a
|
||||
2
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1,t2,t3;
|
||||
# End of 10.4 tests
|
||||
|
|
|
@ -2633,5 +2633,41 @@ SELECT
|
|||
)
|
||||
);
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-29362: Constant subquery used as left part of IN subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (15), (1), (2);
|
||||
CREATE TABLE t2 (b int) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (15), (1);
|
||||
CREATE TABLE t3 (c int) ENGINE=MyISAM;
|
||||
INSERT INTO t3 VALUES (15), (1);
|
||||
|
||||
let $q1=
|
||||
SELECT a FROM t1 GROUP BY a
|
||||
HAVING a = ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) ) + 1;
|
||||
let $q2=
|
||||
SELECT a FROM t1 GROUP BY a
|
||||
HAVING a IN ( (SELECT b FROM t2 where b=1) IN (SELECT c FROM t3) );
|
||||
|
||||
SET optimizer_switch='condition_pushdown_from_having=off';
|
||||
|
||||
eval $q1;
|
||||
eval $q2;
|
||||
|
||||
SET optimizer_switch='condition_pushdown_from_having=on';
|
||||
|
||||
eval $q1;
|
||||
eval $q2;
|
||||
|
||||
eval EXPLAIN FORMAT=JSON $q1;
|
||||
|
||||
eval PREPARE stmt FROM "$q1";
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
galera_as_slave_ctas : MDEV-28378 timeout
|
||||
galera_pc_recovery : MDEV-25199 cluster fails to start up
|
||||
galera_sst_encrypted : MDEV-29876 Galera test failure on galera_sst_encrypted
|
||||
galera_var_node_address : MDEV-20485 Galera test failure
|
||||
galera_bf_kill_debug : timeout after 900 seconds
|
||||
galera_ssl_upgrade : [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 130: Incorrect file format 'gtid_slave_pos'
|
||||
galera_insert_bulk : MDEV-30536 no expected deadlock in galera_insert_bulk test
|
||||
|
|
|
@ -71,13 +71,17 @@ push @::global_suppressions,
|
|||
sub which($) { return `sh -c "command -v $_[0]"` }
|
||||
|
||||
sub skip_combinations {
|
||||
my %skip = ();
|
||||
my @combinations;
|
||||
|
||||
$skip{'include/have_mariabackup.inc'} = 'Need socket statistics utility'
|
||||
unless which("lsof") || which("sockstat") || which("ss");
|
||||
$skip{'include/have_stunnel.inc'} = "Need 'stunnel' utility"
|
||||
unless which("stunnel");
|
||||
$skip{'include/have_qpress.inc'} = "Need 'qpress' utility"
|
||||
unless which("qpress");
|
||||
$skip{'../encryption/include/have_file_key_management_plugin.combinations'} = [ 'ctr' ]
|
||||
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
|
||||
and $1 ge "1.0.1";
|
||||
%skip;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
# NEXTVAL
|
||||
|
||||
--connection node_1
|
||||
|
@ -54,3 +56,4 @@ SELECT NEXTVAL(seq_transaction) = 4;
|
|||
DROP SEQUENCE seq_transaction;
|
||||
DROP TABLE t1;
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -12,13 +12,17 @@ INSERT INTO t1 VALUES (1);
|
|||
|
||||
SELECT COUNT(*) > 0 FROM mysql.general_log;
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT 1 = 1 FROM t1;
|
||||
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1';
|
||||
--enable_ps2_protocol
|
||||
|
||||
--connection node_2
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT 2 = 2 FROM t1;
|
||||
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';
|
||||
--enable_ps2_protocol
|
||||
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
#
|
||||
# Ensure that the query cache behaves properly with respect to Galera
|
||||
#
|
||||
|
@ -65,3 +67,4 @@ SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_
|
|||
|
||||
DROP TABLE t1;
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
--source include/have_query_cache.inc
|
||||
--source include/galera_have_debug_sync.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
|
@ -88,3 +90,5 @@ DROP TABLE t1;
|
|||
|
||||
--connection node_2a
|
||||
SET DEBUG_SYNC = "RESET";
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
call mtr.add_suppression("WSREP: Stray state UUID msg: .*");
|
||||
call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .*");
|
||||
call mtr.add_suppression("WSREP: Sending JOIN failed: .*");
|
||||
flush tables;
|
||||
connection node_1;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE
|
||||
4
|
||||
connection node_1;
|
||||
3
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB;
|
||||
connection node_2;
|
||||
set global wsrep_sync_wait=15;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_3;
|
||||
set global wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
DROP TABLE t1;
|
|
@ -1,4 +1,4 @@
|
|||
!include ../galera_4nodes.cnf
|
||||
!include ../galera_3nodes.cnf
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_node_address=127.0.0.1
|
||||
|
@ -6,5 +6,3 @@ wsrep_node_address=127.0.0.1
|
|||
[mysqld.3]
|
||||
wsrep_node_address=localhost
|
||||
|
||||
[mysqld.4]
|
||||
wsrep_node_address=lo
|
|
@ -6,27 +6,27 @@
|
|||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
call mtr.add_suppression("WSREP: Stray state UUID msg: .*");
|
||||
call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .*");
|
||||
call mtr.add_suppression("WSREP: Sending JOIN failed: .*");
|
||||
flush tables;
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB;
|
||||
|
||||
--connection node_2
|
||||
set global wsrep_sync_wait=15;
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connection node_3
|
||||
set global wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
DROP TABLE t1;
|
|
@ -9,5 +9,3 @@
|
|||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
galera_sr_kill_slave_after_apply_rollback2 : MDEV-29892 Galera test failure on galera_sr_kill_slave_after_apply_rollback2
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
--source include/galera_cluster.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
--connection node_2
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
|
||||
|
@ -45,3 +47,6 @@ CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
|
|||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connection node_3
|
||||
--source include/galera_wait_ready.inc
|
||||
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
#
|
||||
# Test the effect of gmcast.isolate on master during an SR transaction
|
||||
#
|
||||
|
@ -133,3 +134,4 @@ CALL mtr.add_suppression("failed to send SR rollback for");
|
|||
DROP TABLE t1;
|
||||
|
||||
--source ../galera/include/auto_increment_offset_restore.inc
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -11,4 +11,3 @@
|
|||
##############################################################################
|
||||
|
||||
GCF-1060 : MDEV-32160 GCF-1060 test failure due to wsrep MDL conflict
|
||||
galera_sr_cc_master : MDEV-29882 Galera test failure on galera_sr_cc_master
|
||||
|
|
|
@ -13,12 +13,12 @@ INSERT INTO t1 VALUES (2);
|
|||
INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
|
||||
EXPECT_5
|
||||
5
|
||||
connection node_1;
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
|
||||
EXPECT_5
|
||||
5
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2a;
|
||||
|
@ -29,8 +29,8 @@ connection node_2;
|
|||
INSERT INTO t1 VALUES (6);
|
||||
ERROR HY000: Lost connection to server during query
|
||||
connection node_1;
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
EXPECT_0
|
||||
0
|
||||
connection node_2a;
|
||||
connection node_1;
|
||||
|
@ -38,8 +38,8 @@ connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|||
connection node_2b;
|
||||
SELECT * FROM mysql.wsrep_streaming_log;
|
||||
node_uuid trx_id seqno flags frag
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
EXPECT_0
|
||||
0
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
|
@ -49,18 +49,20 @@ INSERT INTO t1 VALUES (3);
|
|||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
EXPECT_0
|
||||
0
|
||||
connection node_1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM t1;
|
||||
EXPECT_5
|
||||
5
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*)
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
EXPECT_0
|
||||
0
|
||||
DROP TABLE t1;
|
||||
connection node_2b;
|
||||
CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
|
||||
disconnect node_2;
|
||||
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
disconnect node_2a;
|
||||
disconnect node_2b;
|
||||
|
|
|
@ -26,6 +26,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -91,6 +92,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -156,6 +158,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -221,6 +224,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -286,6 +290,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -351,6 +356,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -416,6 +422,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -481,6 +488,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -546,6 +554,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -611,6 +620,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -676,6 +686,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -741,6 +752,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -806,6 +818,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -871,6 +884,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -936,6 +950,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
@ -1001,6 +1016,7 @@ f1 f2
|
|||
connection node_1c;
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (3, 'c');
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
|
|
|
@ -28,10 +28,13 @@ INSERT INTO t1 VALUES (3);
|
|||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
--let $wait_condition = SELECT COUNT(*) = 5 FROM mysql.wsrep_streaming_log
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
|
||||
|
||||
#
|
||||
# Trigger CC . The transaction is aborted and we expect the SR tables to be cleaned up
|
||||
|
@ -52,7 +55,9 @@ SET SESSION wsrep_sync_wait = DEFAULT;
|
|||
INSERT INTO t1 VALUES (6);
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
|
||||
# Restore cluster
|
||||
|
||||
|
@ -69,8 +74,10 @@ SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
|||
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
--connection node_2b
|
||||
--source include/galera_wait_ready.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
|
||||
--source include/wait_condition.inc
|
||||
SELECT * FROM mysql.wsrep_streaming_log;
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
|
||||
# Repeat transaction to confirm no locks are left from previous transaction
|
||||
|
||||
|
@ -83,11 +90,13 @@ INSERT INTO t1 VALUES (4);
|
|||
INSERT INTO t1 VALUES (5);
|
||||
COMMIT;
|
||||
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
|
||||
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -98,3 +107,6 @@ CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
|
|||
--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
# Restore original auto_increment_offset values.
|
||||
--source ../galera/include/auto_increment_offset_restore.inc
|
||||
|
||||
--disconnect node_2a
|
||||
--disconnect node_2b
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/big_test.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
|
||||
|
@ -56,3 +58,4 @@ CALL mtr.add_suppression('InnoDB: Resizing redo log from');
|
|||
CALL mtr.add_suppression('InnoDB: Starting to delete and rewrite log files');
|
||||
CALL mtr.add_suppression('InnoDB: New log files created, LSN=');
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/big_test.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
|
||||
|
@ -51,3 +53,5 @@ SELECT COUNT(*) = 0 FROM t1;
|
|||
|
||||
DROP TABLE ten;
|
||||
DROP TABLE t1;
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -46,6 +46,10 @@ SELECT * FROM t1;
|
|||
SET AUTOCOMMIT=ON;
|
||||
--send INSERT INTO t1 VALUES (3, 'c')
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_2
|
||||
SELECT * FROM t1;
|
||||
|
||||
|
@ -54,7 +58,7 @@ SELECT * FROM t1;
|
|||
--send UPDATE t1 SET f2 = 'a' WHERE f1 = 2
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER != 'system user' AND STATE = 'Updating';
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Will deadlock
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
doublewrite_debug : MDEV-33098 occasionally fails to start up InnoDB
|
|
@ -12,7 +12,7 @@ innodb_fil_make_page_dirty_debug 0
|
|||
show variables like 'innodb_saved_page_number_debug';
|
||||
Variable_name Value
|
||||
innodb_saved_page_number_debug 0
|
||||
create table t1 (f1 int primary key, f2 blob) engine=innodb;
|
||||
create table t1 (f1 int primary key, f2 blob) engine=innodb stats_persistent=0;
|
||||
start transaction;
|
||||
insert into t1 values(1, repeat('#',12));
|
||||
insert into t1 values(2, repeat('+',12));
|
||||
|
@ -23,7 +23,7 @@ commit work;
|
|||
# Test Begin: Test if recovery works if 1st page and 2nd page
|
||||
# of system tablespace is full of zeroes.
|
||||
SET GLOBAL innodb_fast_shutdown = 0;
|
||||
# restart
|
||||
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
|
||||
begin;
|
||||
insert into t1 values (6, repeat('%', 400));
|
||||
# Make the first page dirty for system tablespace
|
||||
|
@ -33,6 +33,7 @@ set global innodb_fil_make_page_dirty_debug = 0;
|
|||
set global innodb_saved_page_number_debug = 1;
|
||||
set global innodb_fil_make_page_dirty_debug = 0;
|
||||
set global innodb_buf_flush_list_now = 1;
|
||||
# Kill the server
|
||||
# Make the 1st page (page_no=0) and 2nd page (page_no=1)
|
||||
# of the system tablespace all zeroes.
|
||||
# restart
|
||||
|
@ -52,7 +53,7 @@ f1 f2
|
|||
# ---------------------------------------------------------------
|
||||
# Test Begin: Test if recovery works if 1st page of
|
||||
# system tablespace is corrupted and 2nd page as corrupted.
|
||||
set global innodb_log_checkpoint_now = 1;
|
||||
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
|
||||
begin;
|
||||
insert into t1 values (6, repeat('%', 400));
|
||||
# Make the first page dirty for system tablespace
|
||||
|
@ -62,6 +63,7 @@ set global innodb_fil_make_page_dirty_debug = 0;
|
|||
set global innodb_saved_page_number_debug = 1;
|
||||
set global innodb_fil_make_page_dirty_debug = 0;
|
||||
set global innodb_buf_flush_list_now = 1;
|
||||
# Kill the server
|
||||
# Corrupt the 1st page (page_no=0) and 2nd page of the system tablespace.
|
||||
# restart
|
||||
FOUND 2 /InnoDB: Restoring page \[page id: space=0, page number=0\] of datafile/ in mysqld.1.err
|
||||
|
@ -83,7 +85,7 @@ drop table t1;
|
|||
# MDEV-12600 crash during install_db with innodb_page_size=32K
|
||||
# and ibdata1=3M
|
||||
#
|
||||
# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-data-file-path=ibdata1:1M;ibdata2:1M:autoextend
|
||||
# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-undo-tablespaces=0 --innodb-data-file-path=ibdata1:1M;ibdata2:1M:autoextend
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
|
|
|
@ -12,6 +12,7 @@ check table t1;
|
|||
Table Op Msg_type Msg_text
|
||||
test.t1 check Warning InnoDB: Index 'b' contains 990 entries, should be 1024.
|
||||
test.t1 check error Corrupt
|
||||
SET GLOBAL innodb_buf_flush_list_now=ON;
|
||||
# restart: --innodb-force_recovery=0
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
# restart: --innodb-force_recovery=0
|
||||
|
|
|
@ -28,7 +28,7 @@ show variables like 'innodb_doublewrite';
|
|||
show variables like 'innodb_fil_make_page_dirty_debug';
|
||||
show variables like 'innodb_saved_page_number_debug';
|
||||
|
||||
create table t1 (f1 int primary key, f2 blob) engine=innodb;
|
||||
create table t1 (f1 int primary key, f2 blob) engine=innodb stats_persistent=0;
|
||||
|
||||
start transaction;
|
||||
insert into t1 values(1, repeat('#',12));
|
||||
|
@ -44,7 +44,9 @@ commit work;
|
|||
# Slow shutdown and restart to make sure ibuf merge is finished
|
||||
SET GLOBAL innodb_fast_shutdown = 0;
|
||||
let $shutdown_timeout=;
|
||||
let $restart_parameters="--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0";
|
||||
--source include/restart_mysqld.inc
|
||||
--source ../include/no_checkpoint_start.inc
|
||||
begin;
|
||||
insert into t1 values (6, repeat('%', 400));
|
||||
|
||||
|
@ -57,8 +59,20 @@ set global innodb_saved_page_number_debug = 1;
|
|||
set global innodb_fil_make_page_dirty_debug = 0;
|
||||
|
||||
set global innodb_buf_flush_list_now = 1;
|
||||
let $shutdown_timeout=0;
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--let CLEANUP_IF_CHECKPOINT=drop table t1, unexpected_checkpoint;
|
||||
# Occasionally, a checkpoint would occur on the MSAN builder.
|
||||
# We do not know the reason, because the failure can only be reproduced if there is
|
||||
# enough load in that environment.
|
||||
# Therefore, we allow the test to be skipped when run on MSAN.
|
||||
# In other environments, we want the test to fail if a checkpoint occurs,
|
||||
# so that we would catch it if it starts to happen regularly.
|
||||
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`)
|
||||
{
|
||||
--let CLEANUP_IF_CHECKPOINT=drop table t1;
|
||||
}
|
||||
|
||||
--source ../include/no_checkpoint_end.inc
|
||||
|
||||
--echo # Make the 1st page (page_no=0) and 2nd page (page_no=1)
|
||||
--echo # of the system tablespace all zeroes.
|
||||
|
@ -74,6 +88,7 @@ print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'});
|
|||
close FILE;
|
||||
EOF
|
||||
|
||||
let $restart_parameters=;
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
let SEARCH_PATTERN=InnoDB: Restoring page \[page id: space=0, page number=0\] of datafile;
|
||||
|
@ -90,7 +105,9 @@ select f1, f2 from t1;
|
|||
--echo # Test Begin: Test if recovery works if 1st page of
|
||||
--echo # system tablespace is corrupted and 2nd page as corrupted.
|
||||
|
||||
set global innodb_log_checkpoint_now = 1;
|
||||
let $restart_parameters="--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0";
|
||||
--source include/restart_mysqld.inc
|
||||
--source ../include/no_checkpoint_start.inc
|
||||
begin;
|
||||
insert into t1 values (6, repeat('%', 400));
|
||||
|
||||
|
@ -103,8 +120,8 @@ set global innodb_saved_page_number_debug = 1;
|
|||
set global innodb_fil_make_page_dirty_debug = 0;
|
||||
|
||||
set global innodb_buf_flush_list_now = 1;
|
||||
let $shutdown_timeout=0;
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--source ../include/no_checkpoint_end.inc
|
||||
|
||||
--echo # Corrupt the 1st page (page_no=0) and 2nd page of the system tablespace.
|
||||
perl;
|
||||
|
@ -119,6 +136,7 @@ print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'}/2);
|
|||
close FILE;
|
||||
EOF
|
||||
|
||||
let $restart_parameters=;
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
let SEARCH_PATTERN=InnoDB: Restoring page \[page id: space=0, page number=0\] of datafile;
|
||||
|
@ -145,7 +163,7 @@ WHERE engine = 'innodb'
|
|||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
|
||||
--let $ibp=--innodb-log-group-home-dir=$bugdir --innodb-data-home-dir=$bugdir
|
||||
--let $ibd=$ibp --innodb-undo-tablespaces=0
|
||||
--let $ibp=$ibp --innodb-undo-tablespaces=0
|
||||
--let $ibp=$ibp --innodb-data-file-path=ibdata1:1M;ibdata2:1M:autoextend
|
||||
|
||||
--let $restart_parameters= $ibp
|
||||
|
|
|
@ -74,6 +74,7 @@ EOF
|
|||
|
||||
--replace_regex /contains \d+ entries/contains 990 entries/
|
||||
check table t1;
|
||||
SET GLOBAL innodb_buf_flush_list_now=ON;
|
||||
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
|
|
|
@ -2799,11 +2799,11 @@ Item_sp::func_name_cstring(THD *thd, bool is_package_function) const
|
|||
quoted `pkg` and `func` separately, so the entire result looks like:
|
||||
`db`.`pkg`.`func`
|
||||
*/
|
||||
Database_qualified_name tmp= Database_qualified_name::split(m_name->m_name);
|
||||
DBUG_ASSERT(tmp.m_db.length);
|
||||
append_identifier(thd, &qname, &tmp.m_db);
|
||||
Identifier_chain2 tmp= Identifier_chain2::split(m_name->m_name);
|
||||
DBUG_ASSERT(tmp[0].length);
|
||||
append_identifier(thd, &qname, &tmp[0]);
|
||||
qname.append('.');
|
||||
append_identifier(thd, &qname, &tmp.m_name);
|
||||
append_identifier(thd, &qname, &tmp[1]);
|
||||
}
|
||||
else
|
||||
append_identifier(thd, &qname, &m_name->m_name);
|
||||
|
|
|
@ -1489,6 +1489,23 @@ bool Item_in_optimizer::invisible_mode()
|
|||
}
|
||||
|
||||
|
||||
bool Item_in_optimizer::walk(Item_processor processor,
|
||||
bool walk_subquery,
|
||||
void *arg)
|
||||
{
|
||||
bool res= FALSE;
|
||||
if (args[1]->type() == Item::SUBSELECT_ITEM &&
|
||||
((Item_subselect *)args[1])->substype() != Item_subselect::EXISTS_SUBS &&
|
||||
!(((Item_subselect *)args[1])->substype() == Item_subselect::IN_SUBS &&
|
||||
((Item_in_subselect *)args[1])->test_strategy(SUBS_IN_TO_EXISTS)))
|
||||
res= args[0]->walk(processor, walk_subquery, arg);
|
||||
if (!res)
|
||||
res= args[1]->walk(processor, walk_subquery, arg);
|
||||
|
||||
return res || (this->*processor)(arg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Add an expression cache for this subquery if it is needed
|
||||
|
||||
|
|
|
@ -429,6 +429,7 @@ public:
|
|||
void fix_after_pullout(st_select_lex *new_parent, Item **ref,
|
||||
bool merge) override;
|
||||
bool invisible_mode();
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg) override;
|
||||
void reset_cache() { cache= NULL; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
void restore_first_argument();
|
||||
|
|
|
@ -195,7 +195,7 @@ sp_head *sp_cache_lookup(sp_cache **cp, const Database_qualified_name *name)
|
|||
sp_cache *c= *cp;
|
||||
if (! c)
|
||||
return NULL;
|
||||
return c->lookup(buf, name->make_qname(buf, sizeof(buf)));
|
||||
return c->lookup(buf, name->make_qname(buf, sizeof(buf), true));
|
||||
}
|
||||
|
||||
|
||||
|
@ -302,7 +302,7 @@ sp_cache::~sp_cache()
|
|||
void
|
||||
sp_cache::init()
|
||||
{
|
||||
my_hash_init(key_memory_sp_cache, &m_hashtable, system_charset_info, 0, 0, 0,
|
||||
my_hash_init(key_memory_sp_cache, &m_hashtable, &my_charset_bin, 0, 0, 0,
|
||||
hash_get_key_for_sp_head, hash_free_sp_head, 0);
|
||||
}
|
||||
|
||||
|
|
100
sql/sql_class.h
100
sql/sql_class.h
|
@ -7824,6 +7824,66 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class Identifier_chain2
|
||||
{
|
||||
LEX_CSTRING m_name[2];
|
||||
public:
|
||||
Identifier_chain2()
|
||||
:m_name{Lex_cstring(), Lex_cstring()}
|
||||
{ }
|
||||
Identifier_chain2(const LEX_CSTRING &a, const LEX_CSTRING &b)
|
||||
:m_name{a, b}
|
||||
{ }
|
||||
|
||||
const LEX_CSTRING& operator [] (size_t i) const
|
||||
{
|
||||
return m_name[i];
|
||||
}
|
||||
|
||||
static Identifier_chain2 split(const LEX_CSTRING &txt)
|
||||
{
|
||||
DBUG_ASSERT(txt.str[txt.length] == '\0'); // Expect 0-terminated input
|
||||
const char *dot= strchr(txt.str, '.');
|
||||
if (!dot)
|
||||
return Identifier_chain2(Lex_cstring(), txt);
|
||||
size_t length0= dot - txt.str;
|
||||
Lex_cstring name0(txt.str, length0);
|
||||
Lex_cstring name1(txt.str + length0 + 1, txt.length - length0 - 1);
|
||||
return Identifier_chain2(name0, name1);
|
||||
}
|
||||
|
||||
// Export as a qualified name string: 'db.name'
|
||||
size_t make_qname(char *dst, size_t dstlen, bool casedn_part1) const
|
||||
{
|
||||
size_t res= my_snprintf(dst, dstlen, "%.*s.%.*s",
|
||||
(int) m_name[0].length, m_name[0].str,
|
||||
(int) m_name[1].length, m_name[1].str);
|
||||
if (casedn_part1 && dstlen > m_name[0].length)
|
||||
my_casedn_str(system_charset_info, dst + m_name[0].length + 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
// Export as a qualified name string, allocate on mem_root.
|
||||
LEX_CSTRING make_qname(MEM_ROOT *mem_root, bool casedn_part1) const
|
||||
{
|
||||
LEX_STRING dst;
|
||||
/* format: [pkg + dot] + name + '\0' */
|
||||
size_t dst_size= m_name[0].length + 1 /*dot*/ + m_name[1].length + 1/*\0*/;
|
||||
if (unlikely(!(dst.str= (char*) alloc_root(mem_root, dst_size))))
|
||||
return {NULL, 0};
|
||||
if (!m_name[0].length)
|
||||
{
|
||||
DBUG_ASSERT(!casedn_part1); // Should not be called this way
|
||||
dst.length= my_snprintf(dst.str, dst_size, "%.*s",
|
||||
(int) m_name[1].length, m_name[1].str);
|
||||
return {dst.str, dst.length};
|
||||
}
|
||||
dst.length= make_qname(dst.str, dst_size, casedn_part1);
|
||||
return {dst.str, dst.length};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
This class resembles the SQL Standard schema qualified object name:
|
||||
<schema qualified name> ::= [ <schema name> <period> ] <qualified identifier>
|
||||
|
@ -7864,41 +7924,16 @@ public:
|
|||
void copy(MEM_ROOT *mem_root, const LEX_CSTRING &db,
|
||||
const LEX_CSTRING &name);
|
||||
|
||||
static Database_qualified_name split(const LEX_CSTRING &txt)
|
||||
{
|
||||
DBUG_ASSERT(txt.str[txt.length] == '\0'); // Expect 0-terminated input
|
||||
const char *dot= strchr(txt.str, '.');
|
||||
if (!dot)
|
||||
return Database_qualified_name(NULL, 0, txt.str, txt.length);
|
||||
size_t dblen= dot - txt.str;
|
||||
Lex_cstring db(txt.str, dblen);
|
||||
Lex_cstring name(txt.str + dblen + 1, txt.length - dblen - 1);
|
||||
return Database_qualified_name(db, name);
|
||||
}
|
||||
|
||||
// Export db and name as a qualified name string: 'db.name'
|
||||
size_t make_qname(char *dst, size_t dstlen) const
|
||||
size_t make_qname(char *dst, size_t dstlen, bool casedn_name) const
|
||||
{
|
||||
return my_snprintf(dst, dstlen, "%.*s.%.*s",
|
||||
(int) m_db.length, m_db.str,
|
||||
(int) m_name.length, m_name.str);
|
||||
return Identifier_chain2(m_db, m_name).make_qname(dst, dstlen, casedn_name);
|
||||
}
|
||||
// Export db and name as a qualified name string, allocate on mem_root.
|
||||
bool make_qname(MEM_ROOT *mem_root, LEX_CSTRING *dst) const
|
||||
LEX_CSTRING make_qname(MEM_ROOT *mem_root, bool casedn_name) const
|
||||
{
|
||||
const uint dot= !!m_db.length;
|
||||
char *tmp;
|
||||
/* format: [database + dot] + name + '\0' */
|
||||
dst->length= m_db.length + dot + m_name.length;
|
||||
if (unlikely(!(dst->str= tmp= (char*) alloc_root(mem_root,
|
||||
dst->length + 1))))
|
||||
return true;
|
||||
snprintf(tmp, dst->length + 1, "%.*s%.*s%.*s",
|
||||
(int) m_db.length, (m_db.length ? m_db.str : ""),
|
||||
dot, ".",
|
||||
(int) m_name.length, m_name.str);
|
||||
DBUG_SLOW_ASSERT(ok_for_lower_case_names(m_db.str));
|
||||
return false;
|
||||
return Identifier_chain2(m_db, m_name).make_qname(mem_root, casedn_name);
|
||||
}
|
||||
|
||||
bool make_package_routine_name(MEM_ROOT *mem_root,
|
||||
|
@ -7909,9 +7944,8 @@ public:
|
|||
size_t length= package.length + 1 + routine.length + 1;
|
||||
if (unlikely(!(tmp= (char *) alloc_root(mem_root, length))))
|
||||
return true;
|
||||
m_name.length= my_snprintf(tmp, length, "%.*s.%.*s",
|
||||
(int) package.length, package.str,
|
||||
(int) routine.length, routine.str);
|
||||
m_name.length= Identifier_chain2(package, routine).make_qname(tmp, length,
|
||||
false);
|
||||
m_name.str= tmp;
|
||||
return false;
|
||||
}
|
||||
|
@ -7940,7 +7974,7 @@ public:
|
|||
{ }
|
||||
LEX_CSTRING lex_cstring() const override
|
||||
{
|
||||
size_t length= m_name->make_qname(err_buffer, sizeof(err_buffer));
|
||||
size_t length= m_name->make_qname(err_buffer, sizeof(err_buffer), false);
|
||||
return {err_buffer, length};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -7447,7 +7447,8 @@ sp_head *LEX::make_sp_head(THD *thd, const sp_name *name,
|
|||
name->m_name);
|
||||
else
|
||||
sp->init_sp_name(name);
|
||||
sp->make_qname(sp->get_main_mem_root(), &sp->m_qname);
|
||||
if (!(sp->m_qname= sp->make_qname(sp->get_main_mem_root(), true)).str)
|
||||
return NULL;
|
||||
}
|
||||
sphead= sp;
|
||||
}
|
||||
|
@ -9334,7 +9335,7 @@ bool LEX::call_statement_start(THD *thd,
|
|||
const Lex_ident_sys_st *proc)
|
||||
{
|
||||
Database_qualified_name q_db_pkg(db, pkg);
|
||||
Database_qualified_name q_pkg_proc(pkg, proc);
|
||||
Identifier_chain2 q_pkg_proc(*pkg, *proc);
|
||||
sp_name *spname;
|
||||
|
||||
sql_command= SQLCOM_CALL;
|
||||
|
@ -9352,7 +9353,7 @@ bool LEX::call_statement_start(THD *thd,
|
|||
|
||||
// Concat `pkg` and `name` to `pkg.name`
|
||||
LEX_CSTRING pkg_dot_proc;
|
||||
if (q_pkg_proc.make_qname(thd->mem_root, &pkg_dot_proc) ||
|
||||
if (!(pkg_dot_proc= q_pkg_proc.make_qname(thd->mem_root, false)).str ||
|
||||
check_ident_length(&pkg_dot_proc) ||
|
||||
!(spname= new (thd->mem_root) sp_name(db, &pkg_dot_proc, true)))
|
||||
return true;
|
||||
|
@ -9418,7 +9419,8 @@ sp_package *LEX::create_package_start(THD *thd,
|
|||
return NULL;
|
||||
pkg->reset_thd_mem_root(thd);
|
||||
pkg->init(this);
|
||||
pkg->make_qname(pkg->get_main_mem_root(), &pkg->m_qname);
|
||||
if (!(pkg->m_qname= pkg->make_qname(pkg->get_main_mem_root(), true)).str)
|
||||
return NULL;
|
||||
sphead= pkg;
|
||||
return pkg;
|
||||
}
|
||||
|
@ -9752,7 +9754,7 @@ Item *LEX::make_item_func_call_generic(THD *thd,
|
|||
static Lex_cstring dot(".", 1);
|
||||
Lex_ident_sys db(thd, cdb), pkg(thd, cpkg), func(thd, cfunc);
|
||||
Database_qualified_name q_db_pkg(db, pkg);
|
||||
Database_qualified_name q_pkg_func(pkg, func);
|
||||
Identifier_chain2 q_pkg_func(pkg, func);
|
||||
sp_name *qname;
|
||||
|
||||
if (db.is_null() || pkg.is_null() || func.is_null())
|
||||
|
@ -9769,7 +9771,7 @@ Item *LEX::make_item_func_call_generic(THD *thd,
|
|||
|
||||
// Concat `pkg` and `name` to `pkg.name`
|
||||
LEX_CSTRING pkg_dot_func;
|
||||
if (q_pkg_func.make_qname(thd->mem_root, &pkg_dot_func) ||
|
||||
if (!(pkg_dot_func= q_pkg_func.make_qname(thd->mem_root, false)).str ||
|
||||
check_ident_length(&pkg_dot_func) ||
|
||||
!(qname= new (thd->mem_root) sp_name(&db, &pkg_dot_func, true)))
|
||||
return NULL;
|
||||
|
|
|
@ -574,7 +574,8 @@ my_bool wsrep_ready_get (void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int wsrep_show_ready(THD *thd, SHOW_VAR *var, char *buff)
|
||||
int wsrep_show_ready(THD *thd, SHOW_VAR *var, void *buff,
|
||||
system_status_var *, enum_var_type)
|
||||
{
|
||||
var->type= SHOW_MY_BOOL;
|
||||
var->value= buff;
|
||||
|
|
|
@ -162,7 +162,8 @@ extern char* wsrep_cluster_capabilities;
|
|||
|
||||
int wsrep_show_status(THD *thd, SHOW_VAR *var, void *buff,
|
||||
system_status_var *status_var, enum_var_type scope);
|
||||
int wsrep_show_ready(THD *thd, SHOW_VAR *var, char *buff);
|
||||
int wsrep_show_ready(THD *thd, SHOW_VAR *var, void *buff,
|
||||
system_status_var *, enum_var_type);
|
||||
void wsrep_free_status(THD *thd);
|
||||
void wsrep_update_cluster_state_uuid(const char* str);
|
||||
|
||||
|
|
|
@ -18,18 +18,6 @@
|
|||
|
||||
#include <mysql/plugin.h>
|
||||
|
||||
static int wsrep_plugin_init(void *p)
|
||||
{
|
||||
WSREP_DEBUG("wsrep_plugin_init()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wsrep_plugin_deinit(void *p)
|
||||
{
|
||||
WSREP_DEBUG("wsrep_plugin_deinit()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct Mysql_replication wsrep_plugin= {
|
||||
MYSQL_REPLICATION_INTERFACE_VERSION
|
||||
};
|
||||
|
@ -42,8 +30,8 @@ maria_declare_plugin(wsrep)
|
|||
"Codership Oy",
|
||||
"Wsrep replication plugin",
|
||||
PLUGIN_LICENSE_GPL,
|
||||
wsrep_plugin_init,
|
||||
wsrep_plugin_deinit,
|
||||
NULL,
|
||||
NULL,
|
||||
0x0100,
|
||||
NULL, /* Status variables */
|
||||
NULL, /* System variables */
|
||||
|
|
|
@ -36,7 +36,7 @@ static Wsrep_thd_queue* wsrep_rollback_queue= 0;
|
|||
static Atomic_counter<uint64_t> wsrep_bf_aborts_counter;
|
||||
|
||||
|
||||
int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff,
|
||||
int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, void *, system_status_var *,
|
||||
enum enum_var_type scope)
|
||||
{
|
||||
wsrep_local_bf_aborts= wsrep_bf_aborts_counter;
|
||||
|
|
|
@ -82,7 +82,7 @@ private:
|
|||
mysql_cond_t COND_wsrep_thd_queue;
|
||||
};
|
||||
|
||||
int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff,
|
||||
int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, void *, system_status_var *,
|
||||
enum enum_var_type scope);
|
||||
bool wsrep_create_appliers(long threads, bool mutex_protected=false);
|
||||
void wsrep_create_rollbacker();
|
||||
|
|
|
@ -4118,11 +4118,6 @@ static int innodb_init_params()
|
|||
}
|
||||
#endif
|
||||
|
||||
if (srv_read_only_mode) {
|
||||
ib::info() << "Started in read only mode";
|
||||
srv_use_doublewrite_buf = FALSE;
|
||||
}
|
||||
|
||||
#if !defined LINUX_NATIVE_AIO && !defined HAVE_URING && !defined _WIN32
|
||||
/* Currently native AIO is supported only on windows and linux
|
||||
and that also when the support is compiled in. In all other
|
||||
|
|
|
@ -1073,10 +1073,14 @@ dberr_t srv_start(bool create_new_db)
|
|||
if (srv_force_recovery) {
|
||||
ib::info() << "!!! innodb_force_recovery is set to "
|
||||
<< srv_force_recovery << " !!!";
|
||||
if (srv_force_recovery == SRV_FORCE_NO_LOG_REDO) {
|
||||
srv_read_only_mode = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (srv_force_recovery == SRV_FORCE_NO_LOG_REDO) {
|
||||
srv_read_only_mode = true;
|
||||
if (srv_read_only_mode) {
|
||||
sql_print_information("InnoDB: Started in read only mode");
|
||||
srv_use_doublewrite_buf = false;
|
||||
}
|
||||
|
||||
high_level_read_only = srv_read_only_mode
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SET(HEIDISQL_BASE_NAME "HeidiSQL_12.3_32_Portable")
|
||||
SET(HEIDISQL_BASE_NAME "HeidiSQL_12.6_32_Portable")
|
||||
SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
|
||||
SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}")
|
||||
SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})
|
||||
|
|
|
@ -68,6 +68,12 @@
|
|||
<Component Id="component.HeidiSQL_gds32_14.1.dll" Guid="*" Win64="no">
|
||||
<File Id="gds32_14.1.dll" Name="gds32-14.1.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\gds32-14.1.dll" />
|
||||
</Component>
|
||||
<Component Id="component.HeidiSQL_libeay32.dll" Guid="*" Win64="no">
|
||||
<File Id="libeay32.dll" Name="libeay32.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libeay32.dll" />
|
||||
</Component>
|
||||
<Component Id="component.HeidiSQL_ssleay32.dll" Guid="*" Win64="no">
|
||||
<File Id="ssleay32.dll" Name="ssleay32.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\ssleay32.dll" />
|
||||
</Component>
|
||||
<Component Id="component.HeidiSQL_plink.exe" Guid="*" Win64="no">
|
||||
<File Id="plink.exe" Name="plink.exe" Source="${HEIDISQL_DOWNLOAD_DIR}\plink.exe" />
|
||||
</Component>
|
||||
|
@ -115,6 +121,8 @@
|
|||
<ComponentRef Id="component.HeidiSQL_libmysql_6.1.dll" />
|
||||
<ComponentRef Id="component.HeidiSQL_fbclient_4.0.dll" />
|
||||
<ComponentRef Id="component.HeidiSQL_gds32_14.1.dll" />
|
||||
<ComponentRef Id="component.HeidiSQL_libeay32.dll" />
|
||||
<ComponentRef Id="component.HeidiSQL_ssleay32.dll" />
|
||||
<ComponentRef Id="component.HeidiSQL_plink.exe" />
|
||||
<ComponentRef Id="component.HeidiSQL_LICENSE_openssl" />
|
||||
<?foreach db in $(var.functions_dblist) ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue