Malformed error messages from db.mysql real_query fail encoding to json #19842
Labels
Bug
This tag is applied to issues which reports bugs.
Modules: JSON
Bugs/feature requests, that are related to `json` and `x.json2` modules.
Nicer V Errors
Bugs/feature requests, related to improving V error messages.
Describe the bug
Error messages are malformed, causing json.encode quiet failures
Outputs
Reproduction Steps
You would have to run the code above and receive error messages from db.mysql real_query.
Because of the nature of this bug, setting up mysql is needed for rull repro
Expected Behavior
json.encode encodes the error string correctly
Current Behavior
json.encode replaces error string with empty string
Possible Solution
db.mysql errors should escape characters correctly.
json.encode should throw a warning or something at runtime when a string is encoded to an empty string
Additional Information/Context
No response
V version
Current V version: V 0.4.2 e7cad4f, timestamp: 2023-11-11 01:10:34 +0300
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: