Commit bae9fb59 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-24909 JSON functions don't respect KILL QUERY / max_statement_time limit

preallocate the string in json_nice()
to avoid reallocs on every 1-character append()
parent 3add51b7
......@@ -139,6 +139,8 @@ static int json_nice(json_engine_t *je, String *nice_js,
nice_js->length(0);
nice_js->set_charset(je->s.cs);
nice_js->alloc(je->s.str_end - je->s.c_str + 32);
DBUG_ASSERT(mode != Item_func_json_format::DETAILED ||
(tab_size >= 0 && tab_size <= TAB_SIZE_LIMIT));
......
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