mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -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');
|
|||||||
--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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user