On 08/31/2011 06:34 PM, Black, Michael (IS) wrote:
Dooh....yes "we" missed that. But shouldn't new.rowid be undefined then rather than return -1? Much like old.rowid is undefined? That might have helped "us" in recognizing "our" mistake.
Fair enough. Sounded pompous. I say "we" because I only realized what was happening after trying to debug the script as if it were an SQLite bug in AFTER triggers.
The docs say The value of NEW.rowid is undefined in a BEFORE INSERT trigger in which the rowid is not explicitly set to an integer. http://www.sqlite.org/lang_createtrigger.html And...shouldn't "after" or "before" or "instead" be mandatory? The docs don't declare a default condition either.
I think it's an SQL thing. BEFORE is the default. SQLite docs don't say that though. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users