List:Commits« Previous MessageNext Message »
From:holyfoot Date:March 29 2007 1:42pm
Subject:bk commit into 5.1 tree (holyfoot:1.2478) BUG#24633
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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-03-29 18:42:27+05:00, holyfoot@stripped +3 -0
  bug #24633 (sql_mode NO_DIR_IN_CREATE doesn't work with partitioned tables)
  
  additional patch to fix SHOW CREATE behaviour

  mysql-test/r/partition.result@stripped, 2007-03-29 18:42:25+05:00, holyfoot@stripped +7 -1
    result fixed

  mysql-test/t/partition.test@stripped, 2007-03-29 18:42:25+05:00, holyfoot@stripped +13 -1
    testcase

  sql/sql_partition.cc@stripped, 2007-03-29 18:42:25+05:00, holyfoot@stripped +9 -6
    check MODE_NO_DIR_IN_CREATE for partitioned tables in SHOW CREATE statement

# 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:	holyfoot
# Host:	hfmain.(none)
# Root:	/home/hf/work/24633/my51-24633

--- 1.59/mysql-test/r/partition.result	2007-03-29 18:42:31 +05:00
+++ 1.60/mysql-test/r/partition.result	2007-03-29 18:42:31 +05:00
@@ -1231,5 +1231,11 @@ partition p01 values less than (1000)
 data directory='/not/existing'
     index directory='/not/existing'
 );
-DROP TABLE t1;
+show create table t2;
+Table	Create Table
+t2	CREATE TABLE `t2` (
+  `i` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */
+DROP TABLE t1, t2;
+set @@sql_mode=@org_mode;
 End of 5.1 tests

--- 1.53/mysql-test/t/partition.test	2007-03-29 18:42:31 +05:00
+++ 1.54/mysql-test/t/partition.test	2007-03-29 18:42:31 +05:00
@@ -1467,6 +1467,16 @@ drop table t1, t2;
 # Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables 
 #
 
+disable_query_log;
+eval create table t2 (i int )
+partition by range (i)
+(
+    partition p01 values less than (1000)
+    data directory="$MYSQLTEST_VARDIR/master-data/test/"
+    index directory="$MYSQLTEST_VARDIR/master-data/test/"
+);
+enable_query_log;
+
 set @org_mode=@@sql_mode;
 set @@sql_mode='NO_DIR_IN_CREATE';
 select @@sql_mode;
@@ -1478,6 +1488,8 @@ partition by range (i)
     index directory='/not/existing'
 );
 
-DROP TABLE t1;
+show create table t2;
+DROP TABLE t1, t2;
+set @@sql_mode=@org_mode;
 
 --echo End of 5.1 tests

--- 1.100/sql/sql_partition.cc	2007-03-29 18:42:31 +05:00
+++ 1.101/sql/sql_partition.cc	2007-03-29 18:42:31 +05:00
@@ -1892,12 +1892,15 @@ static int add_partition_options(File fp
     err+= add_keyword_int(fptr,"MAX_ROWS",(longlong)p_elem->part_max_rows);
   if (p_elem->part_min_rows)
     err+= add_keyword_int(fptr,"MIN_ROWS",(longlong)p_elem->part_min_rows);
-  if (p_elem->data_file_name)
-    err+= add_keyword_string(fptr, "DATA DIRECTORY", TRUE, 
-                             p_elem->data_file_name);
-  if (p_elem->index_file_name)
-    err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE, 
-                             p_elem->index_file_name);
+  if (!(current_thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE))
+  {
+    if (p_elem->data_file_name)
+      err+= add_keyword_string(fptr, "DATA DIRECTORY", TRUE, 
+                               p_elem->data_file_name);
+    if (p_elem->index_file_name)
+      err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE, 
+                               p_elem->index_file_name);
+  }
   if (p_elem->part_comment)
     err+= add_keyword_string(fptr, "COMMENT", TRUE, p_elem->part_comment);
   return err + add_engine(fptr,p_elem->engine_type);
Thread
bk commit into 5.1 tree (holyfoot:1.2478) BUG#24633holyfoot29 Mar