Rows_examined can be reset for sub queries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
New
|
Undecided
|
Michael Widenius |
Bug Description
Rows_examined in the slow query log can be reset by the outer query when using a sub query. For these two queries the first one sets Rows_examined correctly but the second one has it reset even though the row stats work correctly.
# Time: 110702 9:44:23
# User@Host: [ebergen] @ localhost []
# Thread_id: 1 Schema: test QC_hit: No
# Query_time: 1.396374 Lock_time: 0.000093 Rows_sent: 1 Rows_examined: 677984
# Row_Stats: test:rows_
# Index_Stats: test:rows_
SET timestamp=
select count(*) from t2;
# Time: 110702 9:44:49
# User@Host: [ebergen] @ localhost []
# Thread_id: 1 Schema: test QC_hit: No
# Query_time: 2.262701 Lock_time: 0.000126 Rows_sent: 1 Rows_examined: 0
# Row_Stats: test:rows_
# Index_Stats: test:rows_
SET timestamp=
select count(*) from (select 1 from t2) as t;
The table I'm using looks like:
CREATE TABLE `t2` (
`t` bigint(20) DEFAULT NULL,
`u` bigint(20) DEFAULT NULL,
`b` text,
KEY `t` (`t`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Changed in maria: | |
assignee: | nobody → Michael Widenius (monty) |