[MDEV-11139] Feature_window_functions counts queries, not functions Created: 2016-10-25  Updated: 2016-10-26

Status: Open
Project: MariaDB Server
Component/s: Optimizer - Window functions
Affects Version/s: 10.2
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Vicențiu Ciorbaru
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-9892 Window functions: add a counter Closed
relates to MDEV-9896 Testing for window functions Open

 Description   

ariaDB [test]> show status like 'Feature_window_functions';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| Feature_window_functions | 0     |
+--------------------------+-------+
1 row in set (0.00 sec)
 
MariaDB [test]> select rank() over (order by a), row_number() over (partition by b) from t1;
Empty set (0.00 sec)
 
MariaDB [test]> show status like 'Feature_window_functions';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| Feature_window_functions | 1     |
+--------------------------+-------+
1 row in set (0.00 sec)

For example, in a similar situation Feature_subquery counts actual subqueries:

MariaDB [test]> show status like 'Feature_subquery';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| Feature_subquery | 0     |
+------------------+-------+
1 row in set (0.00 sec)
 
MariaDB [test]> select (select 1), (select 2);
+------------+------------+
| (select 1) | (select 2) |
+------------+------------+
|          1 |          2 |
+------------+------------+
1 row in set (0.00 sec)



 Comments   
Comment by Vicențiu Ciorbaru [ 2016-10-26 ]

Hi elenst!

We didn't really care too much about the exact accuracy of the counter. Our goal was to get a rough number of entries used. We can make it more consistent with the other counters.

Setting this as a backburner.

Generated at Thu Feb 08 07:47:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.