Setting a session option (e.g. sql-mode)

1 view
Skip to first unread message

DracoBlue

unread,
Mar 21, 2010, 9:55:14 AM3/21/10
to dbslayer
Hello,

I am using dbslayer for a while now and am happy with that ;).

Today I noticed, that my sql server runs with default sql-mode, which
assumes all \n to be stored as new line. Setting the sql-mode-option
to no backslash escapes [1] will fix that issue. Setting this
serverwide is no option, though.

Now I tried to set the sql-mode variable in the dbslayer.conf, but it
seems to be ignored.

At the moment I try to workaround the issue by calling:
http://127.0.0.1:12345/db?%7B%22SQL%22%3A%22SET%20%40%40sql_mode%3D%5C"NO_BACKSLASH_ESCAPES%5C"%22%7D
right after the server started, but I guess that dbslayer pools has
multiple connections.

So my question is: How can I set such option like sql-mode for one
dbslayer-server?

[1] http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_no_backslash_escapes

Kind regards,
Jan

Derek Gottfrid

unread,
Mar 22, 2010, 8:45:52 AM3/22/10
to dbsl...@googlegroups.com
Interesting. Setting the var in the conf should work.  The conf is passed right into the mysql client libs that the standard mysqli tool uses - hmmm.  We should check it out - what version of  mysql client lib are you compiled against? 

You are correct with connection pooling it would be difficult to ensure all the connections had that setting turned on. 

d



--
You received this message because you are subscribed to the Google Groups "dbslayer" group.
To post to this group, send email to dbsl...@googlegroups.com.
To unsubscribe from this group, send email to dbslayer+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dbslayer?hl=en.


Reply all
Reply to author
Forward
0 new messages