mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.11' into 11.2
This commit is contained in:
@@ -42,7 +42,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","__2"."b" AS "b" from "test"."t1" join (/* select#2 */ select max("test"."t2"."a") AS "b" from "test"."t2") "__2"
|
||||
select * from (select tt.* from (select * from t1) as tt) where tt.a > 0;
|
||||
ERROR 42S22: Unknown column 'tt.a' in 'where clause'
|
||||
ERROR 42S22: Unknown column 'tt.a' in 'WHERE'
|
||||
select * from (select tt.* from (select * from t1) as tt) where a > 0;
|
||||
a
|
||||
2
|
||||
|
@@ -6,9 +6,9 @@ SET sql_mode=ORACLE;
|
||||
# Using SQLCODE and SQLERRM outside of an SP
|
||||
#
|
||||
SELECT SQLCODE;
|
||||
ERROR 42S22: Unknown column 'SQLCODE' in 'field list'
|
||||
ERROR 42S22: Unknown column 'SQLCODE' in 'SELECT'
|
||||
SELECT SQLERRM;
|
||||
ERROR 42S22: Unknown column 'SQLERRM' in 'field list'
|
||||
ERROR 42S22: Unknown column 'SQLERRM' in 'SELECT'
|
||||
CREATE TABLE t1 (SQLCODE INT, SQLERRM VARCHAR(10));
|
||||
INSERT INTO t1 VALUES (10, 'test');
|
||||
SELECT SQLCODE, SQLERRM FROM t1;
|
||||
|
@@ -186,9 +186,9 @@ ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
|
||||
PREPARE stmt FROM (SELECT 'SELECT 1');
|
||||
ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
|
||||
EXECUTE IMMEDIATE a;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
ERROR 42S22: Unknown column 'a' in 'EXECUTE IMMEDIATE'
|
||||
PREPARE stmt FROM a;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
ERROR 42S22: Unknown column 'a' in 'PREPARE..FROM'
|
||||
EXECUTE IMMEDIATE NULL;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL' at line 1
|
||||
PREPARE stmt FROM NULL;
|
||||
|
@@ -1200,7 +1200,7 @@ END LOOP;
|
||||
END;
|
||||
$$
|
||||
CALL p1;
|
||||
ERROR 42S22: Unknown column 'rec' in 'field list'
|
||||
ERROR 42S22: Unknown column 'rec' in 'SELECT'
|
||||
DROP PROCEDURE p1;
|
||||
CREATE PROCEDURE p1 AS
|
||||
BEGIN
|
||||
@@ -1211,7 +1211,7 @@ END LOOP;
|
||||
END;
|
||||
$$
|
||||
CALL p1;
|
||||
ERROR 42S02: Unknown table 'rec' in field list
|
||||
ERROR 42S02: Unknown table 'rec' in SELECT
|
||||
DROP PROCEDURE p1;
|
||||
# Totally confusing name mixture
|
||||
CREATE TABLE rec (rec INT);
|
||||
|
@@ -2473,7 +2473,7 @@ NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
|
||||
Warnings:
|
||||
Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 1,3) union all /* select#2 */ select 3 AS "3" order by 1 limit 1,2
|
||||
values (5,90), (7,20), (1,70), (3,50), (4,10) order by 3;
|
||||
ERROR 42S22: Unknown column '3' in 'order clause'
|
||||
ERROR 42S22: Unknown column '3' in 'ORDER BY'
|
||||
create view v1 as values (5), (7), (1), (3), (4) order by 1 limit 2;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
@@ -2497,9 +2497,9 @@ select * from v1;
|
||||
3
|
||||
drop view v1;
|
||||
create view v1 as values (5,90), (7,20), (1,70), (3,50), (4,10) order by 3;
|
||||
ERROR 42S22: Unknown column '3' in 'order clause'
|
||||
ERROR 42S22: Unknown column '3' in 'ORDER BY'
|
||||
create view v1 as
|
||||
( values (5), (7), (1), (3), (4) limit 2 offset 1 )
|
||||
union
|
||||
( values (5), (7), (1), (3), (4) order by 2 limit 2 );
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
|
@@ -1171,14 +1171,14 @@ abc
|
||||
abc
|
||||
# Check handling of incorrect ORDER BY clause
|
||||
SELECT a FROM federated.t1 UNION SELECT a FROM federated.t2 ORDER BY 2;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
PREPARE stmt FROM
|
||||
"SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY 2";
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY 2,1,3;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY t1.a;
|
||||
ERROR 42000: Table 't1' from one of the SELECTs cannot be used in order clause
|
||||
ERROR 42000: Table 't1' from one of the SELECTs cannot be used in ORDER BY
|
||||
SELECT * from federated.t1 INTERSECT
|
||||
SELECT * from federated.t2 UNION ALL
|
||||
SELECT * from federated.t2 EXCEPT
|
||||
@@ -1192,7 +1192,7 @@ SELECT * from federated.t2 UNION ALL
|
||||
SELECT * from federated.t2 EXCEPT
|
||||
SELECT * from federated.t1
|
||||
ORDER BY 3;
|
||||
ERROR 42S22: Unknown column '3' in 'order clause'
|
||||
ERROR 42S22: Unknown column '3' in 'ORDER BY'
|
||||
# UNION of mixed Federated/MyISAM tables, pushing parts of UNIONs
|
||||
SELECT * FROM federated.t1 UNION SELECT * FROM t3 ORDER BY a;
|
||||
a
|
||||
@@ -1203,7 +1203,7 @@ t3_myisam1
|
||||
t3_myisam2
|
||||
t3_myisam3
|
||||
SELECT * FROM federated.t1 UNION SELECT * FROM t3 ORDER BY 2;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
ERROR 42S22: Unknown column '2' in 'ORDER BY'
|
||||
#
|
||||
# MDEV-32382 FederatedX error on pushdown of statement having CTE
|
||||
#
|
||||
|
@@ -4209,14 +4209,14 @@ Create view v1_1
|
||||
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
|
||||
from tb2 limit 0,100 ;
|
||||
SELECT NewNameF1,f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f60' in 'SELECT'
|
||||
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'SELECT'
|
||||
SELECT f59, f60 FROM test.v1 ;
|
||||
ERROR 42S22: Unknown column 'f59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f59' in 'SELECT'
|
||||
Use test ;
|
||||
SELECT F59 FROM v1 ;
|
||||
ERROR 42S22: Unknown column 'F59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'F59' in 'SELECT'
|
||||
|
||||
Testcase 3.3.1.19
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -22453,7 +22453,7 @@ INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
|
||||
INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
|
||||
ERROR 42S22: Unknown column 'f4x' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f4x' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
DESCRIBE t1;
|
||||
@@ -22756,7 +22756,7 @@ INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f4 = '<------ 20 -------->', report = 'v1 9a';
|
||||
DESCRIBE t1;
|
||||
|
@@ -261,7 +261,7 @@ GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
|
||||
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
|
||||
SELECT f1, f3 FROM db_datadict.my_table;
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'SELECT'
|
||||
connection default;
|
||||
ALTER TABLE db_datadict.my_table CHANGE COLUMN f1 my_col BIGINT;
|
||||
SELECT * FROM information_schema.column_privileges
|
||||
|
@@ -4210,14 +4210,14 @@ Create view v1_1
|
||||
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
|
||||
from tb2 limit 0,100 ;
|
||||
SELECT NewNameF1,f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f60' in 'SELECT'
|
||||
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'SELECT'
|
||||
SELECT f59, f60 FROM test.v1 ;
|
||||
ERROR 42S22: Unknown column 'f59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f59' in 'SELECT'
|
||||
Use test ;
|
||||
SELECT F59 FROM v1 ;
|
||||
ERROR 42S22: Unknown column 'F59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'F59' in 'SELECT'
|
||||
|
||||
Testcase 3.3.1.19
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -22455,7 +22455,7 @@ INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
|
||||
INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
|
||||
ERROR 42S22: Unknown column 'f4x' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f4x' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
DESCRIBE t1;
|
||||
@@ -22758,7 +22758,7 @@ INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f4 = '<------ 20 -------->', report = 'v1 9a';
|
||||
DESCRIBE t1;
|
||||
|
@@ -4679,14 +4679,14 @@ Create view v1_1
|
||||
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
|
||||
from tb2 limit 0,100 ;
|
||||
SELECT NewNameF1,f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f60' in 'SELECT'
|
||||
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
|
||||
ERROR 42S22: Unknown column 'v1_1.f60' in 'SELECT'
|
||||
SELECT f59, f60 FROM test.v1 ;
|
||||
ERROR 42S22: Unknown column 'f59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f59' in 'SELECT'
|
||||
Use test ;
|
||||
SELECT F59 FROM v1 ;
|
||||
ERROR 42S22: Unknown column 'F59' in 'field list'
|
||||
ERROR 42S22: Unknown column 'F59' in 'SELECT'
|
||||
|
||||
Testcase 3.3.1.19
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -24157,7 +24157,7 @@ INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
|
||||
INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
|
||||
ERROR 42S22: Unknown column 'f4x' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f4x' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
DESCRIBE t1;
|
||||
@@ -24460,7 +24460,7 @@ INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
|
||||
ERROR 42S22: Unknown column 'f3' in 'field list'
|
||||
ERROR 42S22: Unknown column 'f3' in 'INSERT INTO'
|
||||
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
f4 = '<------ 20 -------->', report = 'v1 9a';
|
||||
DESCRIBE t1;
|
||||
|
@@ -3893,7 +3893,7 @@ SELECT count(*) into cnt from t2;
|
||||
set @count = cnt;
|
||||
SELECT @count;
|
||||
END//
|
||||
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||
ERROR 42S22: Unknown column 'cnt' in 'SET'
|
||||
CALL sp1( 10 );
|
||||
DROP PROCEDURE sp1;
|
||||
CREATE PROCEDURE sp1( cnt int(20) )
|
||||
@@ -15599,7 +15599,7 @@ END;
|
||||
END loop label1;
|
||||
END//
|
||||
CALL sp4();
|
||||
ERROR 42S22: Unknown column 'idummy2' in 'field list'
|
||||
ERROR 42S22: Unknown column 'idummy2' in 'SELECT'
|
||||
DROP PROCEDURE sp4;
|
||||
|
||||
Testcase 4.3.5:
|
||||
|
@@ -11,7 +11,6 @@
|
||||
##############################################################################
|
||||
|
||||
galera_as_slave_ctas : MDEV-28378 timeout
|
||||
galera_pc_recovery : MDEV-25199 cluster fails to start up
|
||||
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
|
||||
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
|
||||
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
||||
|
@@ -10,6 +10,7 @@ wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
# enforce read-committed characteristics across the cluster
|
||||
# wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
wsrep-debug=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-on=1
|
||||
@@ -17,7 +18,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address=gcomm://
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
@@ -29,7 +30,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
@@ -41,7 +42,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
@@ -53,7 +54,7 @@ wsrep-on=1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT25S'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
||||
|
@@ -8,7 +8,7 @@ connection node_1;
|
||||
SET @@enforce_storage_engine=INNODB;
|
||||
CREATE TABLE t1(i INT) ENGINE=INNODB;
|
||||
CREATE TABLE t2(i INT) ENGINE=MYISAM;
|
||||
ERROR 42000: Unknown storage engine 'MyISAM'
|
||||
ERROR HY000: The MariaDB server is running with the NO_ENGINE_SUBSTITUTION option so it cannot execute this statement
|
||||
INSERT INTO t1 VALUES(1);
|
||||
connection node_2;
|
||||
SHOW TABLES;
|
||||
|
@@ -6,6 +6,8 @@ connection node_1;
|
||||
connection node_2;
|
||||
connection node_3;
|
||||
connection node_4;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=2';
|
||||
connection node_3;
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
|
||||
connection node_1;
|
||||
@@ -44,7 +46,8 @@ COUNT(*) = 0
|
||||
1
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
COUNT(*) = 1
|
||||
@@ -54,7 +57,7 @@ COUNT(*) = 0
|
||||
1
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
connection node_3;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
COUNT(*) = 1
|
||||
|
@@ -8,16 +8,30 @@ SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_3;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t1;
|
||||
EXPECT_0
|
||||
0
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connection node_1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
|
||||
connection node_4;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options';
|
||||
VARIABLE_VALUE LIKE '%gmcast.segment = 3%'
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
64
mysql-test/suite/galera/r/mdev-30653.result
Normal file
64
mysql-test/suite/galera/r/mdev-30653.result
Normal file
@@ -0,0 +1,64 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table 'test'.'t2' is not supported in Galera");
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
update t2 set val=41 where id=2;
|
||||
commit;
|
||||
ERROR HY000: Transactional commit not supported by involved engine(s)
|
||||
select * from t1;
|
||||
id val
|
||||
1 23
|
||||
select * from t2;
|
||||
id val
|
||||
2 41
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
id val
|
||||
1 23
|
||||
select * from t2;
|
||||
id val
|
||||
connection node_1;
|
||||
drop table t1, t2;
|
||||
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
update t2 set val=41 where id=2;
|
||||
ERROR HY000: Transactional commit not supported by involved engine(s)
|
||||
commit;
|
||||
select * from t1;
|
||||
id val
|
||||
1 24
|
||||
select * from t2;
|
||||
id val
|
||||
2 42
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
id val
|
||||
1 23
|
||||
select * from t2;
|
||||
id val
|
||||
2 42
|
||||
connection node_1;
|
||||
drop table t1, t2;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
INSERT INTO t2 values(1,1);
|
||||
UPDATE t2 set id=5,val=6 where id = 1;
|
||||
SELECT * from t2;
|
||||
id val
|
||||
5 6
|
||||
connection node_2;
|
||||
SELECT * from t2;
|
||||
id val
|
||||
5 6
|
||||
DROP TABLE t2;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_mode=DEFAULT;
|
@@ -13,7 +13,7 @@
|
||||
--connection node_1
|
||||
SET @@enforce_storage_engine=INNODB;
|
||||
CREATE TABLE t1(i INT) ENGINE=INNODB;
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
--error ER_OPTION_PREVENTS_STATEMENT
|
||||
CREATE TABLE t2(i INT) ENGINE=MYISAM;
|
||||
|
||||
INSERT INTO t1 VALUES(1);
|
||||
|
@@ -33,8 +33,8 @@ SELECT COUNT(*) = 1 FROM t1;
|
||||
|
||||
# Perform --wsrep-recover and preserve the positions into variables by placing them in $MYSQL_TMP_DIR/galera_wsrep_start_position.inc and then --source'ing it
|
||||
|
||||
--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.1.log > $MYSQL_TMP_DIR/galera_wsrep_recover.1.log 2>&1
|
||||
--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.2.log > $MYSQL_TMP_DIR/galera_wsrep_recover.2.log 2>&1
|
||||
--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --innodb --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.1.log > $MYSQL_TMP_DIR/galera_wsrep_recover.1.log 2>&1
|
||||
--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --innodb --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.2.log > $MYSQL_TMP_DIR/galera_wsrep_recover.2.log 2>&1
|
||||
|
||||
--perl
|
||||
use strict;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
[mysqld]
|
||||
wsrep-ignore-apply-errors=0
|
||||
loose-galera-vote-rejoin-dml=0
|
||||
|
||||
[ENV]
|
||||
galera_cluster_size=4
|
||||
|
@@ -5,6 +5,10 @@
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/big_test.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@@ -12,6 +16,9 @@
|
||||
--let $node_4=node_4
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_1
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=2';
|
||||
|
||||
# Isolate node #3
|
||||
--connection node_3
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
|
||||
@@ -30,6 +37,7 @@ INSERT INTO t1 VALUES (1, 'A');
|
||||
SET SESSION wsrep_on=OFF;
|
||||
INSERT INTO t1 VALUES (2, 'B');
|
||||
SET SESSION wsrep_on=ON;
|
||||
--source include/galera_wait_ready.inc
|
||||
DELETE FROM t1 WHERE f1 = 2;
|
||||
|
||||
# Wait for node #4 to be voted out
|
||||
@@ -75,14 +83,15 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
|
||||
|
||||
--connection node_2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
|
||||
CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
|
||||
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
|
||||
CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno ");
|
||||
|
||||
--connection node_3
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
|
||||
|
@@ -1,5 +1,8 @@
|
||||
!include ../galera_4nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
loose-galera-wan=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1'
|
||||
|
||||
|
@@ -8,31 +8,35 @@
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
CALL mtr.add_suppression("WSREP: Stray state UUID msg:");
|
||||
CALL mtr.add_suppression("Sending JOIN failed: ");
|
||||
CALL mtr.add_suppression("WSREP: .* sending install message failed: Socket is not connected");
|
||||
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connection node_3
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connection node_2
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
--connection node_4
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options';
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@@ -1,5 +1,8 @@
|
||||
!include ../galera_4nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
loose-galera-wan-restart-ist=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.segment=1'
|
||||
|
||||
|
@@ -15,6 +15,9 @@
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@@ -22,9 +25,6 @@
|
||||
--let $node_4=node_4
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
|
@@ -1,5 +1,8 @@
|
||||
!include ../galera_4nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
loose-galera-wan-restart-sst=1
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.segment=1'
|
||||
|
||||
|
@@ -16,6 +16,9 @@
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@@ -23,8 +26,6 @@
|
||||
--let $node_4=node_4
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
|
62
mysql-test/suite/galera/t/mdev-30653.test
Normal file
62
mysql-test/suite/galera/t/mdev-30653.test
Normal file
@@ -0,0 +1,62 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_aria.inc
|
||||
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table 'test'.'t2' is not supported in Galera");
|
||||
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
update t2 set val=41 where id=2;
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
commit;
|
||||
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_2
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_1
|
||||
drop table t1, t2;
|
||||
|
||||
# case 2
|
||||
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
|
||||
create table t1 (id serial, val int) engine=innodb;
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
|
||||
insert into t1 values(1, 23);
|
||||
insert into t2 values(2, 42);
|
||||
|
||||
begin;
|
||||
update t1 set val=24 where id=1;
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
update t2 set val=41 where id=2;
|
||||
commit;
|
||||
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_2
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
--connection node_1
|
||||
drop table t1, t2;
|
||||
|
||||
# case 3
|
||||
create table t2 (id serial, val int) engine=aria;
|
||||
INSERT INTO t2 values(1,1);
|
||||
UPDATE t2 set id=5,val=6 where id = 1;
|
||||
SELECT * from t2;
|
||||
|
||||
--connection node_2
|
||||
SELECT * from t2;
|
||||
DROP TABLE t2;
|
||||
|
||||
--connection node_1
|
||||
SET GLOBAL wsrep_mode=DEFAULT;
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -597,11 +597,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -597,11 +597,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -598,11 +598,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -338,9 +338,9 @@ CREATE TABLE t1 (g GEOMETRY NOT NULL, SPATIAL gi(g));
|
||||
INSERT INTO t1 VALUES (POINT(0,0));
|
||||
HANDLER t1 OPEN AS h;
|
||||
HANDLER h READ `gi`= (10);
|
||||
ERROR HY000: SPATIAL index `gi` does not support this operation
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
HANDLER h READ `gi`> (10);
|
||||
ERROR HY000: SPATIAL index `gi` does not support this operation
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (w VARCHAR(100), FULLTEXT fk(w));
|
||||
@@ -352,3 +352,12 @@ HANDLER h READ `fk`> (10);
|
||||
ERROR HY000: FULLTEXT index `fk` does not support this operation
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-35082 HANDLER with FULLTEXT keys is not always rejected
|
||||
#
|
||||
create table t (a int primary key, v text not null, fulltext(v));
|
||||
handler t open;
|
||||
handler t read v next;
|
||||
ERROR HY000: FULLTEXT index `v` does not support this operation
|
||||
drop table t;
|
||||
# End of 10.5 tests
|
||||
|
@@ -385,9 +385,9 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (g GEOMETRY NOT NULL, SPATIAL gi(g));
|
||||
INSERT INTO t1 VALUES (POINT(0,0));
|
||||
HANDLER t1 OPEN AS h;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||
HANDLER h READ `gi`= (10);
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||
HANDLER h READ `gi`> (10);
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
@@ -401,3 +401,14 @@ HANDLER h READ `fk`= (10);
|
||||
HANDLER h READ `fk`> (10);
|
||||
HANDLER h CLOSE;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35082 HANDLER with FULLTEXT keys is not always rejected
|
||||
--echo #
|
||||
create table t (a int primary key, v text not null, fulltext(v));
|
||||
handler t open;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
handler t read v next;
|
||||
drop table t;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
@@ -400,7 +400,7 @@ create table t1(a int, index using btree (a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
ERROR 42S22: Unknown column 'W' in 'HANDLER ... READ'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
@@ -597,11 +597,11 @@ handler t1 open as t1_alias;
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias read a next;
|
||||
ERROR 42000: Key 'a' doesn't exist in table 't1_alias'
|
||||
handler t1_alias READ a next where inexistent > 0;
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||
ERROR 42S22: Unknown column 'inexistent' in 'WHERE'
|
||||
handler t1_alias close;
|
||||
drop table t1;
|
||||
create temporary table t1 (a int, b char(1), key a using btree (a), key b using btree (a,b));
|
||||
|
@@ -50,4 +50,20 @@ ALTER TABLE t2 ALGORITHM=COPY, FORCE;
|
||||
affected rows: 1
|
||||
info: Records: 1 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t2, t1;
|
||||
#
|
||||
# MDEV-35237 Bulk insert fails to apply buffered
|
||||
# operation during copy alter
|
||||
#
|
||||
CREATE TABLE t1 (f1 int NOT NULL, f2 tinyint(1) NOT NULL,
|
||||
f3 varchar(80) NOT NULL, PRIMARY KEY(f1),
|
||||
KEY(f2), KEY(f3))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1,1,''),(2,0,''), (4,1,'e');
|
||||
CREATE TABLE t2 (f1 int NOT NULL, f2 int NOT NULL,KEY(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1,0),(1,0);
|
||||
CREATE TABLE t engine=innodb
|
||||
SELECT t2.f2 FROM t2 JOIN t1 ON t1.f1 = t2.f1 AND t1.f3 = '' AND t1.f2=1 ;
|
||||
SELECT COUNT(*) FROM t;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1, t2, t;
|
||||
SET GLOBAL innodb_stats_persistent=@default_stats_persistent;
|
||||
|
21
mysql-test/suite/innodb/r/create_like.result
Normal file
21
mysql-test/suite/innodb/r/create_like.result
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
|
||||
#
|
||||
set innodb_compression_default= off;
|
||||
create table t1 (a int, b blob) engine=innodb;
|
||||
set innodb_compression_default= on;
|
||||
create table s_import like t1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` blob DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
show create table s_import;
|
||||
Table Create Table
|
||||
s_import CREATE TABLE `s_import` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` blob DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
DROP TABLE t1,s_import;
|
||||
# End of 10.5 tests
|
@@ -8,3 +8,13 @@ connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
|
||||
DROP TABLE t1;
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# MDEV-35236 Assertion `(mem_root->flags & 4) == 0' failed in safe_lexcstrdup_root
|
||||
#
|
||||
prepare stmt from 'create or replace table t engine=innodb select 1 as f';
|
||||
set innodb_compression_default=on;
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
drop table t;
|
||||
# End of 10.5 tests
|
||||
|
@@ -1305,7 +1305,7 @@ ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fail
|
||||
update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
|
||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
|
||||
update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
|
||||
ERROR 42S22: Unknown column 't1.id' in 'where clause'
|
||||
ERROR 42S22: Unknown column 't1.id' in 'WHERE'
|
||||
drop table t3,t2,t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 VARCHAR(8), c2 VARCHAR(8),
|
||||
|
@@ -2556,7 +2556,7 @@ INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 SELECT * FROM t1;
|
||||
** An error in a trigger causes rollback of the statement.
|
||||
DELETE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'field list'
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'SET'
|
||||
SELECT @a,@b;
|
||||
@a @b
|
||||
EXECUTED TRIGGER
|
||||
@@ -2570,7 +2570,7 @@ i i
|
||||
4 4
|
||||
** Same happens with the IGNORE option
|
||||
DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'field list'
|
||||
ERROR 42S22: Unknown column 'error_happens_here' in 'SET'
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
|
||||
|
@@ -552,18 +552,18 @@ ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
@@ -1486,18 +1486,18 @@ ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
@@ -2420,18 +2420,18 @@ ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
|
||||
ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
|
||||
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=add_last. Try ALGORITHM=INPLACE
|
||||
ALTER TABLE t1 MODIFY a INT DEFAULT 0;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
|
@@ -526,6 +526,15 @@ c INT as (b) VIRTUAL)ENGINE=InnoDB CHARACTER SET utf32;
|
||||
ALTER TABLE t1 DROP COLUMN a;
|
||||
ALTER TABLE t1 DROP COLUMN c;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-35122 Incorrect NULL value handling for instantly
|
||||
# dropped BLOB columns
|
||||
#
|
||||
CREATE TABLE t1 (c1 INT, c2 BLOB, c3 BLOB NOT NULL) ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
|
||||
ALTER TABLE t1 DROP c2;
|
||||
ALTER TABLE t1 DROP c3;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
DROP TABLE t1;
|
||||
# End of 10.5 tests
|
||||
# End of 10.6 tests
|
||||
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
|
||||
|
@@ -134,8 +134,10 @@ BEGIN;
|
||||
INSERT INTO t SET a=2;
|
||||
connection consistent;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SAVEPOINT sp1;
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
ERROR HY000: Record has changed since last read in table 't'
|
||||
SAVEPOINT sp1;
|
||||
connection con_weird;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
@@ -155,3 +157,4 @@ a b
|
||||
disconnect consistent;
|
||||
connection default;
|
||||
DROP TABLE t;
|
||||
# End of 10.6 tests
|
||||
|
@@ -49,6 +49,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\.ibd'/ in mysqld.1.err
|
||||
# restart
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
|
@@ -15,6 +15,7 @@ FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
set debug_dbug="d,trigger_garbage_collection";
|
||||
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size;
|
||||
FOUND 1 /[Mm]emory pressure.*/ in mysqld.1.err
|
||||
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
|
@@ -0,0 +1,6 @@
|
||||
create table t_compressed(b longblob) engine=InnoDB page_compressed=1;
|
||||
insert into t_compressed values(repeat(1,1000000));
|
||||
select allocated_size < file_size from information_schema.innodb_sys_tablespaces where name='test/t_compressed';
|
||||
allocated_size < file_size
|
||||
1
|
||||
drop table t_compressed;
|
@@ -151,7 +151,7 @@ t1 CREATE TEMPORARY TABLE `t1` (
|
||||
UNIQUE KEY `pri_index` (`t1_i`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
select * from t1 where t1_f >= 2.5;
|
||||
ERROR 42S22: Unknown column 't1_f' in 'where clause'
|
||||
ERROR 42S22: Unknown column 't1_f' in 'WHERE'
|
||||
alter table t1 add index sec_index2(t1_c), algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||
drop table t1;
|
||||
|
@@ -0,0 +1,66 @@
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'CREATE TABLE t1(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, pk'), ' INT, a',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, a'), ' INT, b',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, b'), ' INT, c INT, PRIMARY KEY(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ', pk'), '), INDEX i1(a',
|
||||
GROUP_CONCAT(seq SEPARATOR ', a'), '), INDEX i2(b',
|
||||
GROUP_CONCAT(seq SEPARATOR ', b'), ')) ENGINE=InnoDB;')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'INSERT INTO t1 VALUES (',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0), (',
|
||||
GROUP_CONCAT('3' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
GROUP_CONCAT('4' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0);')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
SET @old_timeout= @@GLOBAL.innodb_lock_wait_timeout;
|
||||
SET GLOBAL innodb_lock_wait_timeout= 1;
|
||||
XA START "t1";
|
||||
UPDATE t1 FORCE INDEX (i2) SET c=c+1 WHERE a1=1 AND b1=1;
|
||||
XA END "t1";
|
||||
XA PREPARE "t1";
|
||||
connect con1,localhost,root,,;
|
||||
SELECT a1, b1, c FROM t1 FORCE INDEX (i1) WHERE a1=2 AND b1=1 FOR UPDATE;
|
||||
a1 b1 c
|
||||
2 1 0
|
||||
disconnect con1;
|
||||
connection default;
|
||||
XA COMMIT "t1";
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_lock_wait_timeout= @old_timeout;
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'ALTER TABLE t1 ADD COLUMN d',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, ADD COLUMN d'),
|
||||
' INT, ADD INDEX i3(d',
|
||||
GROUP_CONCAT(seq SEPARATOR ', d'), ');')
|
||||
FROM seq_1_to_33);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
ERROR 42000: Too many key parts specified; max 32 parts allowed
|
||||
DROP TABLE t1;
|
68
mysql-test/suite/innodb/r/xa_unlock_unmodified.result
Normal file
68
mysql-test/suite/innodb/r/xa_unlock_unmodified.result
Normal file
@@ -0,0 +1,68 @@
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
SET @saved_dbug = @@GLOBAL.debug_dbug;
|
||||
CREATE TABLE t(id INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
InnoDB 0 transactions not purged
|
||||
INSERT INTO t VALUES (10), (20), (30);
|
||||
connect prevent_purge,localhost,root,,;
|
||||
start transaction with consistent snapshot;
|
||||
connection default;
|
||||
DELETE FROM t WHERE id = 20;
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"+d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
XA START '1';
|
||||
UPDATE t SET id=40 WHERE id=30;
|
||||
XA END '1';
|
||||
connection prevent_purge;
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC=
|
||||
'now WAIT_FOR row_purge_remove_clust_if_poss_low_before_delete';
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"-d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
connection default;
|
||||
SET DEBUG_SYNC=
|
||||
"lock_rec_unlock_unmodified_start SIGNAL lock_sys_latched WAIT_FOR cont";
|
||||
XA PREPARE '1';
|
||||
connection prevent_purge;
|
||||
SET DEBUG_SYNC= 'now SIGNAL row_purge_remove_clust_if_poss_low_cont';
|
||||
SET DEBUG_SYNC= 'now SIGNAL cont';
|
||||
disconnect prevent_purge;
|
||||
connection default;
|
||||
XA COMMIT '1';
|
||||
SET DEBUG_SYNC="RESET";
|
||||
TRUNCATE TABLE t;
|
||||
InnoDB 0 transactions not purged
|
||||
INSERT INTO t VALUES (10), (20), (30);
|
||||
connect prevent_purge,localhost,root,,;
|
||||
start transaction with consistent snapshot;
|
||||
connection default;
|
||||
DELETE FROM t WHERE id = 20;
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"+d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
SET @@GLOBAL.debug_dbug="+d,skip_lock_release_on_prepare_try";
|
||||
XA START '1';
|
||||
UPDATE t SET id=40 WHERE id=30;
|
||||
XA END '1';
|
||||
connection prevent_purge;
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC=
|
||||
'now WAIT_FOR row_purge_remove_clust_if_poss_low_before_delete';
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"-d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
connection default;
|
||||
SET DEBUG_SYNC=
|
||||
"lock_rec_unlock_unmodified_start SIGNAL lock_sys_latched WAIT_FOR cont";
|
||||
XA PREPARE '1';
|
||||
connection prevent_purge;
|
||||
SET DEBUG_SYNC= 'now SIGNAL row_purge_remove_clust_if_poss_low_cont';
|
||||
SET DEBUG_SYNC= 'now SIGNAL cont';
|
||||
disconnect prevent_purge;
|
||||
connection default;
|
||||
XA COMMIT '1';
|
||||
SET DEBUG_SYNC="RESET";
|
||||
TRUNCATE TABLE t;
|
||||
SET @@GLOBAL.debug_dbug = @saved_dbug;
|
||||
DROP TABLE t;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
@@ -68,4 +68,19 @@ ALTER TABLE t1 ALGORITHM=COPY, FORCE;
|
||||
ALTER TABLE t2 ALGORITHM=COPY, FORCE;
|
||||
--disable_info
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35237 Bulk insert fails to apply buffered
|
||||
--echo # operation during copy alter
|
||||
--echo #
|
||||
CREATE TABLE t1 (f1 int NOT NULL, f2 tinyint(1) NOT NULL,
|
||||
f3 varchar(80) NOT NULL, PRIMARY KEY(f1),
|
||||
KEY(f2), KEY(f3))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1,1,''),(2,0,''), (4,1,'e');
|
||||
CREATE TABLE t2 (f1 int NOT NULL, f2 int NOT NULL,KEY(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1,0),(1,0);
|
||||
CREATE TABLE t engine=innodb
|
||||
SELECT t2.f2 FROM t2 JOIN t1 ON t1.f1 = t2.f1 AND t1.f3 = '' AND t1.f2=1 ;
|
||||
SELECT COUNT(*) FROM t;
|
||||
DROP TABLE t1, t2, t;
|
||||
SET GLOBAL innodb_stats_persistent=@default_stats_persistent;
|
||||
|
16
mysql-test/suite/innodb/t/create_like.test
Normal file
16
mysql-test/suite/innodb/t/create_like.test
Normal file
@@ -0,0 +1,16 @@
|
||||
--source include/have_innodb.inc
|
||||
--echo #
|
||||
--echo # MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
|
||||
--echo #
|
||||
|
||||
set innodb_compression_default= off;
|
||||
create table t1 (a int, b blob) engine=innodb;
|
||||
set innodb_compression_default= on;
|
||||
create table s_import like t1;
|
||||
|
||||
show create table t1;
|
||||
show create table s_import;
|
||||
|
||||
DROP TABLE t1,s_import;
|
||||
|
||||
--echo # End of 10.5 tests
|
@@ -26,3 +26,16 @@ reap;
|
||||
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
|
||||
DROP TABLE t1;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35236 Assertion `(mem_root->flags & 4) == 0' failed in safe_lexcstrdup_root
|
||||
--echo #
|
||||
prepare stmt from 'create or replace table t engine=innodb select 1 as f';
|
||||
set innodb_compression_default=on;
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
drop table t;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
@@ -567,6 +567,16 @@ ALTER TABLE t1 DROP COLUMN a;
|
||||
ALTER TABLE t1 DROP COLUMN c;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35122 Incorrect NULL value handling for instantly
|
||||
--echo # dropped BLOB columns
|
||||
--echo #
|
||||
CREATE TABLE t1 (c1 INT, c2 BLOB, c3 BLOB NOT NULL) ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
|
||||
ALTER TABLE t1 DROP c2;
|
||||
ALTER TABLE t1 DROP c3;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
@@ -152,10 +152,12 @@ BEGIN; INSERT INTO t SET a=2;
|
||||
|
||||
--connection consistent
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SAVEPOINT sp1;
|
||||
--disable_ps2_protocol
|
||||
--error ER_CHECKREAD
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
--enable_ps2_protocol
|
||||
SAVEPOINT sp1;
|
||||
|
||||
--connection con_weird
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
@@ -181,3 +183,5 @@ SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
|
||||
--connection default
|
||||
DROP TABLE t;
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
@@ -92,6 +92,7 @@ let SEARCH_PATTERN= InnoDB: Set innodb_force_recovery=1 to ignore this and to pe
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
eval $check_no_innodb;
|
||||
--let $on_linux= `select @@version_compile_os LIKE 'Linux%'`
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t[12].ibd.
|
||||
@@ -105,9 +106,18 @@ let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t[12].ibd.
|
||||
--source include/start_mysqld.inc
|
||||
eval $check_no_innodb;
|
||||
--source include/shutdown_mysqld.inc
|
||||
# On Windows, this error message is not output when t2.ibd is a directory!
|
||||
#let SEARCH_PATTERN= \[Note\] InnoDB: Cannot read first page of .*t2.ibd;
|
||||
#--source include/search_pattern_in_file.inc
|
||||
|
||||
--let SEARCH_PATTERN= InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\\.ibd'
|
||||
if (!$on_linux)
|
||||
{
|
||||
# os_file_get_size() would succeed on a directory.
|
||||
--echo FOUND 1 /$SEARCH_PATTERN/ in mysqld.1.err
|
||||
}
|
||||
if ($on_linux)
|
||||
{
|
||||
# lseek() reports EINVAL when invoked on a directory.
|
||||
--source include/search_pattern_in_file.inc
|
||||
}
|
||||
|
||||
--rmdir $MYSQLD_DATADIR/test/t2.ibd
|
||||
|
||||
@@ -150,6 +160,7 @@ call mtr.add_suppression("InnoDB: Error number \\d+ means");
|
||||
call mtr.add_suppression("InnoDB: Cannot create file '.*t0.ibd'");
|
||||
call mtr.add_suppression("InnoDB: The file '.*t0\.ibd' already exists");
|
||||
call mtr.add_suppression("InnoDB: Cannot open datafile for read-write: '.*t2\.ibd'");
|
||||
call mtr.add_suppression("InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\\.ibd'");
|
||||
# The following are for aborted startup without --innodb-force-recovery:
|
||||
call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*test");
|
||||
call mtr.add_suppression("InnoDB: Cannot read first page of '.*test.[tu]2.ibd': I/O error");
|
||||
|
@@ -1,5 +1,5 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/linux.inc
|
||||
--source include/have_cgroupv2.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
@@ -33,12 +33,21 @@ WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
set debug_dbug="d,trigger_garbage_collection";
|
||||
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size;
|
||||
|
||||
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
# either a fail or the pressure event
|
||||
let SEARCH_PATTERN= [Mm]emory pressure.*;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
# The garbage collection happens asynchronously after trigger, in a background
|
||||
# thread. So wait for it to happen to avoid sporadic failure.
|
||||
let $wait_condition=
|
||||
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
|
||||
--source include/wait_condition.inc
|
||||
eval $wait_condition;
|
||||
let SEARCH_PATTERN= InnoDB: Memory pressure event freed.*;
|
||||
let SEARCH_WAIT= FOUND;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
set debug_dbug=@save_dbug;
|
||||
|
1
mysql-test/suite/innodb/t/page_compression_windows.opt
Normal file
1
mysql-test/suite/innodb/t/page_compression_windows.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb-sys-tablespaces
|
7
mysql-test/suite/innodb/t/page_compression_windows.test
Normal file
7
mysql-test/suite/innodb/t/page_compression_windows.test
Normal file
@@ -0,0 +1,7 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/windows.inc
|
||||
create table t_compressed(b longblob) engine=InnoDB page_compressed=1;
|
||||
insert into t_compressed values(repeat(1,1000000));
|
||||
# Check that compression worked, i.e allocated size (physical file size) < logical file size
|
||||
select allocated_size < file_size from information_schema.innodb_sys_tablespaces where name='test/t_compressed';
|
||||
drop table t_compressed;
|
98
mysql-test/suite/innodb/t/xa_prepare_unlock_unmodified.test
Normal file
98
mysql-test/suite/innodb/t/xa_prepare_unlock_unmodified.test
Normal file
@@ -0,0 +1,98 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/count_sessions.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
|
||||
# Make sure there is no dynamic memory allocation during getting offsets for
|
||||
# 32 columns of secondary index with 32 columns of primary index in
|
||||
# lock_rec_unlock_unmodified().
|
||||
DELIMITER $$;
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'CREATE TABLE t1(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, pk'), ' INT, a',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, a'), ' INT, b',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, b'), ' INT, c INT, PRIMARY KEY(pk',
|
||||
GROUP_CONCAT(seq SEPARATOR ', pk'), '), INDEX i1(a',
|
||||
GROUP_CONCAT(seq SEPARATOR ', a'), '), INDEX i2(b',
|
||||
GROUP_CONCAT(seq SEPARATOR ', b'), ')) ENGINE=InnoDB;')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'INSERT INTO t1 VALUES (',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0), (',
|
||||
|
||||
GROUP_CONCAT('3' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('1' SEPARATOR ','), ',0), (',
|
||||
|
||||
GROUP_CONCAT('4' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',',
|
||||
GROUP_CONCAT('2' SEPARATOR ','), ',0);')
|
||||
FROM seq_1_to_32);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
SET @old_timeout= @@GLOBAL.innodb_lock_wait_timeout;
|
||||
SET GLOBAL innodb_lock_wait_timeout= 1;
|
||||
|
||||
XA START "t1";
|
||||
UPDATE t1 FORCE INDEX (i2) SET c=c+1 WHERE a1=1 AND b1=1;
|
||||
XA END "t1";
|
||||
# If there is dynamic memory allocation during getting offsets for
|
||||
# 32 columns of secondary index with 32 columns of primary index in
|
||||
# lock_rec_unlock_unmodified(), the following statement will cause assertion
|
||||
# failure in debug build.
|
||||
XA PREPARE "t1";
|
||||
|
||||
--connect(con1,localhost,root,,)
|
||||
# (pk, 2, 1, 0) record is X-locked but not modified in clustered index with the
|
||||
# above XA transaction, if the bug is not fixed, the following SELECT will be
|
||||
# blocked by the XA transaction if XA PREPARE does not release the unmodified
|
||||
# record.
|
||||
SELECT a1, b1, c FROM t1 FORCE INDEX (i1) WHERE a1=2 AND b1=1 FOR UPDATE;
|
||||
--disconnect con1
|
||||
|
||||
--connection default
|
||||
XA COMMIT "t1";
|
||||
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
|
||||
SET GLOBAL innodb_lock_wait_timeout= @old_timeout;
|
||||
|
||||
# Check that we can't create secondary index with more than 32 columns.
|
||||
DELIMITER $$;
|
||||
--error ER_TOO_MANY_KEY_PARTS
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE c TEXT DEFAULT(
|
||||
SELECT CONCAT(
|
||||
'ALTER TABLE t1 ADD COLUMN d',
|
||||
GROUP_CONCAT(seq SEPARATOR ' INT, ADD COLUMN d'),
|
||||
' INT, ADD INDEX i3(d',
|
||||
GROUP_CONCAT(seq SEPARATOR ', d'), ');')
|
||||
FROM seq_1_to_33);
|
||||
EXECUTE IMMEDIATE c;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
DROP TABLE t1;
|
||||
--source include/wait_until_count_sessions.inc
|
1
mysql-test/suite/innodb/t/xa_unlock_unmodified.opt
Normal file
1
mysql-test/suite/innodb/t/xa_unlock_unmodified.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb_purge_threads=1
|
86
mysql-test/suite/innodb/t/xa_unlock_unmodified.test
Normal file
86
mysql-test/suite/innodb/t/xa_unlock_unmodified.test
Normal file
@@ -0,0 +1,86 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/count_sessions.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
SET @old_innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@@GLOBAL.innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug= 1;
|
||||
|
||||
SET @saved_dbug = @@GLOBAL.debug_dbug;
|
||||
|
||||
CREATE TABLE t(id INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
|
||||
--let $i = 2
|
||||
|
||||
while ($i) {
|
||||
--source include/wait_all_purged.inc
|
||||
|
||||
INSERT INTO t VALUES (10), (20), (30);
|
||||
|
||||
--connect(prevent_purge,localhost,root,,)
|
||||
start transaction with consistent snapshot;
|
||||
|
||||
--connection default
|
||||
DELETE FROM t WHERE id = 20;
|
||||
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"+d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
|
||||
# Cover both lock_release_on_prepare() and lock_release_on_prepare_try()
|
||||
# functions
|
||||
if ($i == 1) {
|
||||
SET @@GLOBAL.debug_dbug="+d,skip_lock_release_on_prepare_try";
|
||||
}
|
||||
|
||||
XA START '1';
|
||||
UPDATE t SET id=40 WHERE id=30;
|
||||
XA END '1';
|
||||
|
||||
--connection prevent_purge
|
||||
COMMIT;
|
||||
|
||||
# stop purge worker after it requested page X-latch, but before
|
||||
# lock_update_delete() call
|
||||
SET DEBUG_SYNC=
|
||||
'now WAIT_FOR row_purge_remove_clust_if_poss_low_before_delete';
|
||||
SET @@GLOBAL.debug_dbug=
|
||||
"-d,enable_row_purge_remove_clust_if_poss_low_sync_point";
|
||||
|
||||
--connection default
|
||||
# lock_rec_unlock_unmodified() is executed either under lock_sys.wr_lock() or
|
||||
# under a combination of lock_sys.rd_lock() + record locks hash table cell
|
||||
# latch. Stop it before page latch request.
|
||||
SET DEBUG_SYNC=
|
||||
"lock_rec_unlock_unmodified_start SIGNAL lock_sys_latched WAIT_FOR cont";
|
||||
--send XA PREPARE '1'
|
||||
|
||||
--connection prevent_purge
|
||||
# let purge thread to continue execution and invoke lock_update_delete(),
|
||||
# which, in turns, requests locks_sys related latches.
|
||||
SET DEBUG_SYNC= 'now SIGNAL row_purge_remove_clust_if_poss_low_cont';
|
||||
SET DEBUG_SYNC= 'now SIGNAL cont';
|
||||
--disconnect prevent_purge
|
||||
|
||||
--connection default
|
||||
# deadlock if the bug is not fixed, as lock_rec_unlock_unmodified() requests
|
||||
# page latch acquired by purge worker, and the purge worker requests lock_sys
|
||||
# related latches in lock_update_delete() call, acquired by the current XA
|
||||
# in lock_rec_unlock_unmodified() caller.
|
||||
--reap
|
||||
XA COMMIT '1';
|
||||
|
||||
SET DEBUG_SYNC="RESET";
|
||||
|
||||
TRUNCATE TABLE t;
|
||||
|
||||
--dec $i
|
||||
}
|
||||
|
||||
SET @@GLOBAL.debug_dbug = @saved_dbug;
|
||||
DROP TABLE t;
|
||||
|
||||
SET GLOBAL innodb_enable_xap_unlock_unmodified_for_primary_debug=
|
||||
@old_innodb_enable_xap_unlock_unmodified_for_primary_debug;
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
@@ -644,9 +644,9 @@ ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*
|
||||
SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
|
||||
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
|
||||
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
ERROR 42S22: Unknown column 'b' in 'SELECT'
|
||||
SELECT MATCH(b) AGAINST ('*') FROM z;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
ERROR 42S22: Unknown column 'b' in 'SELECT'
|
||||
EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
ERROR HY000: Can't find FULLTEXT index matching the column list
|
||||
SELECT MATCH(a) AGAINST ('*') FROM z;
|
||||
@@ -791,3 +791,28 @@ f1 MATCH(f1) AGAINST ("test" IN BOOLEAN MODE)
|
||||
test 0.000000001885928302414186
|
||||
DROP TABLE t1;
|
||||
# End of 10.3 tests
|
||||
#
|
||||
# MDEV-35183 ADD FULLTEXT INDEX unnecessarily DROPS FTS
|
||||
# COMMON TABLES
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
ID INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200), book VARCHAR(200),
|
||||
FULLTEXT fidx(title)) ENGINE = InnoDB;
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
ALTER TABLE t1 DROP INDEX fidx;
|
||||
select space into @common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
|
||||
ALTER TABLE t1 ADD FULLTEXT fidx_1(book);
|
||||
select space=@common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
|
||||
space=@common_space
|
||||
1
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(200) DEFAULT NULL,
|
||||
`book` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`ID`),
|
||||
FULLTEXT KEY `fidx_1` (`book`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
DROP TABLE t1;
|
||||
|
@@ -129,7 +129,7 @@ group by
|
||||
a.text, b.id, b.betreff
|
||||
order by
|
||||
match(b.betreff) against ('+abc' in boolean mode) desc;
|
||||
ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause
|
||||
ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER BY
|
||||
select a.text, b.id, b.betreff
|
||||
from
|
||||
t2 a inner join t3 b on a.id = b.forum inner join
|
||||
@@ -145,7 +145,7 @@ where
|
||||
match(c.beitrag) against ('+abc' in boolean mode)
|
||||
order by
|
||||
match(b.betreff) against ('+abc' in boolean mode) desc;
|
||||
ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause
|
||||
ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER BY
|
||||
select a.text, b.id, b.betreff
|
||||
from
|
||||
t2 a inner join t3 b on a.id = b.forum inner join
|
||||
|
@@ -1188,9 +1188,9 @@ DROP TABLE t;
|
||||
CREATE TABLE t(a CHAR(1),FULLTEXT KEY(a)) ENGINE=INNODB;
|
||||
HANDLER t OPEN;
|
||||
HANDLER t READ a NEXT;
|
||||
a
|
||||
ERROR HY000: FULLTEXT index `a` does not support this operation
|
||||
HANDLER t READ a PREV;
|
||||
a
|
||||
ERROR HY000: FULLTEXT index `a` does not support this operation
|
||||
DROP TABLE t;
|
||||
CREATE TABLE `%`(a TEXT, FULLTEXT INDEX(a)) ENGINE=INNODB;
|
||||
CREATE TABLE `A B`(a TEXT, FULLTEXT INDEX(a)) ENGINE=INNODB;
|
||||
|
@@ -1183,9 +1183,9 @@ DROP TABLE t;
|
||||
CREATE TABLE t(a CHAR(1),FULLTEXT KEY(a)) ENGINE=INNODB;
|
||||
HANDLER t OPEN;
|
||||
HANDLER t READ a NEXT;
|
||||
a
|
||||
ERROR HY000: FULLTEXT index `a` does not support this operation
|
||||
HANDLER t READ a PREV;
|
||||
a
|
||||
ERROR HY000: FULLTEXT index `a` does not support this operation
|
||||
DROP TABLE t;
|
||||
CREATE TABLE `%`(a TEXT, FULLTEXT INDEX(a)) ENGINE=INNODB;
|
||||
CREATE TABLE `A B`(a TEXT, FULLTEXT INDEX(a)) ENGINE=INNODB;
|
||||
|
@@ -805,3 +805,19 @@ SELECT f1, MATCH(f1) AGAINST ("test" IN BOOLEAN MODE) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.3 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35183 ADD FULLTEXT INDEX unnecessarily DROPS FTS
|
||||
--echo # COMMON TABLES
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
ID INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200), book VARCHAR(200),
|
||||
FULLTEXT fidx(title)) ENGINE = InnoDB;
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
ALTER TABLE t1 DROP INDEX fidx;
|
||||
select space into @common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
|
||||
ALTER TABLE t1 ADD FULLTEXT fidx_1(book);
|
||||
select space=@common_space from information_schema.innodb_sys_tables where name like "test/FTS_%_CONFIG";
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
@@ -1155,7 +1155,9 @@ DROP TABLE t;
|
||||
# InnoDB FTS does not support index scan from handler
|
||||
CREATE TABLE t(a CHAR(1),FULLTEXT KEY(a)) ENGINE=INNODB;
|
||||
HANDLER t OPEN;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
HANDLER t READ a NEXT;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
HANDLER t READ a PREV;
|
||||
DROP TABLE t;
|
||||
|
||||
|
@@ -1148,7 +1148,9 @@ DROP TABLE t;
|
||||
# InnoDB FTS does not support index scan from handler
|
||||
CREATE TABLE t(a CHAR(1),FULLTEXT KEY(a)) ENGINE=INNODB;
|
||||
HANDLER t OPEN;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
HANDLER t READ a NEXT;
|
||||
--error ER_KEY_DOESNT_SUPPORT
|
||||
HANDLER t READ a PREV;
|
||||
DROP TABLE t;
|
||||
|
||||
|
@@ -866,3 +866,17 @@ INSERT INTO `address` VALUES (1,'47 MySakila Drive',NULL,'Alberta',300,'','',0x0
|
||||
(605,'1325 Fukuyama Street','','Heilongjiang',537,'27107','288241215394',0x00000000010100000017540A70700160401E1C47077F7D4740,'2014-09-25 22:30:44');
|
||||
COMMIT;
|
||||
DROP TABLE address;
|
||||
#
|
||||
# MDEV-35116 InnoDB fails to set error index
|
||||
# for HA_ERR_NULL_IN_SPATIAL
|
||||
#
|
||||
BINLOG ' SOgWTg8BAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=';
|
||||
CREATE TABLE t1 (i INT, g GEOMETRY NOT NULL,
|
||||
SPATIAL INDEX (g)) ENGINE=InnoDB;
|
||||
CREATE TEMPORARY TABLE t2 (PRIMARY KEY(a)) ENGINE=InnoDB
|
||||
WITH RECURSIVE t(a) AS (VALUES(1),(1)) SELECT * FROM t;
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table .*");
|
||||
BINLOG ' SVtYRxMBAAAAKQAAADQBAAAAABAAAAAAAAAABHRlc3QAAnQxAAEDAAE=SVtYRxcBAAAAIgAAAFYBAAAQABAAAAAAAAEAAf /+ AgAAAA==';
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
DROP TABLE t1;
|
||||
|
@@ -851,3 +851,19 @@ INSERT INTO `address` VALUES (1,'47 MySakila Drive',NULL,'Alberta',300,'','',0x0
|
||||
COMMIT;
|
||||
|
||||
DROP TABLE address;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35116 InnoDB fails to set error index
|
||||
--echo # for HA_ERR_NULL_IN_SPATIAL
|
||||
--echo #
|
||||
BINLOG ' SOgWTg8BAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=';
|
||||
CREATE TABLE t1 (i INT, g GEOMETRY NOT NULL,
|
||||
SPATIAL INDEX (g)) ENGINE=InnoDB;
|
||||
--error ER_DUP_ENTRY
|
||||
CREATE TEMPORARY TABLE t2 (PRIMARY KEY(a)) ENGINE=InnoDB
|
||||
WITH RECURSIVE t(a) AS (VALUES(1),(1)) SELECT * FROM t;
|
||||
|
||||
call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table .*");
|
||||
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
||||
BINLOG ' SVtYRxMBAAAAKQAAADQBAAAAABAAAAAAAAAABHRlc3QAAnQxAAEDAAE=SVtYRxcBAAAAIgAAAFYBAAAQABAAAAAAAAEAAf /+ AgAAAA==';
|
||||
DROP TABLE t1;
|
||||
|
@@ -2473,7 +2473,7 @@ NULL
|
||||
Warnings:
|
||||
Warning 4042 Syntax error in JSON path in argument 6 to function 'json_search' at position 2
|
||||
select json_search(a, b, c);
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
ERROR 42S22: Unknown column 'a' in 'SELECT'
|
||||
select json_search( '{ "a": "foobar" }', 'one', 'foo%' );
|
||||
json_search( '{ "a": "foobar" }', 'one', 'foo%' )
|
||||
"$.a"
|
||||
|
@@ -43,7 +43,7 @@ j2 [{"a": 3, "b": [11,111]}, {"a": 4, "b": [22,222]}, {"a": 5, "b": [22,222]}] 2
|
||||
j2 [{"a": 3, "b": [11,111]}, {"a": 4, "b": [22,222]}, {"a": 5, "b": [22,222]}] 3 5 1 22
|
||||
j2 [{"a": 3, "b": [11,111]}, {"a": 4, "b": [22,222]}, {"a": 5, "b": [22,222]}] 3 5 2 222
|
||||
select * from t1, JSON_TABLE(t1.no_field, '$[*]' COLUMNS(js_id FOR ORDINALITY, a INT PATH '$.a', NESTED PATH '$.b[*]' COLUMNS (l_js_id FOR ORDINALITY, b INT PATH '$'))) as jt;
|
||||
ERROR 42S22: Unknown column 't1.no_field' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.no_field' in 'JSON_TABLE'
|
||||
select * from t1, JSON_TABLE(t1.no_field, '$[*]' COLUMNS(js_id FOR ORDINALITY, a INT PATH '$.a', NESTED PATH '$.b[*]' COLUMNS (l_js_id FOR ORDINALITY, a INT PATH '$'))) as jt;
|
||||
ERROR 42S21: Duplicate column name 'a'
|
||||
DROP TABLE t1;
|
||||
@@ -55,7 +55,7 @@ item_name item_props color
|
||||
Laptop {"color": "black", "price": 1000} black
|
||||
Jeans {"color": "blue", "price": 50} blue
|
||||
select * from t1 right join json_table(t1.item_props,'$' columns( color varchar(100) path '$.color')) as T on 1;
|
||||
ERROR 42S22: Unknown column 't1.item_props' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.item_props' in 'JSON_TABLE'
|
||||
DROP TABLE t1;
|
||||
select * from JSON_TABLE( '[ {"xa": 1, "b": [11,111]}, {"a": 2, "b": [22,222]}, {"a":3}]', '$[*]' COLUMNS( a INT PATH '$.a' default 101 on empty, NESTED PATH '$.b[*]' COLUMNS (b INT PATH '$'))) as jt;
|
||||
a b
|
||||
@@ -256,14 +256,14 @@ CREATE TABLE t1 (x INT);
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
SELECT t1.x*2 m, jt.* FROM t1,
|
||||
JSON_TABLE(m, '$[*]' COLUMNS (i INT PATH '$')) jt;
|
||||
ERROR 42S22: Unknown column 'm' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'm' in 'JSON_TABLE'
|
||||
DROP TABLE t1;
|
||||
select *
|
||||
from
|
||||
json_table(JS3.size, '$' columns (size INT PATH '$.size')) as JS1,
|
||||
json_table(JS1.size, '$' columns (size INT PATH '$.size')) as JS2,
|
||||
json_table(JS1.size, '$' columns (size INT PATH '$.size')) as JS3 where 1;
|
||||
ERROR 42S22: Unknown column 'JS3.size' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'JS3.size' in 'JSON_TABLE'
|
||||
create table t1 (json varchar(100) character set utf8);
|
||||
insert into t1 values ('{"value":"АБВ"}');
|
||||
create table tj1 as
|
||||
@@ -290,7 +290,7 @@ test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze Warning Engine-independent statistics are not collected for column 'f1'
|
||||
test.t1 analyze status OK
|
||||
SELECT * FROM JSON_TABLE(tt3.f1, "$" COLUMNS (id FOR ORDINALITY)) AS tbl STRAIGHT_JOIN t1 AS tt3;
|
||||
ERROR 42S22: Unknown column 'tt3.f1' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'tt3.f1' in 'JSON_TABLE'
|
||||
SELECT * FROM t1 as jj1,
|
||||
(SELECT tt2.*
|
||||
FROM
|
||||
@@ -300,7 +300,7 @@ STRAIGHT_JOIN
|
||||
t1 AS tt3
|
||||
) dt
|
||||
ORDER BY 1,3 LIMIT 10;
|
||||
ERROR 42S22: Unknown column 'tt3.f1' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'tt3.f1' in 'JSON_TABLE'
|
||||
drop table t1;
|
||||
select collation(x) from
|
||||
JSON_TABLE('["abc"]', '$[*]' COLUMNS (x VARCHAR(10) CHARSET latin1 PATH '$')) tbl;
|
||||
@@ -608,13 +608,13 @@ DROP TABLE t1;
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
SELECT * FROM t1 RIGHT JOIN JSON_TABLE(t1.a,'$' COLUMNS(o FOR ORDINALITY)) jt ON TRUE;
|
||||
ERROR 42S22: Unknown column 't1.a' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.a' in 'JSON_TABLE'
|
||||
CREATE VIEW v AS
|
||||
SELECT * FROM t1 RIGHT JOIN JSON_TABLE(t1.a,'$' COLUMNS(o FOR ORDINALITY)) jt ON TRUE;
|
||||
ERROR 42S22: Unknown column 't1.a' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.a' in 'JSON_TABLE'
|
||||
insert into t1 values (1),(2),(3);
|
||||
SELECT * FROM t1 RIGHT JOIN JSON_TABLE(t1.a,'$' COLUMNS(o FOR ORDINALITY)) jt ON TRUE;
|
||||
ERROR 42S22: Unknown column 't1.a' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.a' in 'JSON_TABLE'
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-25202: JSON_TABLE: Early table reference leads to unexpected result set, server crash
|
||||
@@ -624,9 +624,9 @@ INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (a INT);
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
SELECT * FROM JSON_TABLE(a, '$' COLUMNS(o FOR ORDINALITY)) AS jt1 NATURAL JOIN t1 JOIN t2;
|
||||
ERROR 42S22: Unknown column 'a' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'a' in 'JSON_TABLE'
|
||||
SELECT * FROM JSON_TABLE(a, '$' COLUMNS(o FOR ORDINALITY)) AS jt1 NATURAL JOIN t1 STRAIGHT_JOIN t2;
|
||||
ERROR 42S22: Unknown column 'a' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'a' in 'JSON_TABLE'
|
||||
drop table t1,t2;
|
||||
# Now, try a JSON_TABLE that has a subquery that has an outside reference:
|
||||
create table t1(a int, js varchar(32));
|
||||
@@ -648,7 +648,7 @@ t1 right join
|
||||
json_table(concat('',js),
|
||||
'$' columns ( color varchar(32) path '$.color')
|
||||
) as JT on 1;
|
||||
ERROR 42S22: Unknown column 'js' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'js' in 'JSON_TABLE'
|
||||
explain
|
||||
select *
|
||||
from
|
||||
@@ -666,7 +666,7 @@ t1 right join
|
||||
json_table((select concat(a,js) from t2),
|
||||
'$' columns ( color varchar(32) path '$.color')
|
||||
) as JT on 1;
|
||||
ERROR 42S22: Unknown column 'js' in 'field list'
|
||||
ERROR 42S22: Unknown column 'js' in 'SELECT'
|
||||
drop table t1,t2;
|
||||
#
|
||||
# Now, a testcase with JSON_TABLEs inside NATURAL JOIN
|
||||
@@ -683,7 +683,7 @@ natural join
|
||||
json_table(JT.d, '$' COLUMNS (d for ordinality)) as JT2
|
||||
)
|
||||
);
|
||||
ERROR 42S22: Unknown column 'JT2.d' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'JT2.d' in 'JSON_TABLE'
|
||||
drop table t1, t2;
|
||||
#
|
||||
# MDEV-25352: JSON_TABLE: Inconsistent name resolution and ER_VIEW_INVALID ...
|
||||
@@ -699,10 +699,10 @@ t1 NATURAL JOIN t2
|
||||
RIGHT JOIN
|
||||
JSON_TABLE (t1.b, '$' COLUMNS(o FOR ORDINALITY)) AS jt ON (t1.a = jt.o)
|
||||
WHERE t1.a = 1;
|
||||
ERROR 42S22: Unknown column 't1.b' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.b' in 'JSON_TABLE'
|
||||
CREATE OR REPLACE VIEW v AS
|
||||
SELECT t1.* FROM t1 NATURAL JOIN t2 RIGHT JOIN JSON_TABLE (t1.b, '$' COLUMNS(o FOR ORDINALITY)) AS jt ON (t1.a = jt.o) WHERE t1.a = 1;
|
||||
ERROR 42S22: Unknown column 't1.b' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.b' in 'JSON_TABLE'
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-25256: JSON_TABLE: Error ER_VIEW_INVALID upon running query via view
|
||||
@@ -714,14 +714,14 @@ ON(1)
|
||||
RIGHT JOIN JSON_TABLE('[]', '$' COLUMNS(o3 FOR ORDINALITY)) AS jt3
|
||||
ON(1)
|
||||
WHERE 0;
|
||||
ERROR 42S22: Unknown column 'jt1.a' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'jt1.a' in 'JSON_TABLE'
|
||||
#
|
||||
# MDEV-25346: JSON_TABLE: Server crashes in Item_field::fix_outer_field upon subquery with unknown column
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
SELECT * FROM ( SELECT * FROM t1 JOIN t2 ON (b IN(SELECT x FROM (SELECT 1 AS c) AS sq1))) AS sq2;
|
||||
ERROR 42S22: Unknown column 'x' in 'field list'
|
||||
ERROR 42S22: Unknown column 'x' in 'SELECT'
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Another testcase
|
||||
|
@@ -581,7 +581,7 @@ NULL
|
||||
# Bug#25413069: SIG11 IN CHECK_COLUMN_GRANT_IN_TABLE_REF
|
||||
#
|
||||
SELECT a FROM JSON_TABLE(abc, '$[*]' COLUMNS ( a int path '$.a')) AS jt;
|
||||
ERROR 42S22: Unknown column 'abc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'abc' in 'JSON_TABLE'
|
||||
#
|
||||
# Bug#25420680: ASSERTION `THD->IS_ERROR()' FAILED IN SQL/SQL_SELECT.CC
|
||||
#
|
||||
@@ -669,10 +669,10 @@ DEALLOCATE PREPARE stmt;
|
||||
CREATE TABLE t1 (id INT, jc JSON);
|
||||
SELECT * FROM t1 RIGHT JOIN JSON_TABLE(t1.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt ON t1.jc=jt.id;
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE'
|
||||
SELECT * FROM JSON_TABLE(t1.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt LEFT JOIN t1 ON t1.jc=jt.id;
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE'
|
||||
SELECT * FROM JSON_TABLE(t1.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt RIGHT JOIN t1 ON t1.jc=jt.id;
|
||||
id id jc
|
||||
@@ -696,33 +696,33 @@ SELECT * FROM t1 AS t1o RIGHT JOIN
|
||||
(t1 AS t1i JOIN JSON_TABLE(t1o.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt ON t1i.jc=jt.id)
|
||||
ON t1o.id=t1i.id;
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE'
|
||||
SELECT * FROM t1 AS t1o RIGHT JOIN
|
||||
(t1 AS t1i RIGHT JOIN JSON_TABLE(t1o.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt ON t1i.jc=jt.id)
|
||||
ON t1o.id=t1i.id;
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE'
|
||||
WITH qn AS
|
||||
(SELECT jt.* FROM t1 RIGHT JOIN JSON_TABLE(t1.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt ON t1.jc=jt.id)
|
||||
SELECT * from qn;
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE'
|
||||
WITH qn AS
|
||||
(SELECT 1 UNION
|
||||
SELECT jt.id FROM t1 RIGHT JOIN JSON_TABLE(t1.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt ON t1.jc=jt.id)
|
||||
SELECT * from qn;
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1.jc' in 'JSON_TABLE'
|
||||
SELECT * FROM t1 AS t1o RIGHT JOIN
|
||||
(t1 AS t1i JOIN JSON_TABLE(t1o.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt ON t1i.jc=jt.id)
|
||||
ON t1o.id=t1i.id;
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE'
|
||||
SELECT * FROM t1 AS t1o RIGHT JOIN
|
||||
(t1 AS t1i RIGHT JOIN JSON_TABLE(t1o.jc, '$' COLUMNS
|
||||
(id FOR ORDINALITY)) as jt ON t1i.jc=jt.id)
|
||||
ON t1o.id=t1i.id;
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 't1o.jc' in 'JSON_TABLE'
|
||||
INSERT INTO t1 VALUES(1,"1"),(2,"4"),(3,"3");
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
@@ -745,14 +745,14 @@ LEFT JOIN
|
||||
JSON_TABLE(t1.jc, '$' COLUMNS (id FOR ORDINALITY)) as jt ON t1.jc=jt.id
|
||||
RIGHT JOIN
|
||||
JSON_TABLE(jt.id, '$' COLUMNS (id FOR ORDINALITY)) as jt1 ON jt.id=jt1.id;
|
||||
ERROR 42S22: Unknown column 'jt.id' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'jt.id' in 'JSON_TABLE'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#25525409: ASSERTION `TABLE_LIST->TABLE' FAILED IN SQL/SQL_BASE.CC
|
||||
#
|
||||
SELECT * FROM JSON_TABLE( ( SELECT a ) , '$.*' COLUMNS (col1 FOR ORDINALITY) )
|
||||
AS alias1;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
ERROR 42S22: Unknown column 'a' in 'SELECT'
|
||||
SELECT * FROM JSON_TABLE( ( SELECT 1 ) , '$.*' COLUMNS (col1 FOR ORDINALITY) )
|
||||
AS alias1;
|
||||
col1
|
||||
@@ -1052,7 +1052,7 @@ CREATE TABLE t (x INT);
|
||||
INSERT INTO t VALUES (1), (2), (3);
|
||||
SELECT MAX(t.x) OVER () m, jt.* FROM t,
|
||||
JSON_TABLE(JSON_ARRAY(m), '$[*]' COLUMNS (i INT PATH '$')) jt;
|
||||
ERROR 42S22: Unknown column 'm' in 'JSON_TABLE argument'
|
||||
ERROR 42S22: Unknown column 'm' in 'JSON_TABLE'
|
||||
DROP TABLE t;
|
||||
#
|
||||
# Bug#26583283: ASSERTION `!THD->IS_ERROR()' FAILED IN SQL_RESOLVER.CC
|
||||
|
@@ -39,7 +39,7 @@ t1 CREATE TABLE `t1` (
|
||||
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
ALTER TABLE t1 ORDER BY unknown_column;
|
||||
ERROR 42S22: Unknown column 'unknown_column' in 'order clause'
|
||||
ERROR 42S22: Unknown column 'unknown_column' in 'ORDER BY'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@@ -143,7 +143,7 @@ connection default;
|
||||
INSERT INTO t1 SELECT a FROM t2;
|
||||
ERROR 21S01: Column count doesn't match value count at row 1
|
||||
connection con1;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
ERROR 42S22: Unknown column 'b' in 'SELECT'
|
||||
disconnect con1;
|
||||
connection default;
|
||||
drop table t1, t2;
|
||||
@@ -154,7 +154,7 @@ CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
INSERT INTO t1 (id) SELECT b FROM t2;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
ERROR 42S22: Unknown column 'b' in 'SELECT'
|
||||
INSERT INTO t1 SELECT a FROM t2;
|
||||
ERROR 21S01: Column count doesn't match value count at row 1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
@@ -440,7 +440,7 @@ a b
|
||||
4 four
|
||||
set @arg00=0 ;
|
||||
execute stmt1 using @arg00;
|
||||
ERROR 42S22: Unknown column '?' in 'order clause'
|
||||
ERROR 42S22: Unknown column '?' in 'ORDER BY'
|
||||
set @arg00=1;
|
||||
prepare stmt1 from ' select a,b from t1 order by a
|
||||
limit 1 ';
|
||||
|
@@ -1,3 +1,2 @@
|
||||
log_page_corruption : MDEV-26210
|
||||
mariabackup.xb_compressed_encrypted : MDEV-26154 (error 194 "Tablespace is missing for a table")
|
||||
innodb_ddl_on_intermediate_table : MENT-1213
|
||||
|
@@ -7,7 +7,7 @@ select 1;
|
||||
1
|
||||
1
|
||||
select foobar;
|
||||
ERROR 42S22: Unknown column 'foobar' in 'field list'
|
||||
ERROR 42S22: Unknown column 'foobar' in 'SELECT'
|
||||
show status like 'audit_null%';
|
||||
Variable_name Value
|
||||
Audit_null_called 9
|
||||
|
8
mysql-test/suite/plugins/r/fulltext_notembedded.result
Normal file
8
mysql-test/suite/plugins/r/fulltext_notembedded.result
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# MDEV-35050 Found wrong usage of mutex upon setting plugin session variables
|
||||
#
|
||||
install soname 'mypluglib';
|
||||
set session_track_system_variables="*";
|
||||
set session simple_parser_simple_thdvar_one = 10;
|
||||
uninstall soname 'mypluglib';
|
||||
# End of 10.5 tests
|
@@ -8,11 +8,3 @@ DROP TABLE t1;
|
||||
UNINSTALL PLUGIN simple_parser;
|
||||
show status like 'a%status';
|
||||
Variable_name Value
|
||||
#
|
||||
# MDEV-35050 Found wrong usage of mutex upon setting plugin session variables
|
||||
#
|
||||
install soname 'mypluglib';
|
||||
set session_track_system_variables="*";
|
||||
set session simple_parser_simple_thdvar_one = 10;
|
||||
uninstall soname 'mypluglib';
|
||||
# End of 10.5 tests
|
||||
|
@@ -150,12 +150,13 @@ show create user mysqltest1;
|
||||
CREATE USER for mysqltest1@%
|
||||
CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971'
|
||||
set password for mysqltest1 = password('foobar');
|
||||
ERROR HY000: SET PASSWORD is not applicable for users authenticating via unix_socket plugin
|
||||
show create user mysqltest1;
|
||||
CREATE USER for mysqltest1@%
|
||||
CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*9B500343BC52E2911172EB52AE5CF4847604C6E5'
|
||||
alter user mysqltest1 identified via unix_socket;
|
||||
set password for mysqltest1 = password('bla');
|
||||
ERROR HY000: SET PASSWORD is ignored for users authenticating via unix_socket plugin
|
||||
ERROR HY000: SET PASSWORD is not applicable for users authenticating via unix_socket plugin
|
||||
alter user mysqltest1 identified via mysql_native_password as password("some") or unix_socket;
|
||||
show create user mysqltest1;
|
||||
CREATE USER for mysqltest1@%
|
||||
|
@@ -107,7 +107,7 @@ select user(), current_user(), database();
|
||||
user() current_user() database()
|
||||
pam_test@localhost pam_test@% test
|
||||
set password='foo';
|
||||
ERROR HY000: SET PASSWORD is ignored for users authenticating via pam plugin
|
||||
ERROR HY000: SET PASSWORD is not applicable for users authenticating via pam plugin
|
||||
show create user;
|
||||
CREATE USER for pam_test@%
|
||||
CREATE USER `pam_test`@`%` IDENTIFIED VIA pam USING 'mariadb_mtr'
|
||||
|
@@ -61,14 +61,14 @@ grant select on *.* to user_name@localhost identified by 'test_pwd';
|
||||
ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1105 password_reuse_check:[1054] Unknown column 'hash' in 'field list'
|
||||
Warning 1105 password_reuse_check:[1054] Unknown column 'hash' in 'INSERT INTO'
|
||||
Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
|
||||
set global password_reuse_check_interval= 10;
|
||||
grant select on *.* to user_name@localhost identified by 'test_pwd';
|
||||
ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1105 password_reuse_check:[1054] Unknown column 'time' in 'where clause'
|
||||
Warning 1105 password_reuse_check:[1054] Unknown column 'time' in 'WHERE'
|
||||
Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
|
||||
drop table mysql.password_reuse_check_history;
|
||||
#
|
||||
|
12
mysql-test/suite/plugins/t/fulltext_notembedded.test
Normal file
12
mysql-test/suite/plugins/t/fulltext_notembedded.test
Normal file
@@ -0,0 +1,12 @@
|
||||
--source include/have_simple_parser.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35050 Found wrong usage of mutex upon setting plugin session variables
|
||||
--echo #
|
||||
install soname 'mypluglib';
|
||||
set session_track_system_variables="*";
|
||||
set session simple_parser_simple_thdvar_one = 10;
|
||||
uninstall soname 'mypluglib';
|
||||
|
||||
--echo # End of 10.5 tests
|
@@ -1,4 +1,3 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_simple_parser.inc
|
||||
|
||||
--echo #
|
||||
@@ -15,13 +14,3 @@ UNINSTALL PLUGIN simple_parser;
|
||||
# Bug #69682 - mysqld crashes after uninstall of plugin with "first" status var
|
||||
#
|
||||
show status like 'a%status';
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35050 Found wrong usage of mutex upon setting plugin session variables
|
||||
--echo #
|
||||
install soname 'mypluglib';
|
||||
set session_track_system_variables="*";
|
||||
set session simple_parser_simple_thdvar_one = 10;
|
||||
uninstall soname 'mypluglib';
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
@@ -162,6 +162,7 @@ set password for mysqltest1 = password('foobar');
|
||||
show create user mysqltest1;
|
||||
alter user mysqltest1 identified via unix_socket OR mysql_native_password as password("some");
|
||||
show create user mysqltest1;
|
||||
--error ER_SET_PASSWORD_AUTH_PLUGIN
|
||||
set password for mysqltest1 = password('foobar');
|
||||
show create user mysqltest1;
|
||||
alter user mysqltest1 identified via unix_socket;
|
||||
|
@@ -24,7 +24,7 @@ SELECT f1();
|
||||
connection con1;
|
||||
unlock tables;
|
||||
connection default;
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
ERROR 42S22: Unknown column 'a' in 'SELECT'
|
||||
disconnect con1;
|
||||
drop function f1;
|
||||
drop table t1;
|
||||
|
@@ -32,4 +32,75 @@ set @@global.binlog_commit_wait_count=@save_bgc_count;
|
||||
set @@global.binlog_commit_wait_usec=@save_bgc_usec;
|
||||
set @@global.debug_dbug=@save_debug_dbug;
|
||||
drop table t1, t2, t3;
|
||||
#
|
||||
# MDEV-34122
|
||||
# If semi-sync is switched off then on while a transaction is
|
||||
# in-between binlogging and waiting for an ACK, ensure that the
|
||||
# transaction skips the wait altogether (otherwise it would time-out).
|
||||
# Note that prior to MDEV-34122, there was a debug assertion that would
|
||||
# trigger if the transaction tried to wait but could not receive an ACK
|
||||
# signal.
|
||||
#
|
||||
# MDEV-34122.a: Test wait_point = AFTER_SYNC
|
||||
# Here, debug_sync is used to pause the leader thread between reporting
|
||||
# the binlogging to semi-sync, and starting the wait for ACK; and during
|
||||
# this pause, semi-sync is manually switched off and on.
|
||||
connection master;
|
||||
set @old_master_wait_point= @@global.rpl_semi_sync_master_wait_point;
|
||||
set @old_master_wait_no_slave= @@global.rpl_semi_sync_master_wait_no_slave;
|
||||
set @@global.rpl_semi_sync_master_wait_point= AFTER_SYNC;
|
||||
set @@global.rpl_semi_sync_master_wait_no_slave= 1;
|
||||
set @@global.debug_dbug="+d,semisync_log_skip_trx_wait";
|
||||
# Waiting for semi-sync to turn on..
|
||||
connection slave;
|
||||
connection master;
|
||||
create table t (a int) engine=innodb;
|
||||
connection slave;
|
||||
# Wait no slave is on, so we don't need to slave on to wait for the
|
||||
# ACK, and this way we guarantee the ACK doesn't come, so we can verify
|
||||
# the informational message is displayed
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection server_1;
|
||||
start transaction;
|
||||
insert into t values (0);
|
||||
set debug_sync= "commit_after_release_LOCK_log SIGNAL trx_binlogged WAIT_FOR continue_commit";
|
||||
commit;
|
||||
connection master;
|
||||
set debug_sync= "now WAIT_FOR trx_binlogged";
|
||||
# Switching semi-sync off/on
|
||||
set @@global.rpl_semi_sync_master_enabled= 0;
|
||||
set @@global.rpl_semi_sync_master_enabled= 1;
|
||||
# Resuming transaction to await ACK
|
||||
set debug_sync= "now SIGNAL continue_commit";
|
||||
connection server_1;
|
||||
include/assert_grep.inc [Ensure error log shows that transaction is skipping its semi-sync wait]
|
||||
# Cleanup
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
drop table t;
|
||||
connection slave;
|
||||
#
|
||||
# MDEV-34122.b: Test wait_point = AFTER_COMMIT
|
||||
# Here, use a transaction with a non-transactional statement to write to
|
||||
# the binlog directly, and turn off/on semi-sync before committing the
|
||||
# transaction.
|
||||
connection master;
|
||||
set @@global.rpl_semi_sync_master_wait_point= AFTER_COMMIT;
|
||||
# Waiting for semi-sync to turn on..
|
||||
connection slave;
|
||||
connection master;
|
||||
create table tn (a int) engine=Aria;
|
||||
start transaction;
|
||||
insert into tn values (NULL);
|
||||
set @@global.rpl_semi_sync_master_enabled= 0;
|
||||
set @@global.rpl_semi_sync_master_enabled= 1;
|
||||
commit;
|
||||
# Cleanup
|
||||
connection master;
|
||||
drop table tn;
|
||||
set @@global.rpl_semi_sync_master_wait_point= @old_master_wait_point;
|
||||
set @@global.rpl_semi_sync_master_wait_no_slave= @old_master_wait_no_slave;
|
||||
set @@global.debug_dbug=@save_debug_dbug;
|
||||
include/rpl_end.inc
|
||||
|
@@ -36,7 +36,7 @@ SET @a = unknown_column_just_to_raise_an_error;
|
||||
INSERT INTO t2 VALUES (NULL) ;
|
||||
END||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
ERROR 42S22: Unknown column 'unknown_column_just_to_raise_an_error' in 'field list'
|
||||
ERROR 42S22: Unknown column 'unknown_column_just_to_raise_an_error' in 'SET'
|
||||
connection slave;
|
||||
connection master;
|
||||
drop trigger tr;
|
||||
|
@@ -19,9 +19,12 @@
|
||||
# References:
|
||||
# MDEV-33551: Semi-sync Wait Point AFTER_COMMIT Slow on Workloads with Heavy
|
||||
# Concurrency
|
||||
# MDEV-34122: Assertion `entry' failed in Active_tranx::assert_thd_is_waiter
|
||||
#
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
--connection master
|
||||
@@ -77,4 +80,118 @@ set @@global.binlog_commit_wait_usec=@save_bgc_usec;
|
||||
set @@global.debug_dbug=@save_debug_dbug;
|
||||
drop table t1, t2, t3;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34122
|
||||
--echo # If semi-sync is switched off then on while a transaction is
|
||||
--echo # in-between binlogging and waiting for an ACK, ensure that the
|
||||
--echo # transaction skips the wait altogether (otherwise it would time-out).
|
||||
--echo # Note that prior to MDEV-34122, there was a debug assertion that would
|
||||
--echo # trigger if the transaction tried to wait but could not receive an ACK
|
||||
--echo # signal.
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34122.a: Test wait_point = AFTER_SYNC
|
||||
--echo # Here, debug_sync is used to pause the leader thread between reporting
|
||||
--echo # the binlogging to semi-sync, and starting the wait for ACK; and during
|
||||
--echo # this pause, semi-sync is manually switched off and on.
|
||||
|
||||
|
||||
--connection master
|
||||
set @old_master_wait_point= @@global.rpl_semi_sync_master_wait_point;
|
||||
set @old_master_wait_no_slave= @@global.rpl_semi_sync_master_wait_no_slave;
|
||||
set @@global.rpl_semi_sync_master_wait_point= AFTER_SYNC;
|
||||
set @@global.rpl_semi_sync_master_wait_no_slave= 1;
|
||||
--eval set @@global.debug_dbug="+d,semisync_log_skip_trx_wait"
|
||||
|
||||
--echo # Waiting for semi-sync to turn on..
|
||||
let $status_var= rpl_semi_sync_master_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
--connection slave
|
||||
let $status_var= rpl_semi_sync_slave_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
|
||||
--connection master
|
||||
create table t (a int) engine=innodb;
|
||||
--sync_slave_with_master
|
||||
|
||||
--echo # Wait no slave is on, so we don't need to slave on to wait for the
|
||||
--echo # ACK, and this way we guarantee the ACK doesn't come, so we can verify
|
||||
--echo # the informational message is displayed
|
||||
--connection slave
|
||||
--source include/stop_slave.inc
|
||||
|
||||
--connection server_1
|
||||
start transaction;
|
||||
insert into t values (0);
|
||||
set debug_sync= "commit_after_release_LOCK_log SIGNAL trx_binlogged WAIT_FOR continue_commit";
|
||||
--send commit
|
||||
|
||||
--connection master
|
||||
set debug_sync= "now WAIT_FOR trx_binlogged";
|
||||
|
||||
--echo # Switching semi-sync off/on
|
||||
set @@global.rpl_semi_sync_master_enabled= 0;
|
||||
set @@global.rpl_semi_sync_master_enabled= 1;
|
||||
let $status_var= rpl_semi_sync_master_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
|
||||
--echo # Resuming transaction to await ACK
|
||||
set debug_sync= "now SIGNAL continue_commit";
|
||||
|
||||
--connection server_1
|
||||
--reap
|
||||
|
||||
--let $assert_text= Ensure error log shows that transaction is skipping its semi-sync wait
|
||||
--let $assert_select=Skipping semi-sync wait for transaction
|
||||
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
|
||||
--let $assert_count= 1
|
||||
--let $assert_only_after=CURRENT_TEST
|
||||
--source include/assert_grep.inc
|
||||
|
||||
--echo # Cleanup
|
||||
--connection slave
|
||||
--source include/start_slave.inc
|
||||
|
||||
--connection master
|
||||
drop table t;
|
||||
--sync_slave_with_master
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34122.b: Test wait_point = AFTER_COMMIT
|
||||
--echo # Here, use a transaction with a non-transactional statement to write to
|
||||
--echo # the binlog directly, and turn off/on semi-sync before committing the
|
||||
--echo # transaction.
|
||||
|
||||
--connection master
|
||||
set @@global.rpl_semi_sync_master_wait_point= AFTER_COMMIT;
|
||||
|
||||
--echo # Waiting for semi-sync to turn on..
|
||||
let $status_var= rpl_semi_sync_master_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
--connection slave
|
||||
let $status_var= rpl_semi_sync_slave_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
|
||||
--connection master
|
||||
create table tn (a int) engine=Aria;
|
||||
start transaction;
|
||||
insert into tn values (NULL);
|
||||
set @@global.rpl_semi_sync_master_enabled= 0;
|
||||
set @@global.rpl_semi_sync_master_enabled= 1;
|
||||
commit;
|
||||
|
||||
--echo # Cleanup
|
||||
--connection master
|
||||
drop table tn;
|
||||
set @@global.rpl_semi_sync_master_wait_point= @old_master_wait_point;
|
||||
set @@global.rpl_semi_sync_master_wait_no_slave= @old_master_wait_no_slave;
|
||||
set @@global.debug_dbug=@save_debug_dbug;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
@@ -302,16 +302,91 @@ drop sequence s;
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-32350 Can't selectively restore sequences using innodb tables from
|
||||
# backup
|
||||
#
|
||||
create sequence s2 engine=innodb;
|
||||
alter table s2 discard tablespace;
|
||||
SELECT NEXTVAL(s2);
|
||||
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
|
||||
create sequence s1 engine=innodb;
|
||||
select * from s1;
|
||||
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
|
||||
1 1 9223372036854775806 1 1 1000 0 0
|
||||
flush tables s1 for export;
|
||||
unlock tables;
|
||||
select * from s2;
|
||||
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
|
||||
SELECT NEXTVAL(s2);
|
||||
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
|
||||
alter sequence s2 restart;
|
||||
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
|
||||
alter table s2 import tablespace;
|
||||
select * from s2;
|
||||
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
|
||||
1 1 9223372036854775806 1 1 1000 0 0
|
||||
SELECT NEXTVAL(s2);
|
||||
NEXTVAL(s2)
|
||||
1
|
||||
select NEXTVAL(s1);
|
||||
NEXTVAL(s1)
|
||||
1
|
||||
flush table s1,s2;
|
||||
select * from s1;
|
||||
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
|
||||
1001 1 9223372036854775806 1 1 1000 0 0
|
||||
select * from s2;
|
||||
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
|
||||
1001 1 9223372036854775806 1 1 1000 0 0
|
||||
drop sequence s1,s2;
|
||||
#
|
||||
# MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
|
||||
#
|
||||
set @@innodb_compression_default= off;
|
||||
create or replace sequence s engine=innodb;
|
||||
set @@innodb_compression_default= on;
|
||||
create or replace table s_import like s;
|
||||
show create table s;
|
||||
Table Create Table
|
||||
s CREATE TABLE `s` (
|
||||
`next_not_cached_value` bigint(21) NOT NULL,
|
||||
`minimum_value` bigint(21) NOT NULL,
|
||||
`maximum_value` bigint(21) NOT NULL,
|
||||
`start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used',
|
||||
`increment` bigint(21) NOT NULL COMMENT 'increment value',
|
||||
`cache_size` bigint(21) unsigned NOT NULL,
|
||||
`cycle_option` tinyint(1) unsigned NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed',
|
||||
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
|
||||
) ENGINE=InnoDB SEQUENCE=1
|
||||
show create table s_import;
|
||||
Table Create Table
|
||||
s_import CREATE TABLE `s_import` (
|
||||
`next_not_cached_value` bigint(21) NOT NULL,
|
||||
`minimum_value` bigint(21) NOT NULL,
|
||||
`maximum_value` bigint(21) NOT NULL,
|
||||
`start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used',
|
||||
`increment` bigint(21) NOT NULL COMMENT 'increment value',
|
||||
`cache_size` bigint(21) unsigned NOT NULL,
|
||||
`cycle_option` tinyint(1) unsigned NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed',
|
||||
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
|
||||
) ENGINE=InnoDB SEQUENCE=1
|
||||
alter table s_import discard tablespace;
|
||||
flush table s for export;
|
||||
UNLOCK TABLES;
|
||||
alter table s_import import tablespace;
|
||||
drop table s,s_import;
|
||||
# End of 10.5 tests
|
||||
#
|
||||
# MDEV-31607 ER_DUP_KEY in mysql.table_stats upon REANME on sequence
|
||||
#
|
||||
CREATE SEQUENCE s1 ENGINE=InnoDB;
|
||||
CREATE SEQUENCE s2 ENGINE=InnoDB;
|
||||
SHOW CREATE SEQUENCE s1;
|
||||
Table Create Table
|
||||
s1 CREATE SEQUENCE `s1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
|
||||
s1 CREATE SEQUENCE `s1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB `PAGE_COMPRESSED`='ON'
|
||||
SHOW CREATE SEQUENCE s2;
|
||||
Table Create Table
|
||||
s2 CREATE SEQUENCE `s2` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
|
||||
s2 CREATE SEQUENCE `s2` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB `PAGE_COMPRESSED`='ON'
|
||||
DROP SEQUENCE s2;
|
||||
RENAME TABLE s1 TO s2;
|
||||
DROP SEQUENCE s2;
|
||||
|
@@ -202,6 +202,63 @@ drop sequence s;
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32350 Can't selectively restore sequences using innodb tables from
|
||||
--echo # backup
|
||||
--echo #
|
||||
|
||||
--disable_ps_protocol
|
||||
|
||||
create sequence s2 engine=innodb;
|
||||
alter table s2 discard tablespace;
|
||||
--error ER_GET_ERRNO
|
||||
SELECT NEXTVAL(s2);
|
||||
create sequence s1 engine=innodb;
|
||||
select * from s1;
|
||||
flush tables s1 for export;
|
||||
--let $MYSQLD_DATADIR= `select @@datadir`
|
||||
--move_file $MYSQLD_DATADIR/test/s1.cfg $MYSQLD_DATADIR/test/s2.cfg
|
||||
--copy_file $MYSQLD_DATADIR/test/s1.ibd $MYSQLD_DATADIR/test/s2.ibd
|
||||
unlock tables;
|
||||
--error ER_GET_ERRNO
|
||||
select * from s2;
|
||||
--error ER_GET_ERRNO
|
||||
SELECT NEXTVAL(s2);
|
||||
--error ER_GET_ERRNO
|
||||
alter sequence s2 restart;
|
||||
alter table s2 import tablespace;
|
||||
select * from s2;
|
||||
SELECT NEXTVAL(s2);
|
||||
select NEXTVAL(s1);
|
||||
flush table s1,s2;
|
||||
select * from s1;
|
||||
select * from s2;
|
||||
drop sequence s1,s2;
|
||||
|
||||
--enable_ps_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
|
||||
--echo #
|
||||
|
||||
set @@innodb_compression_default= off;
|
||||
create or replace sequence s engine=innodb;
|
||||
set @@innodb_compression_default= on;
|
||||
create or replace table s_import like s;
|
||||
|
||||
show create table s;
|
||||
show create table s_import;
|
||||
|
||||
alter table s_import discard tablespace;
|
||||
flush table s for export;
|
||||
--copy_file $MYSQLD_DATADIR/test/s.ibd $MYSQLD_DATADIR/test/s_import.ibd
|
||||
--copy_file $MYSQLD_DATADIR/test/s.cfg $MYSQLD_DATADIR/test/s_import.cfg
|
||||
UNLOCK TABLES;
|
||||
alter table s_import import tablespace;
|
||||
drop table s,s_import;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31607 ER_DUP_KEY in mysql.table_stats upon REANME on sequence
|
||||
--echo #
|
||||
|
@@ -724,3 +724,34 @@ ERROR HY000: Sequence 'test.s' table structure is invalid (Wrong number of colum
|
||||
#
|
||||
# End of 10.4 test
|
||||
#
|
||||
#
|
||||
# Ensure that SHOW CREATE TABLE shows used table options
|
||||
#
|
||||
SET @@innodb_compression_default=ON;
|
||||
CREATE TABLE seq (
|
||||
`next_not_cached_value` bigint(21) NOT NULL,
|
||||
`minimum_value` bigint(21) NOT NULL,
|
||||
`maximum_value` bigint(21) NOT NULL,
|
||||
`start_value` bigint(21) NOT NULL,
|
||||
`increment` bigint(21) NOT NULL,
|
||||
`cache_size` bigint(21) unsigned NOT NULL,
|
||||
`cycle_option` tinyint(1) unsigned NOT NULL,
|
||||
`cycle_count` bigint(21) NOT NULL
|
||||
) engine=innodb,sequence=1;
|
||||
show create sequence seq;
|
||||
Table Create Table
|
||||
seq CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB `PAGE_COMPRESSED`='ON'
|
||||
show create table seq;
|
||||
Table Create Table
|
||||
seq CREATE TABLE `seq` (
|
||||
`next_not_cached_value` bigint(21) NOT NULL,
|
||||
`minimum_value` bigint(21) NOT NULL,
|
||||
`maximum_value` bigint(21) NOT NULL,
|
||||
`start_value` bigint(21) NOT NULL,
|
||||
`increment` bigint(21) NOT NULL,
|
||||
`cache_size` bigint(21) unsigned NOT NULL,
|
||||
`cycle_option` tinyint(1) unsigned NOT NULL,
|
||||
`cycle_count` bigint(21) NOT NULL
|
||||
) ENGINE=InnoDB SEQUENCE=1 `PAGE_COMPRESSED`='ON'
|
||||
drop sequence seq;
|
||||
SET @@innodb_compression_default=DEFAULT;
|
||||
|
@@ -565,3 +565,23 @@ create table s sequence=1 as select 1;
|
||||
--echo #
|
||||
--echo # End of 10.4 test
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Ensure that SHOW CREATE TABLE shows used table options
|
||||
--echo #
|
||||
|
||||
SET @@innodb_compression_default=ON;
|
||||
CREATE TABLE seq (
|
||||
`next_not_cached_value` bigint(21) NOT NULL,
|
||||
`minimum_value` bigint(21) NOT NULL,
|
||||
`maximum_value` bigint(21) NOT NULL,
|
||||
`start_value` bigint(21) NOT NULL,
|
||||
`increment` bigint(21) NOT NULL,
|
||||
`cache_size` bigint(21) unsigned NOT NULL,
|
||||
`cycle_option` tinyint(1) unsigned NOT NULL,
|
||||
`cycle_count` bigint(21) NOT NULL
|
||||
) engine=innodb,sequence=1;
|
||||
show create sequence seq;
|
||||
show create table seq;
|
||||
drop sequence seq;
|
||||
SET @@innodb_compression_default=DEFAULT;
|
||||
|
@@ -497,7 +497,7 @@ select next value for t1;
|
||||
next value for t1
|
||||
1
|
||||
select next value for t1, minimum_value;
|
||||
ERROR 42S22: Unknown column 'minimum_value' in 'field list'
|
||||
ERROR 42S22: Unknown column 'minimum_value' in 'SELECT'
|
||||
drop sequence t1;
|
||||
#
|
||||
# MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions
|
||||
|
@@ -33,4 +33,4 @@ SELECT COUNT(@@GLOBAL.aria_log_dir_path);
|
||||
COUNT(@@GLOBAL.aria_log_dir_path)
|
||||
1
|
||||
SELECT aria_log_dir_path = @@SESSION.aria_log_dir_path;
|
||||
ERROR 42S22: Unknown column 'aria_log_dir_path' in 'field list'
|
||||
ERROR 42S22: Unknown column 'aria_log_dir_path' in 'SELECT'
|
||||
|
@@ -149,11 +149,11 @@ SELECT @@auto_increment_increment;
|
||||
@@auto_increment_increment
|
||||
1
|
||||
SELECT local.auto_increment_increment;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
ERROR 42S02: Unknown table 'local' in SELECT
|
||||
SELECT session.auto_increment_increment;
|
||||
ERROR 42S02: Unknown table 'session' in field list
|
||||
ERROR 42S02: Unknown table 'session' in SELECT
|
||||
SELECT auto_increment_increment = @@session.auto_increment_increment;
|
||||
ERROR 42S22: Unknown column 'auto_increment_increment' in 'field list'
|
||||
ERROR 42S22: Unknown column 'auto_increment_increment' in 'SELECT'
|
||||
SET @@global.auto_increment_increment = @start_global_value;
|
||||
SELECT @@global.auto_increment_increment;
|
||||
@@global.auto_increment_increment
|
||||
|
@@ -162,11 +162,11 @@ SELECT @@auto_increment_offset;
|
||||
@@auto_increment_offset
|
||||
1
|
||||
SELECT local.auto_increment_offset;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
ERROR 42S02: Unknown table 'local' in SELECT
|
||||
SELECT session.auto_increment_offset;
|
||||
ERROR 42S02: Unknown table 'session' in field list
|
||||
ERROR 42S02: Unknown table 'session' in SELECT
|
||||
SELECT auto_increment_offset = @@session.auto_increment_offset;
|
||||
ERROR 42S22: Unknown column 'auto_increment_offset' in 'field list'
|
||||
ERROR 42S22: Unknown column 'auto_increment_offset' in 'SELECT'
|
||||
SET @@global.auto_increment_offset = @start_global_value;
|
||||
SELECT @@global.auto_increment_offset;
|
||||
@@global.auto_increment_offset
|
||||
|
@@ -105,11 +105,11 @@ SELECT @@autocommit;
|
||||
@@autocommit
|
||||
1
|
||||
SELECT local.autocommit;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
ERROR 42S02: Unknown table 'local' in SELECT
|
||||
SELECT session.autocommit;
|
||||
ERROR 42S02: Unknown table 'session' in field list
|
||||
ERROR 42S02: Unknown table 'session' in SELECT
|
||||
SELECT autocommit = @@session.autocommit;
|
||||
ERROR 42S22: Unknown column 'autocommit' in 'field list'
|
||||
ERROR 42S22: Unknown column 'autocommit' in 'SELECT'
|
||||
SET @@global.autocommit = @start_value;
|
||||
SELECT @@global.autocommit;
|
||||
@@global.autocommit
|
||||
|
@@ -85,11 +85,11 @@ SELECT @@automatic_sp_privileges = @@global.automatic_sp_privileges;
|
||||
SET automatic_sp_privileges = 1;
|
||||
ERROR HY000: Variable 'automatic_sp_privileges' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT local.automatic_sp_privileges;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
ERROR 42S02: Unknown table 'local' in SELECT
|
||||
SELECT global.automatic_sp_privileges;
|
||||
ERROR 42S02: Unknown table 'global' in field list
|
||||
ERROR 42S02: Unknown table 'global' in SELECT
|
||||
SELECT automatic_sp_privileges = @@session.automatic_sp_privileges;
|
||||
ERROR 42S22: Unknown column 'automatic_sp_privileges' in 'field list'
|
||||
ERROR 42S22: Unknown column 'automatic_sp_privileges' in 'SELECT'
|
||||
SET @@global.automatic_sp_privileges = @start_value;
|
||||
SELECT @@global.automatic_sp_privileges;
|
||||
@@global.automatic_sp_privileges
|
||||
|
@@ -49,5 +49,5 @@ COUNT(@@GLOBAL.basedir)
|
||||
1
|
||||
1 Expected
|
||||
SELECT basedir = @@SESSION.basedir;
|
||||
ERROR 42S22: Unknown column 'basedir' in 'field list'
|
||||
ERROR 42S22: Unknown column 'basedir' in 'SELECT'
|
||||
Expected error 'Readonly variable'
|
||||
|
@@ -113,11 +113,11 @@ SELECT @@big_tables;
|
||||
@@big_tables
|
||||
1
|
||||
SELECT local.big_tables;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
ERROR 42S02: Unknown table 'local' in SELECT
|
||||
SELECT session.big_tables;
|
||||
ERROR 42S02: Unknown table 'session' in field list
|
||||
ERROR 42S02: Unknown table 'session' in SELECT
|
||||
select big_tables;
|
||||
ERROR 42S22: Unknown column 'big_tables' in 'field list'
|
||||
ERROR 42S22: Unknown column 'big_tables' in 'SELECT'
|
||||
SET @@big_tables = @start_value;
|
||||
Warnings:
|
||||
Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user