Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stored Procedure getting error #3

Closed
mjafartp opened this issue Dec 17, 2018 · 3 comments
Closed

Stored Procedure getting error #3

mjafartp opened this issue Dec 17, 2018 · 3 comments

Comments

@mjafartp
Copy link

when calling a Stored Procedure it returning an error : " PROCEDURE dble.ItemGroupViewAll can't return a result set in the given context"

@adamlofts
Copy link
Owner

Can you provide a small test case to reproduce?

@kvacquier
Copy link

same here.

To reproduce
Store a procedure like this :

DELIMITER ;;
CREATE DEFINER=root@% PROCEDURE find_user_near(min_lat DOUBLE, max_lat DOUBLE, min_long DOUBLE, max_long DOUBLE)
BEGIN
SELECT users.userID FROM users
WHERE
users.lat BETWEEN min_lat AND max_lat
AND users.long BETWEEN min_long AND max_long
ORDER BY RAND()
LIMIT 0, 50;
END;;
DELIMITER ;

(table with userID, lat and long of course) and call : connection.query("find_user_near(0, 1000, 0, 1000)")

@adamlofts
Copy link
Owner

Did this fix your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants