On Tuesday, February 9, 2016 at 10:59:13 AM UTC-8, Brian Lam wrote: > > Hi Jeremy, > > I am currently seeing that there is a query executed: SELECT NULL FROM > "SYSIBM"."SYSDUMMY1" before every select, insert, and also on loading of my > models. > > What is the reason for this query, and is there a reason why it is select > NULL? It is currently causing a -206 error from DB2, as NULL seems to be an > undefined column. >
I'm guessing you are using the connection_validator extension, and have it set to validate the connection on every checkout (http://sequel.jeremyevans.net/rdoc-plugins/files/lib/sequel/extensions/connection_validator_rb.html) That SQL does work for me in my test environment using DB2 on Linux with version 9070400 (according to SYSIBM.SYSVERSIONS). What is your environment? > Is there a parameter I can pass to change NULL to something else, like ''? > def DB.valid_connection_sql "your SQL here" end Any query that will not result in an exception being raised when executed should work. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
