mariadb/mysql-test/suite/json
Rucha Deodhar 85567aba45 MDEV-34081: View containing JSON_TABLE does not return JSON
Analysis:
While writing the view to .FRM file, we check the datatype of each column
and append the appropriate type to the string (which will be written to
the frm). This is where the conversion from JSON to longtext happens because
that is how it is stored internally.
Now, while SELECT, when the frm is read it has longtext instead of JSON
which also results in changing the handler type. Since the handler types
dont match, m_format_json becomes false for that specific column.
Now, when filling the values, since the format is not json, it does not
get added in the result. Hence the output is NULL.

Fix:
Before writing the view to the FRM file, check if the datatype for the
column is JSON (which means the m_format_json will be true). If it is JSON
append JSON.
2025-10-22 22:49:26 +05:30
..
r MDEV-34081: View containing JSON_TABLE does not return JSON 2025-10-22 22:49:26 +05:30
t MDEV-34081: View containing JSON_TABLE does not return JSON 2025-10-22 22:49:26 +05:30