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
1.2216 06/07/11 23:01:31 patg@stripped +3 -0
BUG #15133 unique index with nullable value not accepted in federated table
Added table flag to ha_federated.h to fix this, see file commit comments.
sql/ha_federated.h
1.27 06/07/11 23:01:23 patg@stripped +2 -1
BUG #15133
Added HA_NULL_IN_KEY to allow for index with nullable value
mysql-test/t/federated.test
1.29 06/07/11 23:01:23 patg@stripped +45 -0
BUG #15133
New test for testing if nullable indexes work
mysql-test/r/federated.result
1.33 06/07/11 23:01:23 patg@stripped +27 -0
BUG #15133
New test results for testing if the fix works
# 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: patg
# Host: govinda.patg.net
# Root: /home/patg/mysql-build/mysql-5.0-engines-bug15133
--- 1.32/mysql-test/r/federated.result 2006-07-05 17:26:10 -07:00
+++ 1.33/mysql-test/r/federated.result 2006-07-11 23:01:23 -07:00
@@ -1705,6 +1705,33 @@
2 0
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.28/mysql-test/t/federated.test 2006-07-05 17:26:10 -07:00
+++ 1.29/mysql-test/t/federated.test 2006-07-11 23:01:23 -07:00
@@ -1384,4 +1384,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-06-28 12:18:14 -07:00
+++ 1.27/sql/ha_federated.h 2006-07-11 23:01:23 -07:00
@@ -196,7 +196,8 @@
/* 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 (patg:1.2216) BUG#15133 | Patrick Galbraith | 14 Jul |