blob: 6213e8f6380152d73b4dab7e2974848e9573c251 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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;
|