~percona-dev/percona-server/5.1.57-12-rnt

Viewing all changes in revision 163.

  • Committer: Alexey Kopytov
  • Date: 2011-04-29 19:09:33 UTC
  • Revision ID: akopytov@gmail.com-20110429190933-r6g6lw3dt8cujflx
Initial implementation of timestamp_no_default.patch.

This patch allows creating TIMESTAMP columns with no default values. It
is impossible in MySQL for legacy reasons, so a TIMESTAMP column without
an explicitly specified default will implicitly be defined with one
of CURRENT_TIMESTAMP, NULL, or 0 as the default value.

In order to not break legacy behavior, a special syntax TIMESTAMP NOT
NULL DEFAULT NULL should be used in CREATE TABLE to avoid defining
implicit defaults for a TIMESTAMP column.

SHOW CREATE TABLE was also updated to produce that syntax for no default
TIMESTAMP columns.

This patch also fixes MySQL bug #33887.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: