Commit b4114f54 authored by Serge Kozlov's avatar Serge Kozlov

Bug#40145. Argument for LOAD_FILE() can be too long and sometimes

a query with two or more these functions truncated. Therefore data 
from each LOAD_FILE() copied into its local variables and then used
in a query.
parent 4d7cd492
......@@ -27,9 +27,10 @@ INSERT into t1(name) values('Record_3');
INSERT into t1(name) values('Record_4');
## There should be a difference ##
SET @@session.max_allowed_packet= 1024*1024*1024;
select
STRCMP(load_file('MYSQLD_LOGFILE.orig'), load_file('MYSQLD_LOGFILE.copy'));
STRCMP(load_file('MYSQLD_LOGFILE.orig'), load_file('MYSQLD_LOGFILE.copy'))
SET @orig_file= load_file('MYSQLD_LOGFILE.orig');
SET @copy_file= load_file('MYSQLD_LOGFILE.copy');
SELECT STRCMP(@orig_file, @copy_file);
STRCMP(@orig_file, @copy_file)
1
## Dropping tables ##
DROP TABLE t1;
......@@ -81,8 +81,10 @@ INSERT into t1(name) values('Record_4');
--echo ## There should be a difference ##
SET @@session.max_allowed_packet= 1024*1024*1024;
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
eval select
STRCMP(load_file('$MYSQLD_LOGFILE.orig'), load_file('$MYSQLD_LOGFILE.copy'));
eval SET @orig_file= load_file('$MYSQLD_LOGFILE.orig');
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
eval SET @copy_file= load_file('$MYSQLD_LOGFILE.copy');
eval SELECT STRCMP(@orig_file, @copy_file);
--remove_file $MYSQLD_LOGFILE.copy
--remove_file $MYSQLD_LOGFILE.orig
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment