Commit fb88a02d authored by unknown's avatar unknown

bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not...

bug#24820  CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index: Merged up test 5.0 case


parent efb8265e
...@@ -839,6 +839,14 @@ create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, ...@@ -839,6 +839,14 @@ create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
CountryCode char(3) NOT NULL, CountryCode char(3) NOT NULL,
DishTitle varchar(64) NOT NULL, DishTitle varchar(64) NOT NULL,
calories smallint(5) unsigned DEFAULT NULL, calories smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (DishID),
INDEX i USING HASH (countrycode,calories)
) ENGINE=ndbcluster;
ERROR HY000: Can't create table 'test.nationaldish' (errno: 138)
create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
CountryCode char(3) NOT NULL,
DishTitle varchar(64) NOT NULL,
calories smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (DishID) PRIMARY KEY (DishID)
) ENGINE=ndbcluster; ) ENGINE=ndbcluster;
create index i on nationaldish(countrycode,calories) using hash; create index i on nationaldish(countrycode,calories) using hash;
......
...@@ -458,6 +458,15 @@ drop table t1; ...@@ -458,6 +458,15 @@ drop table t1;
# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index # bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index
--error ER_CANT_CREATE_TABLE
create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
CountryCode char(3) NOT NULL,
DishTitle varchar(64) NOT NULL,
calories smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (DishID),
INDEX i USING HASH (countrycode,calories)
) ENGINE=ndbcluster;
create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
CountryCode char(3) NOT NULL, CountryCode char(3) NOT NULL,
DishTitle varchar(64) NOT NULL, DishTitle varchar(64) NOT NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment