Strongly suspect MySQL client bug here. This is partially user triggered though. By sticking a crapload of whitespace in front of your INSERT query, you're messing up the query prefix detection, so the server is treating it as a select query instead of an insert query. "Executing select query: INSERT " I can fix that at least, and have the xlat function trim the whitespace for prefix detection. As for the rest... I guess mysql_store_result is behaving weirdly when you try and get the result of an insert. I've changed the way the result from mysql_result_next is used. Could you pull v3.0.x and see if it's any better? -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2