List:Commits« Previous MessageNext Message »
From:ingo Date:April 6 2006 8:40am
Subject:bk commit into 5.1 tree (ingo:1.2294)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mydev. When mydev 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
  1.2294 06/04/06 08:40:38 ingo@stripped +2 -0
  Merge mysql.com:/home/mydev/mysql-5.1-bug18477
  into  mysql.com:/home/mydev/mysql-5.1-aid

  sql/sql_table.cc
    1.323 06/04/06 08:40:31 ingo@stripped +0 -0
    Auto merged

  mysql-test/t/innodb.test
    1.135 06/04/06 08:40:31 ingo@stripped +0 -0
    Auto merged

# 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:	ingo
# Host:	chilla.local
# Root:	/home/mydev/mysql-5.1-aid/RESYNC

--- 1.322/sql/sql_table.cc	2006-03-30 20:55:48 +02:00
+++ 1.323/sql/sql_table.cc	2006-04-06 08:40:31 +02:00
@@ -1191,6 +1191,11 @@
                                                sql_field->interval_list);
         List_iterator<String> it(sql_field->interval_list);
         String conv, *tmp;
+        char comma_buf[2];
+        int comma_length= cs->cset->wc_mb(cs, ',', (uchar*) comma_buf,
+                                          (uchar*) comma_buf + 
+                                          sizeof(comma_buf));
+        DBUG_ASSERT(comma_length > 0);
         for (uint i= 0; (tmp= it++); i++)
         {
           uint lengthsp;
@@ -1209,6 +1214,16 @@
                                        interval->type_lengths[i]);
           interval->type_lengths[i]= lengthsp;
           ((uchar *)interval->type_names[i])[lengthsp]= '\0';
+          if (sql_field->sql_type == FIELD_TYPE_SET)
+          {
+            if (cs->coll->instr(cs, interval->type_names[i], 
+                                interval->type_lengths[i], 
+                                comma_buf, comma_length, NULL, 0))
+            {
+              my_error(ER_ILLEGAL_VALUE_FOR_TYPE, MYF(0), "set", tmp->ptr());
+              DBUG_RETURN(-1);
+            }
+          }
         }
         sql_field->interval_list.empty(); // Don't need interval_list anymore
       }
@@ -2126,7 +2141,7 @@
     }
     DBUG_PRINT("info", ("db_type = %d",
                          ha_legacy_type(part_info->default_engine_type)));
-    if (check_partition_info(part_info, &engine_type, file,
+    if (part_info->check_partition_info( &engine_type, file,
                              create_info->max_rows))
       goto err;
     part_info->default_engine_type= engine_type;
@@ -2449,7 +2464,7 @@
       field=item->tmp_table_field(&tmp_table);
     else
       field=create_tmp_field(thd, &tmp_table, item, item->type(),
-                             (Item ***) 0, &tmp_field, 0, 0, 0, 0);
+                             (Item ***) 0, &tmp_field, 0, 0, 0, 0, 0);
     if (!field ||
 	!(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ?
 					   ((Item_field *)item)->field :

--- 1.134/mysql-test/t/innodb.test	2006-03-30 23:34:02 +02:00
+++ 1.135/mysql-test/t/innodb.test	2006-04-06 08:40:31 +02:00
@@ -2113,3 +2113,28 @@
 
 DROP TABLE t2;
 DROP TABLE t1;
+
+#
+# Bug#18477 - MySQL/InnoDB Ignoring Foreign Keys in ALTER TABLE
+#
+create table t1 (
+  c1 bigint not null,
+  c2 bigint not null,
+  primary key (c1),
+  unique  key (c2)
+) engine=innodb;
+#
+create table t2 (
+  c1 bigint not null,
+  primary key (c1)
+) engine=innodb;
+#
+alter table t1 add constraint c2_fk foreign key (c2)
+  references t2(c1) on delete cascade;
+show create table t1;
+#
+alter table t1 drop foreign key c2_fk;
+show create table t1;
+#
+drop table t1, t2;
+
Thread
bk commit into 5.1 tree (ingo:1.2294)ingo6 Apr