1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Serge Kozlov
2008-11-27 15:15:14 +03:00
parent 28ce657919
commit 011d84bb27
2 changed files with 8 additions and 5 deletions

View File

@ -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;

View File

@ -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