Debian Codegraph @

mysql-test/suite/json_ndb/r/json_client_ndb.result

raw
1 set default_storage_engine=ndb;
2 # Verify that the client can show JSON data and metadata.
3 CREATE TABLE t(i INT, j1 JSON, j2 JSON NOT NULL) CHARSET utf8mb4;
4 Warnings:
5 Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
6 SHOW CREATE TABLE t;
7 Table Create Table
8 t CREATE TABLE `t` (
9 `i` int DEFAULT NULL,
10 `j1` json DEFAULT NULL,
11 `j2` json NOT NULL
12 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
13 INSERT INTO t VALUES
14 (0, NULL, 'null'),
15 (1, '1', '1'),
16 (2, '[1,2,3]', '[4,5,6]'),
17 (3, '{"abc":"def"}', '{"a":"b","c":"d"}');
18 --------------
19 SELECT j1, j2 FROM t ORDER BY i
20 --------------
21
22 Field 1: `j1`
23 Catalog: `def`
24 Database: `test`
25 Table: `t`
26 Org_table: `t`
27 Type: JSON
28 Collation: binary (63)
29 Length: 4294967295
30 Max_length: 14
31 Decimals: 0
32 Flags: BLOB BINARY
33
34 Field 2: `j2`
35 Catalog: `def`
36 Database: `test`
37 Table: `t`
38 Org_table: `t`
39 Type: JSON
40 Collation: binary (63)
41 Length: 4294967295
42 Max_length: 20
43 Decimals: 0
44 Flags: NOT_NULL BLOB BINARY NO_DEFAULT_VALUE
45
46
47 +----------------+----------------------+
48 | j1 | j2 |
49 +----------------+----------------------+
50 | NULL | null |
51 | 1 | 1 |
52 | [1, 2, 3] | [4, 5, 6] |
53 | {"abc": "def"} | {"a": "b", "c": "d"} |
54 +----------------+----------------------+
55 4 rows in set <FILTERED>
56
57 Bye
58 DROP TABLE t;