File: test_250_mysqld.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (61 lines) | stat: -rw-r--r-- 1,795 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# This test uses a configuration with
#  250 MySQL Servers
#  1 Management server
#  2 Data nodes
#
# Running this test requires a fairly large machine. It
# also uses quite a lot of ports for all the started processes
# and to avoid port conflicts the X plugin is disabled in order
# to allow using also those ports
#
# NOTE! Currently mtr.pl need to be started with --no-check-testcases
# which time-out otherwise, also the "shutdown step" step is taking
# long time so using --shutdown-timeout=0 and --no-warnings is
# recommended.
#
#  $> mtr.pl test_250_mysqld --no-check-testcases \
#       --shutdown-timeout=0 --no-warnings
#
# The test can also be used just for starting a cluster:
#  $1> mtr.pl ndb_big.test_250_mysqld --start
#
#  $2> mysql --defaults-file=bld/mysql-test/var/my.cnf
#
#
--source include/not_parallel.inc
--source include/have_ndb.inc

# Total number of nodes
SELECT COUNT(*) as Nodes_in_cluster FROM ndbinfo.processes;

# Total number of MySQL Servers
SELECT COUNT(*) as MySQL_Servers FROM ndbinfo.processes
  WHERE process_name = 'mysqld';

#
# The very basic test
# - showing table can be created in the storage engine NDB
# - read and write the table
#
CREATE TABLE t1 (
  a int PRIMARY KEY,
  b varchar(255)
) ENGINE = NDB;

INSERT INTO t1 VALUES (1, "MySQL Server with NDB");
INSERT INTO t1 (a, b) VALUES (11, "Barrier effect");
INSERT INTO t1 (a, b) VALUES
  (12, "The third row"),
  (37, "And of course number 37");
SELECT * FROM t1 WHERE a = 1;
UPDATE t1 SET b = CONCAT(b, " test") WHERE a = 1;
SELECT * FROM t1 WHERE a = 1;
REPLACE t1 (a, b) VALUES (12, "Another layer");
SELECT * FROM t1 WHERE a = 12 ORDER BY a;
DELETE FROM t1 WHERE a = 11;
SELECT COUNT(*) FROM t1;
SELECT b FROM t1 WHERE b LIKE "MySQL%";
DELETE FROM t1 ORDER BY b DESC;
DROP TABLE t1;