Open ysn2233 opened 2 years ago
You can either set a global query timeout for your connection using set @@max_statement_time=XX
(be carefull, value for MariaDB are in seconds, and MySQL in milliseconds)
if you are using MariaDB, you can set that per command, prefixing commands with SET STATEMENT max_statement_time=XX FOR <command>
.
JDBC implementation: schedule a timer thread to send "KILL QUERY" command to mysql server when the statement executed over a timeout