FR with MySQL - Stored Procedures

cky thomas.martens at desy.de
Tue May 8 12:31:54 CEST 2007


Hello Gunther,

I've the same problems here. I use also a simple SP (just for testing) and I
run into the same problems, like you.
I've also patched the "sql_mysql.c" file and added the
CLIENT_MULTI_STATEMENTS flag.

After that, I get also the error 2014.
After that, I added to every function, a radlog(L_DBG,"THOMAS: Init
(sql_init_socket)"); (with the functionsnames), to see the order of the
calls.

This is the result:

radius_xlat:  'CALL test2 ('00e0.18e0.c19d')'
rlm_sql (sql): Reserving sql socket id: 1
THOMAS: Select_Query (sql_select_query)
THOMAS: Query (sql_query)
rlm_sql_mysql: query:  CALL test2 ('00e0.18e0.c19d')
THOMAS: Check_error (sql_check_error)
THOMAS: Store (sql_store_result)
THOMAS: Num_fields (sql_num_fields)
THOMAS: Fetch (sql_fetch_row)
THOMAS: Fetch (sql_fetch_row)
THOMAS: Check_error (sql_check_error)
THOMAS: Finish_Select (sql_finish_select_query)
THOMAS: Free (sql_free_results)
radius_xlat:  ''
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM ssg_reply WHERE
`id` = '1' ORDER BY id'
THOMAS: Select_Query (sql_select_query)
THOMAS: Query (sql_query)
rlm_sql_mysql: query:  SELECT id,UserName,Attribute,Value,op FROM ssg_reply
WHERE `id` = '1' ORDER BY id
THOMAS: Check_error (sql_check_error)
rlm_sql_mysql: MYSQL check_error: 2014 received
rlm_sql_getvpdata: database query error


I think, the problem is the double call of "sql_fetch_row", but I'm not
sure.
If I replace the SP with a normal SELECT-query, everything works fine (and
the sql_fetch_row function is also called twice).

The problem is, I need the SP, so I need a solution,fix,workaround,
whatever:)

My system:
 debian etch
 freeradius 1.1.3 (from deb), and also freeradius 1.1.6 from source
 mysql 5.0.32

Best regards, Thomas
-- 
View this message in context: http://www.nabble.com/FR-with-MySQL---Stored-Procedures-tf3701829.html#a10373403
Sent from the FreeRadius - User mailing list archive at Nabble.com.




More information about the Freeradius-Users mailing list