2739 Ramil Kalimullin 2009-05-13 [merge]
Fix for bug#44774 merged.
modified:
mysql-test/r/func_str.result
mysql-test/t/func_str.test
sql/item_strfunc.cc
2738 Jim Winstead 2009-05-12 [merge]
Merge from 5.0-bugteam
modified:
client/mysqlbinlog.cc
mysql-test/r/distinct.result
mysql-test/r/mysqlbinlog.result
mysql-test/r/user_var.result
mysql-test/t/mysqlbinlog.test
mysql-test/t/user_var.test
sql/item_func.cc
sql/item_func.h
sql/sql_class.cc
=== modified file 'mysql-test/r/func_str.result'
--- a/mysql-test/r/func_str.result 2009-02-14 09:09:35 +0000
+++ b/mysql-test/r/func_str.result 2009-05-12 08:18:27 +0000
@@ -2187,4 +2187,13 @@ SELECT DATE_FORMAT(c, GET_FORMAT(DATE, '
h i
31.12.2008 AAAAAA, aaaaaa
DROP TABLE t1;
+#
+# BUG#44774: load_file function produces valgrind warnings
+#
+CREATE TABLE t1 (a TINYBLOB);
+INSERT INTO t1 VALUES ('aaaaaaaa');
+SELECT LOAD_FILE(a) FROM t1;
+LOAD_FILE(a)
+NULL
+DROP TABLE t1;
End of 5.0 tests
=== modified file 'mysql-test/t/func_str.test'
--- a/mysql-test/t/func_str.test 2009-02-13 16:17:07 +0000
+++ b/mysql-test/t/func_str.test 2009-05-12 08:18:27 +0000
@@ -1168,4 +1168,14 @@ INSERT INTO t1 VALUES ('2008-12-31','aaa
SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # BUG#44774: load_file function produces valgrind warnings
+--echo #
+CREATE TABLE t1 (a TINYBLOB);
+INSERT INTO t1 VALUES ('aaaaaaaa');
+SELECT LOAD_FILE(a) FROM t1;
+DROP TABLE t1;
+
+
--echo End of 5.0 tests
=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc 2009-04-17 15:52:57 +0000
+++ b/sql/item_strfunc.cc 2009-05-12 08:18:27 +0000
@@ -2832,7 +2832,7 @@ String *Item_load_file::val_str(String *
)
goto err;
- (void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
+ (void) fn_format(path, file_name->c_ptr_safe(), mysql_real_data_home, "",
MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
/* Read only allowed from within dir specified by secure_file_priv */
@@ -2858,7 +2858,7 @@ String *Item_load_file::val_str(String *
}
if (tmp_value.alloc(stat_info.st_size))
goto err;
- if ((file = my_open(file_name->c_ptr(), O_RDONLY, MYF(0))) < 0)
+ if ((file = my_open(file_name->ptr(), O_RDONLY, MYF(0))) < 0)
goto err;
if (my_read(file, (byte*) tmp_value.ptr(), stat_info.st_size, MYF(MY_NABP)))
{
Attachment: [text/bzr-bundle] bzr/ramil@mysql.com-20090513042138-63mx29b27oow4zl2.bundle
| Thread |
|---|
| • bzr push into mysql-5.0-bugteam branch (ramil:2738 to 2739) Bug#44774 | Ramil Kalimullin | 13 May |