I found an error in the file raddb/mods-config/sql/main/mysql/queries.conf (fr 3.0.7) There is missing value for connectinfo_stop field in the SQL INSERT statement (after '%{Connect-Info}' in the line 380). This cause an error: rlm_sql_mysql: MySQL error 'Column count doesn't match value count at row 1' accounting { (...) type { (...) stop { (...) # # The update condition matched no existing sessions. Use # the values provided in the update to create a new session. # query = "\ INSERT INTO ${....acct_table2} \ (${...column_list}) \ VALUES \ ('%{Acct-Session-Id}', \ '%{Acct-Unique-Session-Id}', \ '%{SQL-User-Name}', \ '%{Realm}', \ '%{NAS-IP-Address}', \ '%{NAS-Port}', \ '%{NAS-Port-Type}', \ FROM_UNIXTIME(%{integer:Event-Timestamp} - \ %{%{Acct-Session-Time}:-0}), \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ '%{Acct-Session-Time}', \ '%{Acct-Authentic}', '', \ '%{Connect-Info}', \ <-missing value after this '%{%{Acct-Input-Gigawords}:-0}' << 32 | \ '%{%{Acct-Input-Octets}:-0}', \ '%{%{Acct-Output-Gigawords}:-0}' << 32 | \ '%{%{Acct-Output-Octets}:-0}', \ '%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ '%{Acct-Terminate-Cause}', \ '%{Service-Type}', \ '%{Framed-Protocol}', \ '%{Framed-IP-Address}')" } } } Just add next line with '', \ after '%{Connect-Info}', \ The similar error is duplicated in queries.conf template for the other database types (mssql, oracle, sqlite) except postgresql. Cheers, Pawel Bien
On Mar 20, 2015, at 8:18 AM, Pawel Bien <pawel.bien@euron.pl> wrote:
I found an error in the file raddb/mods-config/sql/main/mysql/queries.conf (fr 3.0.7) There is missing value for connectinfo_stop field in the SQL INSERT statement (after '%{Connect-Info}' in the line 380). This cause an error: rlm_sql_mysql: MySQL error 'Column count doesn't match value count at row 1'
I’ve pushed a fix, thanks. Alan DeKok.
Hi: 2015-03-22 6:29 GMT+08:00 Alan DeKok <aland@deployingradius.com>:
On Mar 20, 2015, at 8:18 AM, Pawel Bien <pawel.bien@euron.pl> wrote:
I found an error in the file raddb/mods-config/sql/main/mysql/queries.conf (fr 3.0.7) There is missing value for connectinfo_stop field in the SQL INSERT statement (after '%{Connect-Info}' in the line 380). This cause an error: rlm_sql_mysql: MySQL error 'Column count doesn't match value count at row 1'
I’ve pushed a fix, thanks.
Alan DeKok.
I am using fr 3.0.8 and I saw the fix is there. but I got "ERROR: rlm_sql_mysql: ERROR 1136 (Column count doesn't match value count at row 1". then I saw there are new commit at github which seems revert the fix. https://github.com/FreeRADIUS/freeradius-server/commit/9d15c91b21060f8c731da... I think I should use query.conf at github now with fr 3.0.8. is it correct? Regards, tbskyd
On Jun 2, 2015, at 2:52 AM, d tbsky <tbskyd@gmail.com> wrote:
I am using fr 3.0.8 and I saw the fix is there. but I got "ERROR: rlm_sql_mysql: ERROR 1136 (Column count doesn't match value count at row 1". then I saw there are new commit at github which seems revert the fix. https://github.com/FreeRADIUS/freeradius-server/commit/9d15c91b21060f8c731da... I think I should use query.conf at github now with fr 3.0.8. is it correct?
Yes, that should work. Alan DeKok.
participants (3)
-
Alan DeKok -
d tbsky -
Pawel Bien