Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.7(EOL), 10.8(EOL)
-
None
Description
I start mariadb --column-type-info test and run the following script:
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a JSON); |
INSERT INTO t1 VALUES ('{"a":"b"}'); |
SELECT a, JSON_COMPACT(a), COALESCE(a) FROM t1; |
The output is:
MariaDB [test]> SELECT a, JSON_COMPACT(a), COALESCE(a) FROM t1;
|
Field 1: `a`
|
Org_field: `a`
|
Catalog: `def`
|
Database: `test`
|
Table: `t1`
|
Org_table: `t1`
|
Type: BLOB (format=json)
|
Collation: utf8_general_ci (33)
|
Length: 4294967295
|
Max_length: 9
|
Decimals: 0
|
Flags: BLOB BINARY
|
|
Field 2: `JSON_COMPACT(a)`
|
Org_field: ``
|
Catalog: `def`
|
Database: ``
|
Table: ``
|
Org_table: ``
|
Type: LONG_BLOB (format=json)
|
Collation: utf8_general_ci (33)
|
Length: 4294967295
|
Max_length: 9
|
Decimals: 0
|
Flags: BINARY
|
|
Field 3: `COALESCE(a)`
|
Org_field: ``
|
Catalog: `def`
|
Database: ``
|
Table: ``
|
Org_table: ``
|
Type: LONG_BLOB
|
Collation: utf8_general_ci (33)
|
Length: 4294967295
|
Max_length: 9
|
Decimals: 39
|
Flags: BINARY
|
|
+-----------+-----------------+-------------+
|
| a | JSON_COMPACT(a) | COALESCE(a) |
|
+-----------+-----------------+-------------+
|
| {"a":"b"} | {"a":"b"} | {"a":"b"} |
|
+-----------+-----------------+-------------+
|
1 row in set (0.000 sec)
|
Notice, it prints format=json for the first and the second column, but it does not send format for the third column.
Attachments
Issue Links
- relates to
-
MDEV-27018 IF and COALESCE lose "json" property
- Closed
-
MDEV-27370 UNION looses JSON property
- Open