Skip to content

SELECT_FOR_UPDATE does not incrementing #1798

Open
@theTibi

Description

@theTibi

Hi,

When I am running Select ... for update queries ProxySQL does not increase the counter in stats_mysql_commands_counters table.

Easy to reproduce, check counters:

mysql> select Command,Total_cnt from stats_mysql_commands_counters where Command like '%select%';
+-------------------+-----------+
| Command           | Total_cnt |
+-------------------+-----------+
| SELECT            | 12        |
| SELECT_FOR_UPDATE | 0         |
+-------------------+-----------+
2 rows in set (0.00 sec)

Run the following query:

select * from sbtest1 where id<10 for update;

Then check the counters again:

mysql> select Command,Total_cnt from stats_mysql_commands_counters where Command like '%select%';
+-------------------+-----------+
| Command           | Total_cnt |
+-------------------+-----------+
| SELECT            | 13        |
| SELECT_FOR_UPDATE | 0         |
+-------------------+-----------+
2 rows in set (0.00 sec)

As you can see the Select counter was increased instead of SELECT_FOR_UPDATE.

I tested it on multiple versions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions