Bug #41568 Create index HASH
Submitted: 17 Dec 2008 22:45 Modified: 18 Dec 2008 5:06
Reporter: Francesco Maisano Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S5 (Performance)
Version:5.1.24 OS:Linux (RedHat 5.2-64 bit)
Assigned to: CPU Architecture:Any

[17 Dec 2008 22:45] Francesco Maisano
Description:
I working with mysql cluster and I do not understand why this error:
Table 'nationaldish' uses an extension that doesn't exist in this MySQL version
when i create an index. 

The table is created with the follow command:
CREATE TABLE `nationaldish` (
  `DishID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `countrycode` char(3) NOT NULL,
  `DishTitle` varchar(64) NOT NULL,
  `Recipe` text,
  `calories` smallint(5) unsigned DEFAULT NULL,
  PRIMARY KEY (`DishID`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1

and i create index with this command:
create index ind on nationaldish(countrycode,calories) using hash; 

Best regards
Francesco
 

How to repeat:
This bug can be repeated creating the table and the associated index
[18 Dec 2008 5:06] Valeriy Kravchuk
This is a documented limitation. Please, read the manual, http://dev.mysql.com/doc/refman/5.1/en/create-index.html:

"For indexes on NDBCLUSTER table columns, the USING clause can be specified only for a unique index or primary key. In such cases, the USING HASH clause prevents the creation of an implicit ordered index. Without USING HASH, a statement defining a unique index or primary key automatically results in the creation of a HASH index in addition to the ordered index, both of which index the same set of columns."