MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:V Narayanan Date:December 11 2009 7:17am
Subject:bzr commit into mysql-5.1-bugteam branch (v.narayanan:3260) Bug#49521
View as plain text  
#At file:///home/narayanan/Work/mysql_checkouts/shared_repository_directory/mysql-5.1-bugteam-49521-01/ based on revid:dao-gang.qu@stripped

 3260 V Narayanan	2009-12-11
      Bug#49521 SHOW CREATE TABLE on IBMDB2I tables has incorrect fk constraint format
      
      The fix inserts newline and comma characters as appropriate
      into the constraint reporting code to match the formatting
      required by SHOW CREATE TABLE. Additionally, a erroneously
      duplicated copy of check_if_incompatible_data() was removed
      from db2i_constraints.cc since the correct version is already
      in ha_ibmdb2i.cc.
     @ storage/ibmdb2i/db2i_constraints.cc
        Bug#49521 SHOW CREATE TABLE on IBMDB2I tables has incorrect fk constraint format
        
        - Insert newline and comma characters into the constraint reporting
          code to match the formatting required by SHOW CREATE TABLE.
        
        - Remove an erroneous copy of check_if_incompatible_data() from
          db2i_constraints.cc.

    modified:
      storage/ibmdb2i/db2i_constraints.cc
=== modified file 'storage/ibmdb2i/db2i_constraints.cc'
--- a/storage/ibmdb2i/db2i_constraints.cc	2009-03-09 21:20:14 +0000
+++ b/storage/ibmdb2i/db2i_constraints.cc	2009-12-11 07:16:57 +0000
@@ -329,7 +329,7 @@ char* ha_ibmdb2i::get_foreign_key_create
 
        /* Process the constraint name.                                           */
 
-        info.strncat(STRING_WITH_LEN(" CONSTRAINT "));
+        info.strncat(STRING_WITH_LEN(",\n  CONSTRAINT "));
         convNameForCreateInfo(thd, info,
              FKCstDef->CstName.Name, FKCstDef->CstName.Len);
  
@@ -398,7 +398,6 @@ char* ha_ibmdb2i::get_foreign_key_create
 
       if ((i+1) < cstCnt) 
       { 
-        info.strcat(',');
         tempPtr = (char*)cstHdr + cstHdr->CstLen;
         cstHdr = (constraint_hdr_t*)(tempPtr);
       }
@@ -671,28 +670,3 @@ uint ha_ibmdb2i::referenced_by_foreign_k
   }
   DBUG_RETURN(count);
 }
-
-
-bool ha_ibmdb2i::check_if_incompatible_data(HA_CREATE_INFO *info,
-                                         uint table_changes)
-{
-  DBUG_ENTER("ha_ibmdb2i::check_if_incompatible_data");
-  uint i;
-  /* Check that auto_increment value and field definitions were
-     not changed. */
-  if ((info->used_fields & HA_CREATE_USED_AUTO &&
-       info->auto_increment_value != 0) ||
-       table_changes != IS_EQUAL_YES)
-    DBUG_RETURN(COMPATIBLE_DATA_NO);
-  /* Check if any fields were renamed. */
-  for (i= 0; i < table->s->fields; i++)
-  {
-   Field *field= table->field[i];
-   if (field->flags & FIELD_IS_RENAMED)
-    {
-      DBUG_PRINT("info", ("Field has been renamed, copy table"));
-      DBUG_RETURN(COMPATIBLE_DATA_NO);
-    }
-  }
-  DBUG_RETURN(COMPATIBLE_DATA_YES);
-}


Attachment: [text/bzr-bundle] bzr/v.narayanan@sun.com-20091211071657-8xj0143vb5zph9kg.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (v.narayanan:3260) Bug#49521V Narayanan11 Dec