List:Commits« Previous MessageNext Message »
From:kpettersson Date:December 7 2006 4:01pm
Subject:bk commit into 4.1 tree (Kristofer.Pettersson:1.2581) BUG#17498
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of Kristofer Pettersson. When Kristofer Pettersson 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, 2006-12-07 17:01:00+01:00, Kristofer.Pettersson@naruto. +3 -0
  Bug#17498 failed to put data file in custom directory use "data directory" option
  - Using DATA/INDEX DIRECTORY option on Windows put data/index file into
    default directory because the OS doesn't support readlink().
  - The procedure for changing data/index file directory is 
    different under Windows.
  - With this fix we report a warning if DATA/INDEX option is used,
    but OS doesn't support readlink().

  mysql-test/r/windows.result@stripped, 2006-12-07 17:00:56+01:00, Kristofer.Pettersson@naruto. +6 -0
    - updated result file.

  mysql-test/t/windows.test@stripped, 2006-12-07 17:00:57+01:00, Kristofer.Pettersson@naruto. +9 -0
    - Added test case to verify we get warnings if we specify DATA/INDEX
      DIRECTORY on a platform which doesn't support readlink().

  sql/sql_parse.cc@stripped, 2006-12-07 17:00:58+01:00, Kristofer.Pettersson@naruto. +6 -0
    - Added warnings if DATA/INDEX DIRECTORY option is used but not supported
      by the target platform.

# 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:	Kristofer.Pettersson
# Host:	naruto.
# Root:	C:/cpp/bug17489/my41-bug17489

--- 1.489/sql/sql_parse.cc	2006-12-07 17:01:13 +01:00
+++ 1.490/sql/sql_parse.cc	2006-12-07 17:01:13 +01:00
@@ -2485,6 +2485,12 @@ mysql_execute_command(THD *thd)
       goto unsent_create_error;
 
 #ifndef HAVE_READLINK
+    if (lex->create_info.data_file_name)
+      push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+                   "DATA DIRECTORY option ignored");
+    if (lex->create_info.index_file_name)
+      push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+                   "INDEX DIRECTORY option ignored");
     lex->create_info.data_file_name=lex->create_info.index_file_name=0;
 #else
     /* Fix names if symlinked tables */

--- 1.1/mysql-test/r/windows.result	2006-12-07 17:01:13 +01:00
+++ 1.2/mysql-test/r/windows.result	2006-12-07 17:01:13 +01:00
@@ -6,3 +6,9 @@ use prn;
 ERROR 42000: Unknown database 'prn'
 create table nu (a int);
 drop table nu;
+drop table if exists t1;
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+Warnings:
+Warning	0	DATA DIRECTORY option ignored
+Warning	0	INDEX DIRECTORY option ignored
+drop table t1;

--- 1.1/mysql-test/t/windows.test	2006-12-07 17:01:13 +01:00
+++ 1.2/mysql-test/t/windows.test	2006-12-07 17:01:13 +01:00
@@ -17,4 +17,13 @@ use prn;
 create table nu (a int);
 drop table nu;
 
+#
+# Bug17489: ailed to put data file in custom directory use "data directory" option
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+drop table t1;
+
 # End of 4.1 tests


Thread
bk commit into 4.1 tree (Kristofer.Pettersson:1.2581) BUG#17498kpettersson7 Dec