Reputation: 1108
I'm using MySQL 5.6. I have a specific query in my application that I don't want to be subject to the global innodb_lock_wait_timeout setting. Is there any way that I can specify that this specific query should wait a different amount of time for a lock before timing out?
Upvotes: 2
Views: 1192
Reputation: 34252
You can only set this variable on global or session level, so you cannot set it just for a single query. Obviously, you can create a separate connection, set this variable on session level, execute your query and then close the connection.
You can find how to set a 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
Upvotes: 1