summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/galera/r/galera_virtual_column.result
blob: 71820ed822572bbbd2013732c4020be2f84c963e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE p (id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT) ENGINE = InnoDB;
CREATE TABLE c (id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, pid INT UNSIGNED, bitmap TINYINT UNSIGNED NOT NULL DEFAULT 0, bitmap5 TINYINT UNSIGNED GENERATED ALWAYS AS (bitmap&(1<<5)) VIRTUAL, FOREIGN KEY (pid) REFERENCES p (id) ON DELETE CASCADE ON UPDATE CASCADE);
CREATE INDEX bitmap5 ON c(bitmap5) USING BTREE;
INSERT INTO p VALUES(1);
INSERT INTO c(pid) VALUES(1);
connection node_2;
connection node_1;
DELETE FROM p WHERE id=1;
SELECT * FROM p;
id
SELECT * FROM c;
id	pid	bitmap	bitmap5
connection node_2;
connection node_1;
DROP TABLE c;
DROP TABLE p;