Details
Description
MariaDB [test]> select json_object('a', json_object('b', 'c')); |
+-----------------------------------------+ |
| json_object('a', json_object('b', 'c')) | |
+-----------------------------------------+ |
| {"a": {"b": "c"}} | |
+-----------------------------------------+ |
1 row in set (0.000 sec) |
|
MariaDB [test]> select json_object('a', if(1, json_object('b', 'c'), json_object('e', 'f'))); |
+-----------------------------------------------------------------------+ |
| json_object('a', if(1, json_object('b', 'c'), json_object('e', 'f'))) | |
+-----------------------------------------------------------------------+ |
| {"a": "{\"b\": \"c\"}"} | |
+-----------------------------------------------------------------------+ |
1 row in set (0.001 sec) |
|
MariaDB [test]> select json_object('a', coalesce(json_object('b', 'c'))); |
+---------------------------------------------------+ |
| json_object('a', coalesce(json_object('b', 'c'))) | |
+---------------------------------------------------+ |
| {"a": "{\"b\": \"c\"}"} | |
+---------------------------------------------------+ |
1 row in set (0.000 sec) |
other functions (CASE, NULLIF, IFNULL) are likely affected too.
Attachments
Issue Links
- blocks
-
MDEV-26506 Over-quoted JSON when combining JSON_ARRAYAGG with JSON_OBJECT
-
- Closed
-
- relates to
-
MDEV-27350 Complex CHECK constraint loses JSON property
-
- Open
-
-
MDEV-27358 Table level CHECK(JSON_VALID()) constraint loses JSON property
-
- Open
-
-
MDEV-27359 Crossed JSON_VALID constraint imposes JSON property to a wrong column
-
- Open
-
-
MDEV-27361 Hybrid functions with JSON arguments do not send format metadata
-
- Open
-
-
MDEV-27370 UNION looses JSON property
-
- Open
-
-
MDEV-13701 Nesting JSON
-
- Closed
-
-
MDEV-26506 Over-quoted JSON when combining JSON_ARRAYAGG with JSON_OBJECT
-
- Closed
-
-
MDEV-27360 Column level CHECK constraint is not SQL Standard compliant
-
- Open
-
-
MDEV-27533 The result of `CONVERT(json USING ...)` is erroneously treated as JSON
-
- Open
-
-
MDEV-27864 Alter table modify column for same data type copying table
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Priority | Major [ 3 ] | Critical [ 2 ] |
Link |
This issue relates to |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Workflow | MariaDB v3 [ 127273 ] | MariaDB v4 [ 144427 ] |
Link | This issue relates to MDEV-27350 [ MDEV-27350 ] |
Link | This issue relates to MDEV-27358 [ MDEV-27358 ] |
Link | This issue relates to MDEV-27359 [ MDEV-27359 ] |
Link | This issue relates to MDEV-27360 [ MDEV-27360 ] |
Link | This issue relates to MDEV-27361 [ MDEV-27361 ] |
Link | This issue relates to MDEV-27370 [ MDEV-27370 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Alexander Barkov [ bar ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Alexander Barkov [ bar ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Link |
This issue blocks |
Assignee | Alexander Barkov [ bar ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Alexander Barkov [ bar ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Link | This issue relates to MDEV-27533 [ MDEV-27533 ] |
Assignee | Alexander Barkov [ bar ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Alexander Barkov [ bar ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
issue.field.resolutiondate | 2022-01-21 17:13:10.0 | 2022-01-21 17:13:10.371 |
Fix Version/s | 10.5.14 [ 26809 ] | |
Fix Version/s | 10.6.6 [ 26811 ] | |
Fix Version/s | 10.7.2 [ 26813 ] | |
Fix Version/s | 10.8.1 [ 26815 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue relates to |
Comment |
[ This script:
{code:sql} SET profiling=1; SET profiling_history_size=1; CREATE OR REPLACE TABLE stat (state TEXT, types TEXT); CREATE OR REPLACE TABLE t1 (a TEXT); ALTER TABLE t1 MODIFY a JSON; INSERT INTO stat SELECT state, '1. TEXT to JSON' AS types FROM INFORMATION_SCHEMA.PROFILING WHERE state LIKE 'Copy to tmp table'; ALTER TABLE t1 MODIFY a JSON; INSERT INTO stat SELECT state, '2. JSON to JSON' AS types FROM INFORMATION_SCHEMA.PROFILING WHERE state LIKE 'Copy to tmp table'; ALTER TABLE t1 MODIFY a TEXT; INSERT INTO stat SELECT state, '3. JSON to TEXT' AS types FROM INFORMATION_SCHEMA.PROFILING WHERE state LIKE 'Copy to tmp table'; ALTER TABLE t1 MODIFY a TEXT; INSERT INTO stat SELECT state, '4. TEXT to TEXT' AS types FROM INFORMATION_SCHEMA.PROFILING WHERE state LIKE 'Copy to tmp table'; SELECT state, types FROM stat; {code} in 10.4.26 returns: {noformat} +-------------------+-----------------+ | state | types | +-------------------+-----------------+ | Copy to tmp table | 1. TEXT to JSON | | Copy to tmp table | 1. TEXT to JSON | | Copy to tmp table | 2. JSON to JSON | | Copy to tmp table | 2. JSON to JSON | | Copy to tmp table | 3. JSON to TEXT | | Copy to tmp table | 3. JSON to TEXT | +-------------------+----------------- {noformat} in 10.5.17 returns: {noformat} +-------------------+-----------------+ | state | types | +-------------------+-----------------+ | copy to tmp table | 1. TEXT to JSON | | copy to tmp table | 3. JSON to TEXT | +-------------------+-----------------+ {noformat} Temporary table JSON->JSON conversion: - is created in 10.4.26 - is not created in 10.5.17 ] |
Link |
This issue relates to |
Zendesk Related Tickets | 176096 |
It seems all string functions are affected including no-op functions like CONCAT(x) and LOWER(x)