MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:June 28 2007 9:24am
Subject:bk commit into 5.0 tree (msvensson:1.2503) BUG#29361
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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@stripped, 2007-06-28 11:23:59+02:00, msvensson@pilot.(none) +2 -0
  Bug#29361 mysqldump creates stray file when too long path name is passed
   - Move the check of too long path to 'get_one_option'

  client/mysqldump.c@stripped, 2007-06-28 11:23:58+02:00, msvensson@pilot.(none) +12 -11
    Move the check of too long path to 'get_one_option'

  mysql-test/r/mysqldump.result@stripped, 2007-06-28 11:23:58+02:00, msvensson@pilot.(none) +1 -1
    Update result file after changing error message

# 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:	msvensson
# Host:	pilot.(none)
# Root:	/data/msvensson/mysql/bug29361/my50-bug29361

--- 1.266/client/mysqldump.c	2007-06-05 23:04:31 +02:00
+++ 1.267/client/mysqldump.c	2007-06-28 11:23:58 +02:00
@@ -686,6 +686,18 @@ get_one_option(int optid, const struct m
     break;
   case 'T':
     opt_disable_keys=0;
+
+    if (strlen(argument) >= FN_REFLEN)
+    {
+      /*
+        This check is made because the some the file functions below
+        have FN_REFLEN sized stack allocated buffers and will cause
+        a crash even if the input destination buffer is large enough
+        to hold the output.
+      */
+      die(EX_USAGE, "Input filename too long: %s", argument);
+    }
+
     break;
   case '#':
     DBUG_PUSH(argument ? argument : default_dbug_option);
@@ -2323,17 +2335,6 @@ static void dump_table(char *table, char
   if (path)
   {
     char filename[FN_REFLEN], tmp_path[FN_REFLEN];
-
-    if (strlen(path) >= FN_REFLEN)
-    {
-      /*
-        This check is made because the some the file functions below
-        have FN_REFLEN sized stack allocated buffers and will cause
-        a crash even if the input destination buffer is large enough
-        to hold the output.
-      */
-      die(EX_USAGE, "Input filename or options too long: %s", path);
-    }
 
     /*
       Convert the path to native os format

--- 1.125/mysql-test/r/mysqldump.result	2007-05-28 00:05:32 +02:00
+++ 1.126/mysql-test/r/mysqldump.result	2007-06-28 11:23:58 +02:00
@@ -3206,7 +3206,7 @@ DROP TABLE t1;
 #
 CREATE TABLE t1(a int);
 INSERT INTO t1 VALUES (1), (2);
-mysqldump: Input filename or options too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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