summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-12-16 21:45:45 +0100
committerSergei Golubchik <sergii@pisem.net>2012-12-16 21:45:45 +0100
commit4923d19b7c3c4c034f70ac1411837afa75c4b6ad (patch)
treee0442afcdf15886e0b192fd33125b56d45b8cdc4 /sql/sql_class.h
parentfe7c2aaeeab289b09645748e2006a7a9409fbbfa (diff)
downloadmariadb-git-4923d19b7c3c4c034f70ac1411837afa75c4b6ad.tar.gz
small code cleanup taken from MySQL 5.6
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index c061e6c2bb2..3dbccf9b41e 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -2564,6 +2564,11 @@ public:
mysql_mutex_unlock(&mysys_var->mutex);
return;
}
+ inline bool is_strict_mode() const
+ {
+ return variables.sql_mode & (MODE_STRICT_TRANS_TABLES |
+ MODE_STRICT_ALL_TABLES);
+ }
inline my_time_t query_start() { query_start_used=1; return start_time; }
inline ulong query_start_sec_part()
{ query_start_sec_part_used=1; return start_time_sec_part; }
@@ -3337,7 +3342,7 @@ my_eof(THD *thd)
const my_bool strict_date_checking= 0;
-inline ulong sql_mode_for_dates(THD *thd)
+inline ulonglong sql_mode_for_dates(THD *thd)
{
if (strict_date_checking)
return (thd->variables.sql_mode &
@@ -3346,7 +3351,7 @@ inline ulong sql_mode_for_dates(THD *thd)
return (thd->variables.sql_mode & MODE_INVALID_DATES);
}
-inline ulong sql_mode_for_dates()
+inline ulonglong sql_mode_for_dates()
{
return sql_mode_for_dates(current_thd);
}