Could not create foreign key using MySQL ndbcluster engine

P30n posted 3 years ago in General
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.


Any plans to fix this?

ansgar posted 3 years ago
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?
P30n posted 3 years ago

It is supported since Version 7.3 (https://blogs.oracle.com/MySQL/entry/mysql_cluster_7_3_labs).
ansgar posted 2 years ago
Done in r4799
P30n posted 2 years ago
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)?
ansgar posted 2 years ago
HeidiSQL just parses the output of the "SHOW CREATE TABLE xyz" query. You could check whether the ndb cluster foreign keys show up there.
user88 posted 1 year ago
This problem seems still not solved.
I'm using latest stable HeidiSQL 9.3.0 and my database is ndbcluster 7.3.5.

I can see foreign key constrains correctly on Toad for MySQL but not on HeidiSQL. In HeidiSQL show create does not shows constraints, only index (which come from the constraints).

Thanks in advance for this light and fast tool.
user88 posted 1 year ago
[quote=ansgar][/quote] Let me know if you need more details.

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