From a8e6eb89837b5a0f5a9b4b07b7f753960e27d012 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 30 Apr 2006 16:01:34 +0300 Subject: [PATCH] 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 --- sql/set_var.cc | 4 ---- sql/sql_show.cc | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sql/set_var.cc b/sql/set_var.cc index 681c70c4c02..97d4fba208c 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -3207,10 +3207,6 @@ ulong fix_sql_mode(ulong sql_mode) MODE_IGNORE_SPACE | MODE_NO_KEY_OPTIONS | MODE_NO_TABLE_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; } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 268292022e4..ecdf74a1fef 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1344,8 +1344,8 @@ store_create_info(THD *thd, TABLE *table, String *packet) has_default= (field->type() != FIELD_TYPE_BLOB && field->unireg_check != Field::NEXT_NUMBER && - !((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)) && - has_now_default)); + !((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)) + && has_now_default)); if (has_default) { @@ -1374,8 +1374,7 @@ store_create_info(THD *thd, TABLE *table, String *packet) packet->append(tmp); } - if (!(thd->variables.sql_mode & MODE_NO_FIELD_OPTIONS) && - table->timestamp_field == field && + if (!limited_mysql_mode && table->timestamp_field == field && field->unireg_check != Field::TIMESTAMP_DN_FIELD) packet->append(" on update CURRENT_TIMESTAMP",28);