Bug #9629 | Triggers: auto_increment column value not available during action | ||
---|---|---|---|
Submitted: | 5 Apr 2005 0:43 | Modified: | 28 Apr 2005 1:04 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.4-beta-debug | OS: | Linux (SUSE 9.2) |
Assigned to: | CPU Architecture: | Any |
[5 Apr 2005 0:43]
Peter Gulutzan
[8 Apr 2005 14:53]
Michael Widenius
I would say this is an documentation issue (for now) In MySQL, any integer, not null column has a 'implicite' default value of 0 (if now default value is set). This is what you should see in the BEFORE trigger for the auto_increment column. (It's quite hard to do anything else in the current MySQL version) The same is true for any other number column (without a default value) For us to fix the NULL problem, please try to find a way to repeat it (I can't see any way this could happen as an AUTO_INCREMENT column should always be defined as NOT NULL and should thus never be able to generate a NULL value)
[28 Apr 2005 1:04]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant product(s).