[CONJ-487] No timeout exception on query with sleep(50) and querytimeout(1) Created: 2017-06-02 Updated: 2017-06-04 Resolved: 2017-06-04 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | JDBC 4.2 compatibility |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | 1.6.1, 2.0.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | sfahren | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
10.2.6-MariaDB |
||
| Description |
|
I try to create a timeout exception with the current mariadb connector. the query runs all the 50 seconds and has a return value - see log information "has next" Is the handling from my side correct?
|
| Comments |
| Comment by Diego Dupin [ 2017-06-02 ] |
|
Your tests are corrects, but SLEEP has a specificity : see documentation : If SLEEP() is interrupted, it returns 1, not an exception. |
| Comment by Diego Dupin [ 2017-06-02 ] |
|
Sorry, i read text too quickly, it seems that PrepareStatement setReadonly doesn't take in account setTimeout ?! |
| Comment by sfahren [ 2017-06-02 ] |
|
Thank you for the fast answer. class java.sql.SQLTimeoutException | (conn:80) (conn:80) Query execution was interrupted (max_statement_time exceeded) What i also see was that the exception is only throw from Statement not from PreparedStatement.. (140MB table with 1.1 million entries, no indizies..) |