Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

bk commit into 5.0 tree (df:1.2531)

From: Daniel Fischer <df(at)mysql.com>
Date: Thu Sep 27 2007 - 02:56:10 EDT


Below is the list of changes that have just been committed into a local 5.0 repository of df. When df 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.2531, 2007-09-27 08:56:06+02:00, df@pippilotta.erinye.com +1 -0   avoid using GetTempFileName in a way it's documented to not work on windows

  mysys/mf_tempfile.c@1.27, 2007-09-27 08:56:04+02:00, df@pippilotta.erinye.com +14 -0     Try to avoid passing null as first parameter to GetTempFileName, since it's documented that it won't work.

diff -Nrup a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c

--- a/mysys/mf_tempfile.c	2007-03-23 11:01:46 +01:00
+++ b/mysys/mf_tempfile.c	2007-09-27 08:56:04 +02:00
@@ -59,11 +59,25 @@ File create_temp_file(char *to, const ch
 		      myf MyFlags __attribute__((unused)))
 {
   File file= -1;
+#ifdef __WIN__

+ TCHAR path_buf[MAX_PATH-14];
+#endif
 
   DBUG_ENTER("create_temp_file");
   DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix));
 #if defined (__WIN__)
 
+   /*
+     Use GetTempPath to determine path for temporary files.
+     This is because the documentation for GetTempFileName 
+     has the following to say about this parameter:
+     "If this parameter is NULL, the function fails."
+   */
+   if (!dir)
+   {
+     if(GetTempPath(sizeof(path_buf), path_buf) > 0) 
+       dir = path_buf;

+ }

    /*

      Use GetTempFileName to generate a unique filename, create
      the file and release it's handle
-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Thu Sep 27 02:58:04 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 09:40:58 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library