mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
105 lines
2.8 KiB
Plaintext
105 lines
2.8 KiB
Plaintext
connection node_2;
|
|
connection node_1;
|
|
connection node_1;
|
|
SET SESSION default_storage_engine=InnoDB;
|
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
|
CREATE TABLE t1 AS SELECT * FROM t2;
|
|
ERROR 42S01: Table 't1' already exists
|
|
DROP TABLE t1,t2;
|
|
CREATE TABLE t1 AS SELECT * FROM t2;
|
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
|
CREATE TABLE t1 AS SELECT 1 FROM DUAL;
|
|
connection node_2;
|
|
SELECT COUNT(*) = 1 FROM t1;
|
|
COUNT(*) = 1
|
|
1
|
|
connection node_1;
|
|
DROP TABLE t1;
|
|
connection node_1;
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
|
CREATE TABLE t1 AS SELECT * FROM t2;
|
|
connection node_2;
|
|
SELECT COUNT(*) = 0 FROM t1;
|
|
COUNT(*) = 0
|
|
1
|
|
connection node_1;
|
|
DROP TABLE t1,t2;
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
|
|
INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
|
|
CREATE TABLE t1 AS SELECT * FROM t2;
|
|
SELECT COUNT(*) = 5 FROM t1;
|
|
COUNT(*) = 5
|
|
1
|
|
connection node_2;
|
|
SELECT COUNT(*) = 5 FROM t1;
|
|
COUNT(*) = 5
|
|
1
|
|
connection node_1;
|
|
DROP TABLE t1,t2;
|
|
connection node_1;
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
|
|
CREATE TABLE t1 AS SELECT MAX(f1) AS f1 FROM t2;
|
|
connection node_2;
|
|
SELECT COUNT(*) = 1 FROM t1;
|
|
COUNT(*) = 1
|
|
1
|
|
SELECT f1 = 5 FROM t1;
|
|
f1 = 5
|
|
1
|
|
connection node_1;
|
|
DROP TABLE t1,t2;
|
|
connection node_1;
|
|
CREATE PROCEDURE sp1 ()
|
|
BEGIN
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
|
|
CREATE TABLE t1 AS SELECT * FROM t2;
|
|
END|
|
|
CALL sp1();
|
|
SELECT COUNT(*) = 5 FROM t1;
|
|
COUNT(*) = 5
|
|
1
|
|
connection node_2;
|
|
SELECT COUNT(*) = 5 FROM t1;
|
|
COUNT(*) = 5
|
|
1
|
|
connection node_1;
|
|
DROP TABLE t1, t2;
|
|
DROP PROCEDURE sp1;
|
|
connection node_1;
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
|
|
PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT * FROM t2';
|
|
EXECUTE stmt;
|
|
DEALLOCATE PREPARE stmt;
|
|
DROP TABLE t1, t2;
|
|
connection node_1;
|
|
SET @save_debug_dbug=@@global.DEBUG_DBUG;
|
|
SET GLOBAL DEBUG_DBUG = '+d,sync.wsrep_apply_cb';
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
|
|
SET DEBUG_SYNC = 'create_table_select_before_create WAIT_FOR sync.wsrep_apply_cb_reached';
|
|
SET DEBUG_SYNC = 'create_table_select_before_lock SIGNAL signal.wsrep_apply_cb WAIT_FOR bf_abort';
|
|
CREATE TABLE t1 AS SELECT * FROM t2;;
|
|
connection node_2;
|
|
SELECT COUNT(*) = 5 FROM t2;
|
|
COUNT(*) = 5
|
|
1
|
|
CREATE TABLE t1 AS SELECT * FROM t2;
|
|
connection node_1;
|
|
ERROR 70100: Query execution was interrupted
|
|
SET GLOBAL DEBUG_DBUG = @save_debug_dbug;
|
|
SET DEBUG_SYNC = 'RESET';
|
|
DROP TABLE t1, t2;
|
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
|
|
CREATE TEMPORARY TABLE t1 AS SELECT * FROM t2;
|
|
connection node_2;
|
|
SELECT * FROM t1;
|
|
ERROR 42S02: Table 'test.t1' doesn't exist
|
|
CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query");
|
|
connection node_1;
|
|
DROP TABLE t1, t2;
|