SQL statements for CUI with sqlite

Arran Cudbard-Bell a.cudbardb at freeradius.org
Tue Feb 4 19:17:23 CET 2014


On 4 Feb 2014, at 06:46, Stefan Winter <stefan.winter at restena.lu> wrote:

> Hi,
> 
>>> This breaks (gracefully) for me, and I'm told it's a syntax error. This
>>> page here:
>> 
>> Thanks, fixed.
> 
> Well... after doing this on my machine, I noticed more errors with 
> sqlite:
> 
> rlm_sql (cuisql): Executing query: 'INSERT OR IGNORE INTO cui (clientipaddress, callingstationid, username, cui, lastaccounting) VALUES ('127.0.0.1', '02-00-00-00-00-01', 'availability-test at education.lu', 'ad40aca101096cde0ce27b387939e4c76d8234ca', NULL) ON DUPLICATE KEY UPDATE lastaccounting='0000-00-00 00:00:00', cui='ad40aca101096cde0ce27b387939e4c76d8234ca''
> rlm_sql (cuisql): Database query error: near "ON": syntax error
> (16) cuisql : No additional queries configured
> 
> Looking at the same page - the entire "ON DUPLICATE KEY UPDATE"
> doesn't work in sqlite at all? This would look like an overhaul
> of that statement is needed.

INSERT OR REPLACE

I already had the fix in master.

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140204/b0594f79/attachment.pgp>


More information about the Freeradius-Users mailing list