diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-12-16 21:45:45 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-12-16 21:45:45 +0100 |
commit | 4923d19b7c3c4c034f70ac1411837afa75c4b6ad (patch) | |
tree | e0442afcdf15886e0b192fd33125b56d45b8cdc4 /sql/unireg.cc | |
parent | fe7c2aaeeab289b09645748e2006a7a9409fbbfa (diff) | |
download | mariadb-git-4923d19b7c3c4c034f70ac1411837afa75c4b6ad.tar.gz |
small code cleanup taken from MySQL 5.6
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index edcfe9eb934..72dbbf973e0 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -241,8 +241,7 @@ bool mysql_create_frm(THD *thd, const char *file_name, (real_table_name= field->field->table->s->table_name.str)) break; } - if ((thd->variables.sql_mode & - (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES))) + if (thd->is_strict_mode()) { my_error(ER_TOO_LONG_TABLE_COMMENT, MYF(0), real_table_name, static_cast<ulong>(TABLE_COMMENT_MAXLEN)); @@ -707,8 +706,7 @@ static bool pack_header(uchar *forminfo, enum legacy_db_type table_type, COLUMN_COMMENT_MAXLEN); if (tmp_len < field->comment.length) { - if ((current_thd->variables.sql_mode & - (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES))) + if (current_thd->is_strict_mode()) { my_error(ER_TOO_LONG_FIELD_COMMENT, MYF(0), field->field_name, static_cast<ulong>(COLUMN_COMMENT_MAXLEN)); |