Bug #11964 ALTER TABLE gives wrong error message with sql-mode TRADITIONAL (timestamp)
Submitted: 15 Jul 2005 11:30 Modified: 3 Aug 2005 15:39
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.10-beta OS:
Assigned to: Ramil Kalimullin CPU Architecture:Any

[15 Jul 2005 11:30] Hakan Küçükyılmaz
Description:
ALTER TABLE gives wrong error message with sql-mode TRADITIONAL. This time with a timestamp field.

How to repeat:
[13:28] root@test>CREATE TABLE t1(a int, b timestamp);
Query OK, 0 rows affected (0.01 sec)

5.0.10-beta-debug on 10.17.69.84
[13:28] root@test>ALTER TABLE t1 ADD PRIMARY KEY(a);
ERROR 1067 (42000): Invalid default value for 'b'
5.0.10-beta-debug on 10.17.69.84
[13:29] root@test>
[15 Jul 2005 12:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27147
[25 Jul 2005 9:37] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27547
[27 Jul 2005 10:59] Ramil Kalimullin
fixed in 5.0.11
[3 Aug 2005 15:39] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented fix in 5.0.11 changelog.