I ran into an odd issue on a project I updated awhile ago. I updated an existing sql statement to include IFNULL for an exclusion check. It worked fine on my dev machine, but caused an issue on the production machine.
The version of MySQL on my dev machine was a little bit newer than production so the issue never came up. Here is the error the sql server returned:
#1305 - FUNCTION [DATABASE_NAME].ifnull does not exist
Here is a little bit of the sql that caused the error:
AND IFNULL ( `tbl_category_admin`.`admin_key_id` =5, true )
The problem was caused by the space between IFNULL and (. Changing it to IFNULL( solved the problem. If you run into an issue where MySQL returns an error saying a given function does not exist look for spaces between the function and the "(".
That just happened to me. Thanks to you and Google, I was able to fix it in 5 minutes...
ReplyDeleteJan
Just encountered this exact same issue. Thanks for sharing.
ReplyDeleteThank you very much. I have also had this problem with the CONCAT function. Deleting those spaces between 'CONCAT' and '(' worked for me as well.
ReplyDeleteThanks.
ReplyDelete'look for spaces between the function and the "(" ' - this solved the problem for me also.
This worked for me ..
Deletethanks man !! thats one of these things that you can spend a whole night stucking your head on the table ;-) you just saved my precious time..
ReplyDeleteTHX mate ! 5 seconds of searching, and i though something is wrong with my pythons library ^^
ReplyDeleteThank you.
ReplyDeleteHappend to my with version '5.0.77-log' (production server)
but not with '5.1.37-1ubuntu5.4' (development server)
Thanks buddy, you saved my time.
ReplyDeleteThank you very much!
ReplyDeleteTrain's is not stopping. Same problem.
ReplyDeleteI was about to reinstall whole MySQL :D
Thank you!
oh wow, you just saved me endless frustration.
ReplyDeleteHad it on the dev->production move aswell
Thank you so much, i was ready to kill myself but then i found your blog.
ReplyDeleteselect newtime(if(new_event.newtime>160000, 2 , if(new_event.newtime>80000, 1, 0))) from new_event;
ReplyDeletethe above code is giving me the 1305 error code. can u help me
@anonymous the probably there is that function doesn't exist at all. Here is the page with all the time functions for mysql
ReplyDeletehttp://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
After about 60 minutes of trying to figure out what the hel.. was going on...
ReplyDeleteGood lookin out...
Thank you so much!!
ReplyDeleteYou can't imagine how thankfull I am!
ReplyDeleteHail to you!
thanks a ton man !! you saved my another day, have no words to thank you more :)
ReplyDeleteOooh thank you! You saved me time and hair :)
ReplyDeleteThank you!
ReplyDeleteThank you
ReplyDeleteSame here. Thanks.
ReplyDeleteDanke! ;-)
ReplyDeleteThanks so much! Without this page I'd never have found it!
ReplyDeleteawesome man !! you are saviour :)
ReplyDeleteYou sir are true hero. Thank you.
ReplyDeleteEres un genio, gracias por la ayuda !!!!
ReplyDeleteMuito obrigado, já tinha gasto uma hora a procura da solução!
ReplyDeleteThank you
finally after a few hours googled..thanks so much..
ReplyDeleteyes, thank you!
ReplyDeleteAlso, check on syntax error guys. I was doing a concatenation of multiple substr and reason for error was that one of the substr was written wrongly as "subtr"
ReplyDelete