List:Commits« Previous MessageNext Message »
From:holyfoot Date:December 7 2006 12:10pm
Subject:bk commit into 5.1 tree (holyfoot:1.2349)
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, 2006-12-07 16:10:16+04:00, holyfoot@deer.(none) +1 -0
  Merge mysql.com:/home/hf/work/mysql-5.1.clean
  into  mysql.com:/home/hf/work/22451/my51
  MERGE: 1.2273.106.10

  sql/table.cc@stripped, 2006-12-07 16:10:08+04:00, holyfoot@deer.(none) +0 -0
    Auto merged
    MERGE: 1.239.7.4

# 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:	deer.(none)
# Root:	/home/hf/work/22451/my51/RESYNC

--- 1.262/sql/table.cc	2006-12-07 16:10:25 +04:00
+++ 1.263/sql/table.cc	2006-12-07 16:10:25 +04:00
@@ -450,14 +450,18 @@ static int open_binary_frm(THD *thd, TAB
   if (share->frm_version == FRM_VER_TRUE_VARCHAR -1 && head[33] == 5)
     share->frm_version= FRM_VER_TRUE_VARCHAR;
 
+  legacy_db_type= (enum legacy_db_type) (uint) *(head+3);
 #ifdef WITH_PARTITION_STORAGE_ENGINE
-  if (*(head+61) &&
-      !(share->default_part_db_type= 
-        ha_checktype(thd, (enum legacy_db_type) (uint) *(head+61), 1, 0)))
+  enum legacy_db_type partition_db_type=(enum legacy_db_type) (uint) *(head+61);
+  /* We don't create PARTITION handler over FEDERATED table */
+  if (partition_db_type == DB_TYPE_FEDERATED_DB)
+    legacy_db_type= partition_db_type;
+  else if (partition_db_type &&
+           !(share->default_part_db_type=
+               ha_checktype(thd, partition_db_type, 1,0)))
     goto err;
   DBUG_PRINT("info", ("default_part_db_type = %u", head[61]));
 #endif
-  legacy_db_type= (enum legacy_db_type) (uint) *(head+3);
   share->db_type= ha_checktype(thd, legacy_db_type, 0, 0);
   share->db_create_options= db_create_options= uint2korr(head+30);
   share->db_options_in_use= share->db_create_options;
@@ -628,7 +632,8 @@ static int open_binary_frm(THD *thd, TAB
 #ifdef WITH_PARTITION_STORAGE_ENGINE
       else
       {
-        if (!strncmp(next_chunk + 2, "partition", str_db_type_length))
+        if ((partition_db_type != DB_TYPE_FEDERATED_DB) &&
+            !strncmp(next_chunk + 2, "partition", str_db_type_length))
         {
           /* Use partition handler */
           share->db_type= partition_hton;
@@ -644,7 +649,10 @@ static int open_binary_frm(THD *thd, TAB
     {
       uint32 partition_info_len = uint4korr(next_chunk);
 #ifdef WITH_PARTITION_STORAGE_ENGINE
-      if ((share->partition_info_len= partition_info_len))
+      /* We don't create PARTITION hton over FEDERATED */
+      if (partition_db_type == DB_TYPE_FEDERATED_DB)
+        share->partition_info_len= 0;
+      else if ((share->partition_info_len= partition_info_len))
       {
         if (!(share->partition_info=
               (uchar*) memdup_root(&share->mem_root, next_chunk + 4,
Thread
bk commit into 5.1 tree (holyfoot:1.2349)holyfoot7 Dec