patch - support for stored procedures (MySQL 5.0.25 and later)
Nenad Kljajic
nenad.k at yubc.net
Fri Oct 20 15:10:30 CEST 2006
This patch adds support for stored procedures for
those who use MySQL 5.0.25+
(http://bugs.mysql.com/bug.php?id=15752)
eg. in sql.conf you can do:
authorize_check_query = "CALL Pradcheck('%{SQL-User-Name}');"
with procedure declaration:
SET AUTOCOMMIT=0;
DELIMITER |
DROP PROCEDURE IF EXISTS Pradcheck |
CREATE PROCEDURE Pradcheck (
`SQL-User-Name` varchar(256)
)BEGIN
START TRANSACTION;
SELECT id, UserName, Attribute, Value, op
FROM radcheck
WHERE Username = `SQL-User-Name`
ORDER BY id;
COMMIT;
END;
|
DELIMITER ;
etc.
Tested on FreeBSD 6.1 freeradius port 1.1.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-src::modules::rlm_sql::drivers::rlm_sql_mysql::sql_mysql.c
Type: text/x-csrc
Size: 923 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20061020/ea9489bc/attachment.c>
More information about the Freeradius-Devel
mailing list