Commit 502b7695 authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-17399 JSON_TABLE.

Aftermerge fixes.
parent 41e368f2
...@@ -585,7 +585,7 @@ select a from json_table('[[]]', '$' columns(a char(8) path '$' error on error)) ...@@ -585,7 +585,7 @@ select a from json_table('[[]]', '$' columns(a char(8) path '$' error on error))
ERROR HY000: Can't store an array or an object in the scalar column 'a' of JSON_TABLE 't'. ERROR HY000: Can't store an array or an object in the scalar column 'a' of JSON_TABLE 't'.
show warnings; show warnings;
Level Code Message Level Code Message
Error 4177 Can't store an array or an object in the scalar column 'a' of JSON_TABLE 't'. Error 4178 Can't store an array or an object in the scalar column 'a' of JSON_TABLE 't'.
# #
# MDEV-JSON_TABLE: CREATE TABLE ignores NULL ON ERROR (implicit or explicit) and fails. # MDEV-JSON_TABLE: CREATE TABLE ignores NULL ON ERROR (implicit or explicit) and fails.
# #
......
...@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 ...@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
#################################### ####################################
SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long; SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
event_name digest digest_text sql_text event_name digest digest_text sql_text
statement/sql/select 36b60eb4c0a269b4d8e3c2037f5c6c36 SELECT ? + ? + SELECT ... statement/sql/select 5169a25ba78dc5dc99487237f8459aa8 SELECT ? + ? + SELECT ...
statement/sql/truncate eddd22a5c210f96a5160acbb5d7563b3 TRUNCATE TABLE truncat... statement/sql/truncate 48bb01298bb30bda20be141838160182 TRUNCATE TABLE truncat...
...@@ -716,6 +716,7 @@ bool Create_json_table::add_json_table_fields(THD *thd, TABLE *table, ...@@ -716,6 +716,7 @@ bool Create_json_table::add_json_table_fields(THD *thd, TABLE *table,
uint fieldnr= 0; uint fieldnr= 0;
MEM_ROOT *mem_root_save= thd->mem_root; MEM_ROOT *mem_root_save= thd->mem_root;
List_iterator_fast<Json_table_column> jc_i(jt->m_columns); List_iterator_fast<Json_table_column> jc_i(jt->m_columns);
Column_derived_attributes da(NULL);
DBUG_ENTER("add_json_table_fields"); DBUG_ENTER("add_json_table_fields");
thd->mem_root= &table->mem_root; thd->mem_root= &table->mem_root;
...@@ -736,7 +737,7 @@ bool Create_json_table::add_json_table_fields(THD *thd, TABLE *table, ...@@ -736,7 +737,7 @@ bool Create_json_table::add_json_table_fields(THD *thd, TABLE *table,
sql_f->charset= &my_charset_utf8mb4_general_ci; sql_f->charset= &my_charset_utf8mb4_general_ci;
if (sql_f->prepare_stage1(thd, thd->mem_root, table->file, if (sql_f->prepare_stage1(thd, thd->mem_root, table->file,
table->file->ha_table_flags())) table->file->ha_table_flags(), &da))
goto err_exit; goto err_exit;
while ((jc2= it2++) != jc) while ((jc2= it2++) != jc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment