diff options
Diffstat (limited to 'sql/sql_alloc.h')
-rw-r--r-- | sql/sql_alloc.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_alloc.h b/sql/sql_alloc.h index 36fe665c475..4db12964f0a 100644 --- a/sql/sql_alloc.h +++ b/sql/sql_alloc.h @@ -27,11 +27,13 @@ class Sql_alloc public: static void *operator new(size_t size) throw () { - return thd_alloc(thd_get_current_thd(), size); + DBUG_ASSERT(size < UINT_MAX32); + return thd_alloc(thd_get_current_thd(), uint(size)); } static void *operator new[](size_t size) throw () { - return thd_alloc(thd_get_current_thd(), size); + DBUG_ASSERT(size < UINT_MAX32); + return thd_alloc(thd_get_current_thd(), uint(size)); } static void *operator new[](size_t size, MEM_ROOT *mem_root) throw () { return alloc_root(mem_root, size); } |