Bug #112854 | The relationship between length and string type is not consistent in response | ||
---|---|---|---|
Submitted: | 27 Oct 2023 9:36 | Modified: | 30 Oct 2023 6:23 |
Reporter: | Yang Keao | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: JSON | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[27 Oct 2023 9:36]
Yang Keao
[27 Oct 2023 10:43]
MySQL Verification Team
Hi Mr. Keao, Thank you for your bug report. You are reporting a bug in the lengths of various strings, but you are using only JSON type. That is a totally separate case. To prove your point, declare a table with the three types that you are reporting and try to prove that our documentation is wrong. Not a bug.
[30 Oct 2023 6:23]
Yang Keao
> You are reporting a bug in the lengths of various strings, but you are using only JSON type. That is a totally separate case. The direct string type works fine. My point is that both of the following expressions are **string**, right? 1. `IFNULL(JSON_EXTRACT('"abc"', '$'), '0')` 2. `json_unquote(json_extract('"abc"', '$'))` However, they have different type in the return value: one is `VAR_STRING` and the other is `LONG_BLOB` (as shown in the original comment). I hope them to have consistent types.
[30 Oct 2023 12:21]
MySQL Verification Team
Hi, Actually, the result is correct. Those two statements return the data types according to the expression. One resolves as the string of the variable length, while the other can not resolve as a string, hence it returns a BLOB.