Commit 451a6f77 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 1188021f
...@@ -27,9 +27,10 @@ INSERT into t1(name) values('Record_3'); ...@@ -27,9 +27,10 @@ INSERT into t1(name) values('Record_3');
INSERT into t1(name) values('Record_4'); INSERT into t1(name) values('Record_4');
## There should be a difference ## ## There should be a difference ##
SET @@session.max_allowed_packet= 1024*1024*1024; SET @@session.max_allowed_packet= 1024*1024*1024;
select SET @orig_file= load_file('MYSQLD_LOGFILE.orig');
STRCMP(load_file('MYSQLD_LOGFILE.orig'), load_file('MYSQLD_LOGFILE.copy')); SET @copy_file= load_file('MYSQLD_LOGFILE.copy');
STRCMP(load_file('MYSQLD_LOGFILE.orig'), load_file('MYSQLD_LOGFILE.copy')) SELECT STRCMP(@orig_file, @copy_file);
STRCMP(@orig_file, @copy_file)
1 1
## Dropping tables ## ## Dropping tables ##
DROP TABLE t1; DROP TABLE t1;
...@@ -81,8 +81,10 @@ INSERT into t1(name) values('Record_4'); ...@@ -81,8 +81,10 @@ INSERT into t1(name) values('Record_4');
--echo ## There should be a difference ## --echo ## There should be a difference ##
SET @@session.max_allowed_packet= 1024*1024*1024; SET @@session.max_allowed_packet= 1024*1024*1024;
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE --replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
eval select eval SET @orig_file= load_file('$MYSQLD_LOGFILE.orig');
STRCMP(load_file('$MYSQLD_LOGFILE.orig'), load_file('$MYSQLD_LOGFILE.copy')); --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.copy
--remove_file $MYSQLD_LOGFILE.orig --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