rust-mysql-simple icon indicating copy to clipboard operation
rust-mysql-simple copied to clipboard

support statement query timeout

Open ysn2233 opened this issue 3 years ago • 1 comments

JDBC implementation: schedule a timer thread to send "KILL QUERY" command to mysql server when the statement executed over a timeout

ysn2233 avatar Jul 07 '22 06:07 ysn2233

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>.

rusher avatar Mar 19 '24 15:03 rusher