summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-05-19 14:55:10 +0200
committerSergei Golubchik <serg@mariadb.org>2021-05-19 22:58:34 +0200
commitc3b5003851facb292ee681518ea5d71e95961935 (patch)
tree9723dea15b24cd799efaad7699d0db7e5eb4b079 /sql/item_strfunc.cc
parentecd65884542dfd635a612f6bc7fd08e0ee0beb68 (diff)
downloadmariadb-git-c3b5003851facb292ee681518ea5d71e95961935.tar.gz
fixes for win32
in win32 stat_info.st_size is __int64, not size_t
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 9f7ff0eca74..7e8ff667e75 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -3867,7 +3867,7 @@ String *Item_load_file::val_str(String *str)
File file;
MY_STAT stat_info;
char path[FN_REFLEN];
- size_t file_size;
+ ulonglong file_size;
DBUG_ENTER("load_file");
if (!(file_name= args[0]->val_str(str))
@@ -3896,7 +3896,7 @@ String *Item_load_file::val_str(String *str)
{
THD *thd= current_thd;
- if (file_size >= (size_t) thd->variables.max_allowed_packet)
+ if (file_size >= thd->variables.max_allowed_packet)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
@@ -3905,7 +3905,7 @@ String *Item_load_file::val_str(String *str)
goto err;
}
}
- if (tmp_value.alloc(file_size))
+ if (tmp_value.alloc((ulong)file_size))
goto err;
if ((file= mysql_file_open(key_file_loadfile,
file_name->ptr(), O_RDONLY, MYF(0))) < 0)