List:Commits« Previous MessageNext Message »
From:Tatjana A Nuernberg Date:May 8 2006 2:38am
Subject:bk commit into 4.1 tree (tnurnberg:1.2471) BUG#10418
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of azundris. When azundris does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2471 06/05/08 04:37:58 tnurnberg@stripped +5 -0
  Bug#10418: LOAD_FILE does not behave like in manual if file does not exist
  
  load_file() string-function should return NULL rather than throw an error if
  the file doesn't exist, as per the manual.

  sql/item_strfunc.cc
    1.241 06/05/08 03:39:19 tnurnberg@stripped +1 -1
    load_file() should return NULL as per the docs if file not found,
    rather than throw an error

  mysql-test/r/func_str.result
    1.99 06/05/08 03:38:08 tnurnberg@stripped +7 -0
    expect NULL rather than error if file given to load_file() doesn't exist

  mysql-test/r/outfile.result
    1.4 06/05/08 03:38:00 tnurnberg@stripped +11 -11
    expect NULL rather than error if file given to load_file() doesn't exist

  mysql-test/t/func_str.test
    1.81 06/05/08 03:37:13 tnurnberg@stripped +8 -1
    show that load_file() will return NULL rather than throw an error
    if file doesn't exist

  mysql-test/t/outfile.test
    1.12 06/05/08 03:36:18 tnurnberg@stripped +0 -1
    expect NULL rather than error if file given to load_file() doesn't exist

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tnurnberg
# Host:	salvation.intern.azundris.com
# Root:	/home/mysql-4.1-10418

--- 1.240/sql/item_strfunc.cc	2006-04-13 13:19:16 +02:00
+++ 1.241/sql/item_strfunc.cc	2006-05-08 03:39:19 +02:00
@@ -2489,7 +2489,7 @@
   (void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
 		   MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
 
-  if (!my_stat(path, &stat_info, MYF(MY_WME)))
+  if (!my_stat(path, &stat_info, MYF(0)))
     goto err;
 
   if (!(stat_info.st_mode & S_IROTH))

Binary files /home/mysql-4.1-10418/BitKeeper/tmp/bk_outfile.result-1.3_hdmv41 and /home/mysql-4.1-10418/BitKeeper/tmp/bk_outfile.result-1.4_WoRT9g differ

--- 1.11/mysql-test/t/outfile.test	2005-07-28 02:21:46 +02:00
+++ 1.12/mysql-test/t/outfile.test	2006-05-08 03:36:18 +02:00
@@ -38,7 +38,6 @@
 #--error 1086
 #eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1;
 #enable_query_log;
---error 13,2
 select load_file(concat(@tmpdir,"/outfile-test.not-exist"));
 --exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.1
 --exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.2

--- 1.98/mysql-test/r/func_str.result	2005-08-11 08:51:49 +02:00
+++ 1.99/mysql-test/r/func_str.result	2006-05-08 03:38:08 +02:00
@@ -1000,3 +1000,10 @@
 1000000
 1      
 drop table t1;
+select load_file("lkjlkj");
+load_file("lkjlkj")
+NULL
+select ifnull(load_file("lkjlkj"),"it's null");
+ifnull(load_file("lkjlkj"),"it's null")
+it's null
+End of 4.1 tests

--- 1.80/mysql-test/t/func_str.test	2005-08-11 08:51:49 +02:00
+++ 1.81/mysql-test/t/func_str.test	2006-05-08 03:37:13 +02:00
@@ -662,4 +662,11 @@
 --disable_metadata
 drop table t1;
 
-# End of 4.1 tests
+#
+# Bug #10418: LOAD_FILE does not behave like in manual if file does not exist
+#
+
+select load_file("lkjlkj");
+select ifnull(load_file("lkjlkj"),"it's null");
+
+--echo End of 4.1 tests
Thread
bk commit into 4.1 tree (tnurnberg:1.2471) BUG#10418Tatjana A Nuernberg8 May