Replies: 1 comment 1 reply
-
Sequel only sets the variable to work around a MySQL bug that will make the IS NULL operator operate incorrectly (returning a row where the column is not NULL). Disabling the issue should not alter Sequel's behavior. Looks like recent MySQL versions default the setting to off anyway. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the AWS RDS Proxy, which can reuse connections across applications. It obviously won't re-use a connection in the middle of a transaction. It also won't reuse a connection after the client has issued a SET query, since that variable may not be available in other connections.
By default, Sequel is issuing two SET queries when I connect to a MySQL database:
SET @@wait_timeout = 2147483
SET SQL_AUTO_IS_NULL=0
Ideally I could suppress these queries so that my connections can be properly reused. The first one can be safely suppressed by providing
:timeout => nil
when connecting. Using the default timeout (8 hours) is fine.The second can be suppressed with
:auto_is_null => true
. This re-enables thewhere id is null
behavior. I don't use that anywhere in my code. Will this functionality alter the behavior of Sequel anywhere?Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions