mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
689d0a0ad5
Added one test case for ndb to mysql-test-run, ndb_basic. It will show that NDB Cluster is supported. mysql-test/install_test_db.sh: Added --skip-ndb wile installing test db mysql-test/mysql-test-run.sh: To enable NDB use --ndbcluster and to disable it --skip-ndbcluster or --skip-ndb mysql-test/r/ndb_basic.result: Updated testcase to use all uppercase mysql-test/t/ndb_basic.test: Updated testcase to use all uppercase
82 lines
1.7 KiB
Text
82 lines
1.7 KiB
Text
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (
|
|
pk1 INT NOT NULL PRIMARY KEY,
|
|
attr1 INT NOT NULL
|
|
) ENGINE=ndbcluster;
|
|
INSERT INTO t1 VALUES (9410,9412);
|
|
SELECT pk1 FROM t1;
|
|
pk1
|
|
9410
|
|
SELECT * FROM t1;
|
|
pk1 attr1
|
|
9410 9412
|
|
SELECT t1.* FROM t1;
|
|
pk1 attr1
|
|
9410 9412
|
|
UPDATE t1 SET attr1=1 WHERE pk1=9410;
|
|
SELECT * FROM t1;
|
|
pk1 attr1
|
|
9410 1
|
|
UPDATE t1 SET pk1=2 WHERE attr1=1;
|
|
ERROR 42000: Table 't1' uses an extension that doesn't exist in this MySQL version
|
|
SELECT * FROM t1;
|
|
pk1 attr1
|
|
9410 1
|
|
DELETE FROM t1;
|
|
SELECT * FROM t1;
|
|
pk1 attr1
|
|
INSERT INTO t1 VALUES (9410,9412);
|
|
DELETE FROM t1 WHERE pk1 = 9410;
|
|
SELECT * FROM t1;
|
|
pk1 attr1
|
|
INSERT INTO t1 VALUES (9410,9412), (9411, 9413), (9408, 8765);
|
|
DELETE FROM t1;
|
|
SELECT * FROM t1;
|
|
pk1 attr1
|
|
INSERT INTO t1 values (1, 4), (2, 4), (3, 5), (4, 4), (5, 5);
|
|
DELETE FROM t1 WHERE attr1=4;
|
|
SELECT * FROM t1 order by pk1;
|
|
pk1 attr1
|
|
3 5
|
|
5 5
|
|
DELETE FROM t1;
|
|
INSERT INTO t1 VALUES (9410,9412), (9411, 9413);
|
|
DELETE FROM t1 WHERE pk1 = 9410;
|
|
SELECT * FROM t1;
|
|
pk1 attr1
|
|
9411 9413
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster;
|
|
INSERT INTO t1 values(3456, 7890);
|
|
SELECT * FROM t1;
|
|
id id2
|
|
3456 7890
|
|
UPDATE t1 SET id=2 WHERE id2=12;
|
|
SELECT * FROM t1;
|
|
id id2
|
|
3456 7890
|
|
UPDATE t1 SET id=1234 WHERE id2=7890;
|
|
SELECT * FROM t1;
|
|
id id2
|
|
1234 7890
|
|
DELETE FROM t1;
|
|
INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890);
|
|
SELECT * FROM t1;
|
|
id id2
|
|
3456 7890
|
|
3456 7890
|
|
3456 7890
|
|
DELETE FROM t1 WHERE id = 3456;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (
|
|
pk1 INT NOT NULL PRIMARY KEY,
|
|
attr1 INT NOT NULL
|
|
) ENGINE=NDBCLUSTER;
|
|
INSERT INTO t1 values(1, 9999);
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (
|
|
pk1 INT NOT NULL PRIMARY KEY,
|
|
attr1 INT NOT NULL
|
|
) ENGINE=NDB;
|
|
INSERT INTO t1 values(1, 9999);
|
|
DROP TABLE t1;
|