Debian Codegraph @

mysql-test/suite/ndb_big/test_250_mysqld.test

raw
1 #
2 # This test uses a configuration with
3 # 250 MySQL Servers
4 # 1 Management server
5 # 2 Data nodes
6 #
7 # Running this test requires a fairly large machine. It
8 # also uses quite a lot of ports for all the started processes
9 # and to avoid port conflicts the X plugin is disabled in order
10 # to allow using also those ports
11 #
12 # NOTE! Currently mtr.pl need to be started with --no-check-testcases
13 # which time-out otherwise, also the "shutdown step" step is taking
14 # long time so using --shutdown-timeout=0 and --no-warnings is
15 # recommended.
16 #
17 # $> mtr.pl test_250_mysqld --no-check-testcases \
18 # --shutdown-timeout=0 --no-warnings
19 #
20 # The test can also be used just for starting a cluster:
21 # $1> mtr.pl ndb_big.test_250_mysqld --start
22 #
23 # $2> mysql --defaults-file=bld/mysql-test/var/my.cnf
24 #
25 #
26 --source include/not_parallel.inc
27 --source include/have_ndb.inc
28
29 # Total number of nodes
30 SELECT COUNT(*) as Nodes_in_cluster FROM ndbinfo.processes;
31
32 # Total number of MySQL Servers
33 SELECT COUNT(*) as MySQL_Servers FROM ndbinfo.processes
34 WHERE process_name = 'mysqld';
35
36 #
37 # The very basic test
38 # - showing table can be created in the storage engine NDB
39 # - read and write the table
40 #
41 CREATE TABLE t1 (
42 a int PRIMARY KEY,
43 b varchar(255)
44 ) ENGINE = NDB;
45
46 INSERT INTO t1 VALUES (1, "MySQL Server with NDB");
47 INSERT INTO t1 (a, b) VALUES (11, "Barrier effect");
48 INSERT INTO t1 (a, b) VALUES
49 (12, "The third row"),
50 (37, "And of course number 37");
51 SELECT * FROM t1 WHERE a = 1;
52 UPDATE t1 SET b = CONCAT(b, " test") WHERE a = 1;
53 SELECT * FROM t1 WHERE a = 1;
54 REPLACE t1 (a, b) VALUES (12, "Another layer");
55 SELECT * FROM t1 WHERE a = 12 ORDER BY a;
56 DELETE FROM t1 WHERE a = 11;
57 SELECT COUNT(*) FROM t1;
58 SELECT b FROM t1 WHERE b LIKE "MySQL%";
59 DELETE FROM t1 ORDER BY b DESC;
60 DROP TABLE t1;
61