stored procedure cursor mysql 5.1
Below cursor d开发者_如何学Goeclaration works with 5.0 but not with 5.1.
DECLARE CUR_GBLVAR CURSOR FOR SHOW GLOBAL VARIABLES;
You can accomplish this in MySQL 5.1 as follows:
DECLARE CUR_GBLVAR CURSOR FOR
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
ORDER BY VARIABLE_NAME;
Thanks for reply. I already got it from here: http://bugs.mysql.com/bug.php?id=49758
精彩评论