Setting max_statement_time per query has no effect
Bug #1376934 reported by
David Turner
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Vlad Lesin | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
Invalid
|
Undecided
|
Unassigned | ||
5.6 |
Fix Released
|
Medium
|
Vlad Lesin |
Bug Description
Cut and paste from developer:
> Do we have a good way of reporting bugs to Percona? I think I found some misbehavior.
>
> SET STATEMENT max_statement_
> seems to ignore the max_statement_time. Setting a max_statement_time at the session level works fine.
>
> http://
Related branches
lp:~vlad-lesin/percona-server/5.6-bug-1376934
- Laurynas Biveinis (community): Approve
-
Diff: 60 lines (+24/-2)3 files modifiedmysql-test/r/set_statement_and_max_statement_time.result (+7/-0)
mysql-test/t/set_statement_and_max_statement_time.test (+14/-0)
sql/sql_parse.cc (+3/-2)
tags: | added: i46411 |
tags: | added: set-statement |
tags: | added: max-statement-time |
summary: |
- per query variable statements failing + Setting max_statement_time per query has no effect |
To post a comment you must log in.
I am able to reproduce this problem. max_statement_time works as expected when set on session level or global level (in my.cnf) but fails to work correctly when set on query level with SET STATEMENT. I tested on on Percona Server 5.6.16/5.6.20
mysql [localhost] {msandbox} (world) > show global variables like '%version%'; ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ conversions | | 64.1-rel64. 1-log | compile_ machine | x86_64 | ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+
+------
| Variable_name | Value |
+------
| innodb_version | 5.6.16-rel64.1 |
| protocol_version | 10 |
| slave_type_
| version | 5.6.16-
| version_comment | Percona Server with XtraDB (GPL), Release rel64.1, Revision 563 |
| version_
| version_compile_os | Linux |
+------
mysql [localhost] {msandbox} (world) > show global variables like '%version%'; ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- + ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- + conversions | | compile_ machine | x86_64 | ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- +
+------
| Variable_name | Value |
+------
| innodb_version | 5.6.20-rel68.0 |
| protocol_version | 10 |
| slave_type_
| version | 5.6.20-68.0 |
| version_comment | Percona Server (GPL), Release 68.0, Revision 656 |
| version_
| version_compile_os | Linux |
+------
When set max_statement_time variable in my.cnf it works as expected as per below test results.
mysql [localhost] {msandbox} (world) > SELECT * FROM Country GROUP BY HeadOfState ORDER BY Continent;
ERROR 1882 (70101): Query execution was interrupted, max_statement_time exceeded
mysql [localhost] {msandbox} (world) > SELECT * FROM CountryLanguage GROUP BY IsOfficial ORDER BY Percentage DESC;
ERROR 1882 (70101): Query execution was interrupted, max_statement_time exceeded
Again, when one set on session level, it works correctly.
mysql [localhost] {msandbox} (world) > SET SESSION max_statement_ time=1;
Query OK, 0 rows affected (0.00 sec)
mysql [localhost] {msandbox} ((none)) > SHOW VARIABLES LIKE 'max_statement_ time'; ------- ------- +------ -+ ------- ------- +------ -+ ------- ------- +------ -+
+------
| Variable_name | Value |
+------
| max_statement_time | 1 |
+------
1 row i...