I'm migrating my webapp from local to DigitalOcean, and I'm having a problem using a routine I've created. It works fine locally(version 5.5.50) but on the online MySQL(version 5.7.13) it gives me the following error:
#1582 – Incorrect parameter count in the call to native function 'DISTANCE'
even tho the call is right.
I have deleted the function and it still gives me the same error, therefore I think it's not even being able to find my function.
I've tried to grant all privileges to my user and it's still not working.
Best Answer
The problem is that there was a native function
distance()
added in MySQL 5.7.5, which takes 2 arguments:It will be removed in a later release, but unfortunately you would need to rename your function. Had you not dropped it, you could have changed the function call in the app to include the schema:
[source]