Спасибо за ответ. Но не понял как им воспользоваться.
В базе данная процедура есть. Точь в точь такая же.
mysql> select name,body_utf8 from mysql.proc WHERE name LIKE "%check%";
+----------+----------------------------------------------------------------------------------------------------------------------------------+
| name | body_utf8 |
+----------+----------------------------------------------------------------------------------------------------------------------------------+
| radcheck | BEGIN
SELECT id,name,'Password' AS Attribute,AES_DECRYPT(passwd,'hardpass') AS Value,'=='
FROM users WHERE name=login;
END |
+----------+----------------------------------------------------------------------------------------------------------------------------------+
DROP PROCEDURE IF EXISTS `radcheck`;
DELIMITER $$
CREATE PROCEDURE `radcheck` (IN login VARCHAR(64))
BEGIN
SELECT id,name,'Password' AS Attribute,AES_DECRYPT(passwd,'hardpass') AS Value,'=='
FROM users WHERE name=login;
END$$
DELIMITER ;