1879
# Bug #17059925 : UNIONS COMPUTES ROWS_EXAMINED INCORRECTLY
1881
SET @old_slow_query_log= @@global.slow_query_log;
1882
SET @old_log_output= @@global.log_output;
1883
SET @old_long_query_time= @@long_query_time;
1884
SET GLOBAL log_output= "TABLE";
1885
SET GLOBAL slow_query_log= ON;
1886
SET SESSION long_query_time= 0;
1887
CREATE TABLE t17059925 (a INT);
1888
CREATE TABLE t2 (b INT);
1889
CREATE TABLE t3 (c INT);
1890
INSERT INTO t17059925 VALUES (1), (2), (3);
1891
INSERT INTO t2 VALUES (4), (5), (6);
1892
INSERT INTO t3 VALUES (7), (8), (9);
1893
TRUNCATE table mysql.slow_log;
1894
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3;
1905
SELECT sql_text, rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%t17059925%';
1906
sql_text rows_examined
1907
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3 18
1908
DROP TABLE t17059925, t2, t3;
1909
SET @@long_query_time= @old_long_query_time;
1910
SET @@global.log_output= @old_log_output;
1911
SET @@global.slow_query_log= @old_slow_query_log;
1879
1913
# lp:1010729: Unexpected syntax error from UNION
1880
1914
# (bug #54382) with single-table join nest