select max(column) returns 0 Hi,
I'm writing to a MySQL database (version 5.0.51b on solaris10 built
from source) using multiple Java threads and, after successfully
inserting a row in to a table, run "select max(rowid) from table" to
get the auto incr id (note, the program i'm using to insert does not
work with the last_insert_id() because when I get control back the
session that inserted the row is closed).
Anyway, for the most part, doing the "select max()" works but
sometimes zero is returned but that is clearly wrong. I'm wondering
if this is a known issue with MySQL, a bug in the code I'm using to do
the inserts,
or a layer 8 problem (user error). Any help would be greatly
appreciated.
Regards,
-MW |