distal-attribute
distal-attribute
distal-attribute
distal-attribute

Could not create foreign key using MySQL ndbcluster engine

User, date Message
Written by P30n
2 months ago
Category: General
3 posts since Mon, 21 Jul 14
Since 7.3 MySQL Cluster has foreign key support. Out company switched to ndbcluster and all developer using HeidiSQL for database mangement. It would be greate if it become possible to use HeidiSQL to create tables with foreign keys in the table editor.

The newest stable version says ndbcluster dont support foreign keys.

Version: 8.3.0.4694

Any plans to fix this?

Written by ansgar
2 months ago
5012 posts since Fri, 07 Apr 06
Of course, I can adjust that conditional.

I only need to know what the server version has to say in that case. So, what does SELECT VERSION() return?
Written by P30n
2 months ago
3 posts since Mon, 21 Jul 14
5.6.17-ndb-7.3.5

It is supported since Version 7.3 (https://blogs.oracle.com/MySQL/entry/mysql_cluster_7_3_labs).
Written by ansgar
2 months ago
5012 posts since Fri, 07 Apr 06
Done in r4799
Written by P30n
2 months ago
3 posts since Mon, 21 Jul 14
Nice - thank you!

Today i tried the build and i found two bugs. In the foreign fey-tab the reference table selection is empty if only ndbcluster tables exists. InnoDB tables appear but could not used in combination with ndbcluster tables (this is a mysql cluster restriction).

It works fine if i manually type in the name of the reference table - for now this is no problem for me. For some reason after the foreign key creation (the table contraints working as expected) the existing foreign key did not appear in the foreign tab (but as key in the indexes tab - which is right so far). Its not possible to edit an existing key (onDelete, onUpdate, rename and so on). Might be a problem with the query you use to retrieve all existing foreign keys for a table (not supported by mysql cluster)?
Written by ansgar
1 month ago
5012 posts since Fri, 07 Apr 06
HeidiSQL just parses the output of the "SHOW CREATE TABLE xyz" query. You could check whether the ndb cluster foreign keys show up there.
 

Please login to leave a reply, or register at first.