Debian Codegraph @

mysql-test/suite/json/inc/json_client.inc

raw
1
2 --echo # Verify that the client can show JSON data and metadata.
3
4 CREATE TABLE t(i INT, j1 JSON, j2 JSON NOT NULL) CHARSET utf8mb4;
5 SHOW CREATE TABLE t;
6 INSERT INTO t VALUES
7 (0, NULL, 'null'),
8 (1, '1', '1'),
9 (2, '[1,2,3]', '[4,5,6]'),
10 (3, '{"abc":"def"}', '{"a":"b","c":"d"}');
11
12 # Filter out unstable timing information for the query.
13 --replace_regex /\([0-9]+\.[0-9]+ sec\)/<FILTERED>/
14
15 # Execute the client. Enable printing of column metadata.
16 --exec $MYSQL -vvv --column-type-info test -e "SELECT j1, j2 FROM t ORDER BY i"
17
18 DROP TABLE t;