Re: Table doesn't exist from stored function

2007-03-11 Thread Peter Brawley
Imre, You may have found a stored function bug--the server tries to evaluate the SELECT statement within the IF block when IF condition is false. PB - Shawn Green wrote: Hello Imre, Imre Palik wrote: Hi, When I try to run this function, I receive ERROR 1146 (42S02): Table 'gi2.meta'

Re: Table doesn't exist from stored function

2007-03-11 Thread Shawn Green
Hello Imre, Imre Palik wrote: Hi, When I try to run this function, I receive ERROR 1146 (42S02): Table 'gi2.meta' doesn't exist CREATE FUNCTION get_version() RETURNS INT UNSIGNED BEGIN DECLARE exist_ TINYINT; SELECT COUNT(*) INTO exist_ FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA =