Commit a8e6eb89 authored by unknown's avatar unknown

Fix for Bug#14515.


sql/set_var.cc:
  Fix for Bug#14515. These modes do not need restrictions, they're handled
  separately in sql_show.cc
parent 5bbd9437
...@@ -3207,10 +3207,6 @@ ulong fix_sql_mode(ulong sql_mode) ...@@ -3207,10 +3207,6 @@ ulong fix_sql_mode(ulong sql_mode)
MODE_IGNORE_SPACE | MODE_IGNORE_SPACE |
MODE_NO_KEY_OPTIONS | MODE_NO_TABLE_OPTIONS | MODE_NO_KEY_OPTIONS | MODE_NO_TABLE_OPTIONS |
MODE_NO_FIELD_OPTIONS); MODE_NO_FIELD_OPTIONS);
if (sql_mode & MODE_MYSQL40)
sql_mode|= MODE_NO_FIELD_OPTIONS;
if (sql_mode & MODE_MYSQL323)
sql_mode|= MODE_NO_FIELD_OPTIONS;
return sql_mode; return sql_mode;
} }
......
...@@ -1344,8 +1344,8 @@ store_create_info(THD *thd, TABLE *table, String *packet) ...@@ -1344,8 +1344,8 @@ store_create_info(THD *thd, TABLE *table, String *packet)
has_default= (field->type() != FIELD_TYPE_BLOB && has_default= (field->type() != FIELD_TYPE_BLOB &&
field->unireg_check != Field::NEXT_NUMBER && field->unireg_check != Field::NEXT_NUMBER &&
!((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)) && !((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40))
has_now_default)); && has_now_default));
if (has_default) if (has_default)
{ {
...@@ -1374,8 +1374,7 @@ store_create_info(THD *thd, TABLE *table, String *packet) ...@@ -1374,8 +1374,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
packet->append(tmp); packet->append(tmp);
} }
if (!(thd->variables.sql_mode & MODE_NO_FIELD_OPTIONS) && if (!limited_mysql_mode && table->timestamp_field == field &&
table->timestamp_field == field &&
field->unireg_check != Field::TIMESTAMP_DN_FIELD) field->unireg_check != Field::TIMESTAMP_DN_FIELD)
packet->append(" on update CURRENT_TIMESTAMP",28); packet->append(" on update CURRENT_TIMESTAMP",28);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment