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/sql_signal.cc | |
parent | fe7c2aaeeab289b09645748e2006a7a9409fbbfa (diff) | |
download | mariadb-git-4923d19b7c3c4c034f70ac1411837afa75c4b6ad.tar.gz |
small code cleanup taken from MySQL 5.6
Diffstat (limited to 'sql/sql_signal.cc')
-rw-r--r-- | sql/sql_signal.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc index c9f1f42159f..9da10f5b2f5 100644 --- a/sql/sql_signal.cc +++ b/sql/sql_signal.cc @@ -243,8 +243,7 @@ static int assign_condition_item(MEM_ROOT *mem_root, const char* name, THD *thd, truncated= assign_fixed_string(mem_root, & my_charset_utf8_bin, 64, ci, str); if (truncated) { - if (thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | - MODE_STRICT_ALL_TABLES)) + if (thd->is_strict_mode()) { thd->raise_error_printf(ER_COND_ITEM_TOO_LONG, name); DBUG_RETURN(1); @@ -348,8 +347,7 @@ int Signal_common::eval_signal_informations(THD *thd, MYSQL_ERROR *cond) & utf8_text, str); if (truncated) { - if (thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | - MODE_STRICT_ALL_TABLES)) + if (thd->is_strict_mode()) { thd->raise_error_printf(ER_COND_ITEM_TOO_LONG, "MESSAGE_TEXT"); |