MDEV-7904: ANALYZE FORMAT=JSON doesn't print r_rows for union output

Print r_rows. There is no table tracking for reading from tmp table, yet.
This commit is contained in:
Sergei Petrunia 2015-04-04 00:47:10 +03:00
commit 47c344b00f
3 changed files with 91 additions and 0 deletions

View file

@ -134,3 +134,19 @@ select * from t1, t2 where (t2.key1 between t1.lb1 and t1.rb1) and
(t2.key3=t1.c1 OR t2.key4=t1.c2);
drop table t1,t2,t3,t4;
--echo #
--echo # MDEV-7904: ANALYZE FORMAT=JSON SELECT .. UNION SELECT doesn't print r_rows for union output
--echo #
create table t0 (a int);
INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int);
INSERT INTO t1 select * from t0;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
analyze format=json (select * from t1 A where a<5) union (select * from t1 B where a in (2,3));
drop table t0, t1;