| Bug #120638 | The value of Rows_examined is incorrect when there is a query involving a union of derived tables | ||
|---|---|---|---|
| Submitted: | 9 Jun 8:53 | Modified: | 10 Jun 6:43 |
| Reporter: | gang chen (OCA) | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 8.0.32 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[9 Jun 8:53]
gang chen
[10 Jun 6:43]
Øystein Grøvlen
Thank you, for your bug report. This is a duplicate of Bug#109034. The issue is not specific to derived tables with union, but can be observed for any derived table: mysql> SELECT SUM(num) as num FROM ( SELECT COUNT(1) num FROM test_Rows_examined ) a; +------+ | num | +------+ | 10 | +------+ 1 row in set (0.00 sec) mysql> select thread_id, digest_text, timer_wait/1000000000 "Time (ms)", rows_examined, rows_sent from performance_schema.events_statements_history order by timer_start desc limit 1\G *************************** 1. row *************************** thread_id: 69 digest_text: SELECT SUM ( `num` ) AS `num` FROM ( SELECT COUNT (?) `num` FROM `test_Rows_examined` ) `a` Time (ms): 0.8860 rows_examined: 1 rows_sent: 1 1 row in set (0.00 sec)
