Debian Codegraph @

mysql-test/suite/json/r/array_index_debug.result

raw
1 #
2 # Bug#30292605: ASSERTION WHEN READING A HIDDEN ARRAY COLUMN
3 # Bug#30302208: ASSERTION FAILURE WITH CREATE TABLE AS SELECT AND
4 # SHOW_HIDDEN_COLUMNS
5 #
6 CREATE TABLE t(j JSON, KEY k ((CAST(j->'$[*]' AS SIGNED ARRAY))));
7 INSERT INTO t VALUES ('[1,2,3]');
8 SET debug = '+d,show_hidden_columns';
9 SELECT * FROM t;
10 j !hidden!k!0!0
11 [1, 2, 3] [1, 2, 3]
12 CREATE TABLE t_copy AS SELECT * FROM t;
13 ERROR 42000: This version of MySQL doesn't yet support 'Creating tables with array columns.'
14 SET debug = '-d,show_hidden_columns';
15 DROP TABLE t;
16 #
17 # Bug#30263373: INCORRECT OUTPUT FROM TABLE_FUNCTION_JSON::PRINT()
18 #
19 CREATE TABLE t(j JSON,
20 KEY k1 ((CAST(j->'$.a[*]' AS DATETIME(3) ARRAY))),
21 KEY k2 ((CAST(j->'$.b[*]' AS UNSIGNED INT ARRAY))));
22 SET debug = '+d,show_hidden_columns';
23 SHOW CREATE TABLE t;
24 Table Create Table
25 t CREATE TABLE `t` (
26 `j` json DEFAULT NULL,
27 `!hidden!k1!0!0` datetime(3) array GENERATED ALWAYS AS (cast(json_extract(`j`,_utf8mb4'$.a[*]') as datetime(3) array)) VIRTUAL,
28 `!hidden!k2!0!0` bigint unsigned array GENERATED ALWAYS AS (cast(json_extract(`j`,_utf8mb4'$.b[*]') as unsigned array)) VIRTUAL,
29 KEY `k1` ((cast(json_extract(`j`,_utf8mb4'$.a[*]') as datetime(3) array))),
30 KEY `k2` ((cast(json_extract(`j`,_utf8mb4'$.b[*]') as unsigned array)))
31 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
32 SET debug = '-d,show_hidden_columns';
33 DROP TABLE t;