Below cursor declaration works with 5.0 but not with 5.1.
DECLARE CUR_GBLVAR CURSOR FOR SHOW GLOBAL VARIABLES;
Below cursor declaration 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