mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
JSON_TABLE is marked as a special "*any_db*" table. Because this special marking is processed all the way though to get_column_grant where its processed like its in database called "*any_db*". As this doesn't exist, only those users with global privileges can create views on a JSON_TABLE. Under a Prepared Statement protocol a Create_tmp_table is used for the JSON_TABLE, but it gets assigned an "" database name. We correct this to give it "*any_db*" like the SQL parser indicating that no database is needed. To commonly correct the fill_effective_table_privileges by looking explictly for the "*any_db*", those tables that have this as the database name get SELECT privileges. While correcting the database for the JSON_TABLE, lets give it a "json_table" name rather than "(temporary)" for greater clarity in warning messages.
33 KiB
33 KiB