Announcement

Announcement Module
Collapse
No announcement yet.

Enforce Limit=1 on all select queries

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Enforce Limit=1 on all select queries

    My business consists on allowing people to select from a mysql 5.6 innodb table, and I need that a specific user has a restrictions, all his queries against all tables, or one table (they only query one table) are automatically appended "limit=1". Is there a way to do that? If not, how do I kill the query if it takes more than a limit in time, like "1 sec".

  • #2
    If you want to modify the queries sent in then your best bet is the MySQL-Proxy.

    Comment


    • #3
      You can kill queries automatically with pt-kill from Percona Toolkit. We are also adding a query timeout feature to Percona Server for a future release. Otherwise, sorry, MySQL can't do that.

      Comment

      Working...
      X