database locking - MySQL Specify innodb_lock_wait_timeout for a specific query -


i'm using mysql 5.6. have specific query in application don't want subject global innodb_lock_wait_timeout setting. there way can specify specific query should wait different amount of time lock before timing out?

you can set variable on global or session level, cannot set single query. obviously, can create separate connection, set variable on session level, execute query , close connection.

you can find how set system variable on session level in mysql documentation on set command:

set variable_assignment [, variable_assignment] ...

variable_assignment: user_var_name = expr | [global | session] system_var_name = expr | [@@global. | @@session. | @@]system_var_name = expr


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -