1
# Basic test routine for the Blackhole Engine
4
drop table if exists t1;
7
# Test with Variable Width Table
8
CREATE TABLE t1 (c1 int, c2 text, c3 blob) ENGINE=blackhole;
10
INSERT INTO t1 VALUES (111, "aaaa", "aaaa");
11
INSERT INTO t1 VALUES (222, "bbbb", "bbbb");
12
INSERT INTO t1 VALUES (333, "cccc", "cccc");
16
UPDATE t1 SET c2 = "xxxx" WHERE c1 = 111;
17
UPDATE t1 SET c2 = "yyyy" WHERE c1 = 222;
18
UPDATE t1 SET c2 = "zzzz" WHERE c1 = 333;
22
REPLACE INTO t1 VALUES (1, "one", "one");
23
REPLACE INTO t1 VALUES (2, "two", "two");
24
REPLACE INTO t1 VALUES (3, "three", "three");
28
DELETE FROM t1 WHERE c1 = 111;
29
DELETE FROM t1 WHERE c1 = 222;
37
# Test with Fixed Length Table + Primary Key
38
CREATE TABLE t1 (id int primary key, c1 int, c2 double) ENGINE=blackhole;
40
INSERT INTO t1 VALUES (1, 1111, 11.111);
41
INSERT INTO t1 VALUES (2, 2222, 22.222);
42
INSERT INTO t1 VALUES (3, 3333, 33.333);