Commit 86351f5e authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-32351: Significant slowdown with outer joins: fix embedded.

For some reason, in embedded server, a command

let $a=`$query`

ignores local context. Make a workaround: use SET STATEMENT to set
debug_dbug in the same statement.
parent 1cd8a5ef
......@@ -24,8 +24,7 @@ select
t1.b as t1_b, t2.b as t2_b, t2.d as t2_d
FROM t1
LEFT JOIN t2 ON t1.b = t2.b;
SET @old_debug=@@debug_dbug;
SET debug_dbug='+d,analyze_print_r_unpack_ops';
SET statement debug_dbug='+d,analyze_print_r_unpack_ops' for
analyze
format=json
SELECT COUNT(*)
......
......@@ -20,10 +20,9 @@ select
FROM t1
LEFT JOIN t2 ON t1.b = t2.b;
SET @old_debug=@@debug_dbug;
SET debug_dbug='+d,analyze_print_r_unpack_ops';
let $q= analyze
let $q=
SET statement debug_dbug='+d,analyze_print_r_unpack_ops' for
analyze
format=json
SELECT COUNT(*)
FROM t1_t2
......
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