Bug #695 | ambiguous definition of timestamp field status | ||
---|---|---|---|
Submitted: | 21 Jun 2003 23:08 | Modified: | 14 Jul 2003 1:17 |
Reporter: | paladin | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 3.23.49 | OS: | Windows (windows) |
Assigned to: | Jani Tolonen | CPU Architecture: | Any |
[21 Jun 2003 23:08]
paladin
[12 Jul 2003 9:51]
Paul DuBois
This isn't really a bug. A similar thing happens if you create an AUTO_INCREMENT column. (That is, SHOW COLUMNS will show the Default value as NULL, even though the column cannot actually contain NULL.) The meaning is that to get the default value for a TIMESTAMP or AUTO_INCREMENT column, you assign NULL to it, and MySQL sets the column value automatically. In any case, how could SHOW COLUMNS display a different Default value for such columns? The default is not the same for every row; there is no other value that it makes sense for SHOW COLUMNS to display.
[12 Jul 2003 11:23]
paladin
thankyou, Paul. I agree with your logic, but nevertheless am stuck with trying to find a way around this in Delphi. Is it possible to modify what the fetch call returns without recompiling all the sources? tia!
[14 Jul 2003 1:17]
Sergei Golubchik
Unfortunately not. And we cannot change it in the next release either - it will create HUGE problems for ODBC users. E.g. one no longer will be able to make TIMESTAMP a part of PRIMARY or UNIQUE key. NOT_NULL_FLAG only means that one doesn't have to expect to *get* NULL from this column. The fact that dbExpress doesn't allow to *store* NULL there should be considered a dbExpress bug - you can submit a bugreport to Borland about it. Meanwhile, you can use NOW() to set TIMESTAMP to current time.
[14 Jul 2003 5:43]
paladin
brilliant. thanks, serg!