mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
27 lines
757 B
Text
27 lines
757 B
Text
connection node_2;
|
|
connection node_1;
|
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t1 VALUES (2), (3);
|
|
INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
|
|
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
|
|
INSERT INTO t2 VALUES (1);
|
|
INSERT INTO t2 VALUES (2), (3);
|
|
INSERT INTO t2 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
|
|
INSERT INTO t2 VALUES (6), (1);
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
UPDATE t1 SET f1 = 9;
|
|
UPDATE t2 SET f1 = 9 WHERE f1 = 1;
|
|
DELETE FROM t1 WHERE f1 = 9;
|
|
DELETE FROM t2 WHERE f1 = 9;
|
|
TRUNCATE TABLE t1;
|
|
TRUNCATE TABLE t1;
|
|
connection node_2;
|
|
SELECT COUNT(*) = 0 FROM t1;
|
|
COUNT(*) = 0
|
|
1
|
|
SELECT COUNT(*) = 0 FROM t2;
|
|
COUNT(*) = 0
|
|
1
|
|
DROP TABLE t1;
|
|
DROP TABLE t2;
|