[MDEV-32266] All queries in stored procedures increment empty_queries counter Created: 2023-09-27 Updated: 2023-10-03 Resolved: 2023-10-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Affects Version/s: | 10.11.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Steve Shaw | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 20.04 |
||
| Description |
|
In user statistics empty_queries is described as follows: https://mariadb.com/kb/en/information-schema-user_statistics-table/ In a test case, the stored procedure is executing the queries correctly and returning the expected rows, however using SELECT INTO means empty_queries is incremented as data is not returned to the client.
Fix could be a better description in the documentation explaining that the counter is incremented if data is not returned rather than an empty query sent. |
| Comments |
| Comment by Sergei Golubchik [ 2023-09-30 ] |
|
steve.shaw@intel.com is right. The server has two status variables: Com_empty_query and Empty_queries. The first is
while the second is
INFORMATION_SCHEMA.USER_STATISTICS.EMPTY_QUERIES aggregates per user the value of the second variable, not the first. |