mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg4131-3
This commit is contained in:
@@ -3242,7 +3242,18 @@ bool add_field_to_list(char *field_name, enum_field_types type,
|
||||
}
|
||||
break;
|
||||
case FIELD_TYPE_TIMESTAMP:
|
||||
#if MYSQL_VERSION_ID < 40100
|
||||
/*
|
||||
When in in --new mode, we should create TIMESTAMP(19) fields by default;
|
||||
otherwise we will have problems with ALTER TABLE changing lengths of
|
||||
existing TIMESTAMP fields to 19 and adding new fields with length 14.
|
||||
*/
|
||||
if (thd->variables.new_mode)
|
||||
new_field->length= 19;
|
||||
else if (!length)
|
||||
#else
|
||||
if (!length)
|
||||
#endif
|
||||
new_field->length= 14; // Full date YYYYMMDDHHMMSS
|
||||
else if (new_field->length != 19)
|
||||
{
|
||||
|
Reference in New Issue
Block a user