1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-17399 Add support for JSON_TABLE.

The specific table handler for the table functions was introduced,
and used to implement JSON_TABLE.
This commit is contained in:
Alexey Botchkov
2021-03-17 09:03:45 +04:00
parent a3099a3b4a
commit e9fd327ee3
40 changed files with 6001 additions and 43 deletions

View File

@ -3684,6 +3684,14 @@ open_and_process_table(THD *thd, TABLE_LIST *tables, uint *counter, uint flags,
error= TRUE;
goto end;
}
if (tables->table_function)
{
if (!create_table_for_function(thd, tables))
error= TRUE;
goto end;
}
DBUG_PRINT("tcache", ("opening table: '%s'.'%s' item: %p",
tables->db.str, tables->table_name.str, tables));
(*counter)++;
@ -6454,7 +6462,10 @@ find_field_in_tables(THD *thd, Item_ident *item,
db= name_buff;
}
if (last_table)
if (first_table && first_table->select_lex &&
first_table->select_lex->end_lateral_table)
last_table= first_table->select_lex->end_lateral_table;
else if (last_table)
last_table= last_table->next_name_resolution_table;
for (; cur_table != last_table ;