Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
"The selected table engine (<Server default>) does not support foreign keys", even though it does. #375
Steps to reproduce this issue
An error message "The selected table engine (<Server default>) does not support foreign keys" appears.
The error should not appear. I should be allowed to create my foreign keys.
Foreign key support is only present in InnoDB. It's possible to check the Support column of the
The problem is just that the previous
Could you please post the result of
I assume you looked at the "Foreign keys" tab before you even saved that table? In that case we have that "Server default" in the engine dropdown.
I think a good solution to remove that "Server default", auto-select whatever engine is the default one, and show that to the user.
When sql_mode in MySQL is set to ANSI the output of SHOW CREATE TABLE changes and no longer includes ENGINE specification for the table. Under such conditions latest version of HeidiSQL displays the "The selected table engine () does not support foreign keys" error message in the "Foreign keys" tab for an already existing table.
The older version of HeidiSQL (v. 220.127.116.1125) worked just fine under ANSI sql_mode and displayed the foreign keys correctly without any error messages.
I just removed that falsy detection of foreign key support in the table engine. Leaving it in as long as the table is being designed would have been solvable. But in ANSI mode I have no chance to detect it. Even the
If you find a better working approach then please shout.