"Chris Boget" <[EMAIL PROTECTED]> wrote: >> > What's going on with the MAX() function? Why did it return NULL >> > in the first query above. There were no adding/deleting data between >> > the above queries and yet MySQL didn't pull the MAX from the table >> > until I added the "AND assets IS NOT NULL" to the query. And yet >> > after I ran that query, attempting to run the first query yields the proper >> > results. >> > Is this a bug with MySQL? >> I wasn't able to repeat it on my test table. Could you provide a test case? > > Here is what our table looks like:
[skip] > SELECT MAX(assets) as assets FROM do_deductibles WHERE currency = 'usd' AND assets > IS NOT NULL; > SELECT MAX(assets) as assets FROM do_deductibles WHERE currency = 'usd'; > > > First SELECT query above returns NULL, the second returns the proper > value as does the third. Yup, I was able to repeat it, but this bug is related only to ISAM table. ISAM table is no longer supported. On MyISAM table MAX() works fine. mysql> SELECT MAX(assets) as assets FROM do_deductibles WHERE currency = 'usd'; +----------+ | assets | +----------+ | 10000000 | +----------+ 1 row in set (0.00 sec) -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]