Hello, I'm running freeradius 3.0.12 on Debian Stretch amd64 + mysql 5.6 I'm trying to execute multiple queries at post-auth with a configuration like this: query= "statement 1; statement 2; statement 3" With this configuration active I often (not always) get this MySQL error: sql_time: ERROR: rlm_sql_mysql: ERROR 2014 (Commands out of sync; you can't run this command now): HY000 The error does't appear if I just execute two statements. The statements execute insert and updates Thanks in advance Gianluca
On Feb 14, 2018, at 12:00 PM, Gianluca Laudano <laudanog@vdagroup.com> wrote:
Hello, I'm running freeradius 3.0.12 on Debian Stretch amd64 + mysql 5.6
I'm trying to execute multiple queries at post-auth with a configuration like this:
query= "statement 1; statement 2; statement 3"
That doesn't really work. If you want multiple things updated, write a stored procedure. Alan DeKok.
On Feb 14, 2018, at 5:14 PM, Alan DeKok <aland@deployingradius.com> wrote:
On Feb 14, 2018, at 12:00 PM, Gianluca Laudano <laudanog@vdagroup.com> wrote:
Hello, I'm running freeradius 3.0.12 on Debian Stretch amd64 + mysql 5.6
I'm trying to execute multiple queries at post-auth with a configuration like this:
query= "statement 1; statement 2; statement 3"
That doesn't really work. If you want multiple things updated, write a stored procedure.
Yeah... weird. We don't do anything to prevent that, we just pass the query string through to MySQL. You might need to wrap the whole lot in a transaction? Or as Alan says use a stored procedure. -Arran
On Feb 15, 2018, at 4:43 AM, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
Yeah... weird. We don't do anything to prevent that, we just pass the query string through to MySQL.
Yup. IIRC, MySQL requires special magic to get multiple queries in one statement like that. Alan DeKok.
I'm testing stored procedure; seems to work as expected. Thanks a lot Gianluca Il 15/02/2018 13:55, Alan DeKok ha scritto:
On Feb 15, 2018, at 4:43 AM, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
Yeah... weird. We don't do anything to prevent that, we just pass the query string through to MySQL. Yup. IIRC, MySQL requires special magic to get multiple queries in one statement like that.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html -- Questo messaggio e' stato analizzato ed e' risultato non infetto. This message was scanned and is believed to be clean.
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
Gianluca Laudano