MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Patrick Galbraith Date:July 25 2006 10:38pm
Subject:bk commit into 5.0 tree (pgalbraith:1.2238) BUG#15133
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of patg. When patg 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-07-25 18:38:09-04:00, pgalbraith@stripped +3 -0
  BUG #15133 "unique index with nullable value not accepted in federated table"
  
  Added HA_NULL_IN_KEY to table flags to allow for nullable unique indexes
  and added test to verify
  
  ha_federated.h:
    BUG #15133 "unique index with nullable value not accepted in federated table"
    added HA_NULL_IN_KEY to table flags to allow for nullable unique indexes
  federated.test:
    BUG #15133 "unique index with nullable value not accepted in federated table"
    New test to show that nullable unique indexes work
  federated.result:
    BUG #15133 "unique index with nullable value not accepted in federated table"
    New results for new test

  mysql-test/r/federated.result@stripped, 2006-07-25 18:03:46-04:00, pgalbraith@stripped +27 -0
    BUG #15133 "unique index with nullable value not accepted in federated table"
    New results for new test

  mysql-test/t/federated.test@stripped, 2006-07-25 18:03:24-04:00, pgalbraith@stripped +45 -0
    BUG #15133 "unique index with nullable value not accepted in federated table"
    New test to show that nullable unique indexes work

  sql/ha_federated.h@stripped, 2006-07-25 16:40:18-04:00, pgalbraith@stripped +3 -1
    BUG #15133 "unique index with nullable value not accepted in federated table"
    added HA_NULL_IN_KEY to table flags to allow for nullable unique indexes

# 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:	pgalbraith
# Host:	buffy.netfrastructure.com
# Root:	/home/patg/mysql-build/mysql-5.0-engines-bug15133

--- 1.36/mysql-test/r/federated.result	2006-07-25 18:38:16 -04:00
+++ 1.37/mysql-test/r/federated.result	2006-07-25 18:38:16 -04:00
@@ -1784,6 +1784,33 @@
 5000
 drop table t1;
 drop table t1;
+DROP TABLE IF EXISTS federated.test;
+CREATE TABLE federated.test (
+`i` int(11) NOT NULL,
+`j` int(11) NOT NULL,
+`c` varchar(30) default NULL,
+PRIMARY KEY  (`i`,`j`),
+UNIQUE KEY `i` (`i`,`c`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+DROP TABLE IF EXISTS federated.test1;
+DROP TABLE IF EXISTS federated.test2;
+create table federated.test1 (
+i int not null,
+j int not null,
+c varchar(30),
+primary key (i,j),
+unique key (i, c))
+engine = federated
+connection='mysql://root@stripped:SLAVE_PORT/federated/test';
+create table federated.test2 (
+i int default null,
+j int not null,
+c varchar(30),
+key (i))
+engine = federated
+connection='mysql://root@stripped:SLAVE_PORT/federated/test';
+drop table federated.test1, federated.test2;
+drop table federated.test;
 DROP TABLE IF EXISTS federated.t1;
 DROP DATABASE IF EXISTS federated;
 DROP TABLE IF EXISTS federated.t1;

--- 1.32/mysql-test/t/federated.test	2006-07-25 18:38:16 -04:00
+++ 1.33/mysql-test/t/federated.test	2006-07-25 18:38:16 -04:00
@@ -1499,4 +1499,49 @@
 connection master;
 drop table t1;
 
+#
+# BUG #15133: unique index with nullable value not accepted in federated table 
+#
+
+connection slave;
+--disable_warnings
+DROP TABLE IF EXISTS federated.test;
+CREATE TABLE federated.test (
+  `i` int(11) NOT NULL,
+  `j` int(11) NOT NULL,
+  `c` varchar(30) default NULL,
+  PRIMARY KEY  (`i`,`j`),
+  UNIQUE KEY `i` (`i`,`c`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+--enable_warnings
+
+connection master;
+--disable_warnings
+DROP TABLE IF EXISTS federated.test1;
+DROP TABLE IF EXISTS federated.test2;
+--enable_warnings
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table federated.test1 (
+        i int not null,
+        j int not null,
+        c varchar(30),
+        primary key (i,j),
+        unique key (i, c))
+engine = federated
+connection='mysql://root@stripped:$SLAVE_MYPORT/federated/test';
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table federated.test2 (
+        i int default null,
+        j int not null,
+        c varchar(30),
+        key (i))
+engine = federated
+connection='mysql://root@stripped:$SLAVE_MYPORT/federated/test';
+drop table federated.test1, federated.test2;
+
+connection slave;
+drop table federated.test;
+
 source include/federated_cleanup.inc;

--- 1.26/sql/ha_federated.h	2006-07-25 18:38:16 -04:00
+++ 1.27/sql/ha_federated.h	2006-07-25 18:38:16 -04:00
@@ -196,7 +196,9 @@
     /* fix server to be able to get remote server table flags */
     return (HA_NOT_EXACT_COUNT |
             HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED | HA_REC_NOT_IN_SEQ |
-            HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS| HA_NO_PREFIX_CHAR_KEYS);
+            HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS| HA_NO_PREFIX_CHAR_KEYS |
+	    HA_NULL_IN_KEY
+	);
   }
   /*
     This is a bitmap of flags that says how the storage engine
Thread
bk commit into 5.0 tree (pgalbraith:1.2238) BUG#15133Patrick Galbraith26 Jul