summaryrefslogtreecommitdiff
path: root/mysql-test/r/federated.result
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2007-07-18 14:03:58 -0400
committerunknown <cmiller@zippy.cornsilk.net>2007-07-18 14:03:58 -0400
commit8b8b430bbccc01717e3eb50e4e452cf415292d00 (patch)
tree85f4f5e9debc4ed02085521524dc4955d3dd11e3 /mysql-test/r/federated.result
parent37344c68f5c006c582b3f9793d7eb15102a5e807 (diff)
downloadmariadb-git-8b8b430bbccc01717e3eb50e4e452cf415292d00.tar.gz
Bug#26909: Specified key was too long; max key length is 255 bytes \
when creating table Federated tables had an artificially low maximum of key length, because the handler failed to implement a method to return it and the default value is taked from the prototype handler. Now, implement that method and return the maximum possible key length, which is that of InnoDB. mysql-test/r/federated.result: Verify that unique keys may be longer than 255 characters. mysql-test/t/federated.test: Verify that unique keys may be longer than 255 characters. sql/ha_federated.h: Implement the virtual method that tells the max size of parts to make a key. Backport the length defined in 5.1.
Diffstat (limited to 'mysql-test/r/federated.result')
-rw-r--r--mysql-test/r/federated.result37
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result
index cecffbb1471..b69ff8033d4 100644
--- a/mysql-test/r/federated.result
+++ b/mysql-test/r/federated.result
@@ -1843,6 +1843,43 @@ C3A4C3B6C3BCC39F
D18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E
drop table federated.t1;
drop table federated.t1;
+CREATE TABLE federated.t1 (
+categoryId int(11) NOT NULL AUTO_INCREMENT,
+domainId varchar(745) NOT NULL DEFAULT '',
+categoryName varchar(255) NOT NULL DEFAULT '',
+PRIMARY KEY (categoryId),
+UNIQUE KEY idx_unique_category_categoryName (domainId, categoryName),
+KEY idx_category_domainId (domainId)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+CREATE TABLE federated.t1 (
+categoryId int(11) NOT NULL AUTO_INCREMENT,
+domainId varchar(745) NOT NULL DEFAULT '',
+categoryName varchar(255) NOT NULL DEFAULT '',
+PRIMARY KEY (categoryId),
+UNIQUE KEY idx_unique_category_categoryName (domainId, categoryName),
+KEY idx_category_domainId (domainId)
+) ENGINE=FEDERATED DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
+insert into federated.t1 (domainId, categoryName) values ( '1231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231 300', '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 250');
+insert into federated.t1 (domainId, categoryName) values ( '12312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312 301', '12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 250');
+insert into federated.t1 (domainId, categoryName) values ('a', 'b');
+select categoryId from federated.t1 order by domainId, categoryName;
+categoryId
+1
+2
+3
+select categoryId from federated.t1 where domainId='a' and categoryName='b' order by categoryId;
+categoryId
+3
+select categoryId from federated.t1 where domainId='a' and categoryName='b' order by categoryId;
+categoryId
+3
+select categoryId from federated.t1 where domainId<>'a' and categoryName<>'b' order by categoryId;
+categoryId
+1
+2
+drop table federated.t1;
+drop table federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;