Comments on: “Why?” of the week https://shlomi-noach.github.io/blog/mysql/why-of-the-week Blog by Shlomi Noach Tue, 30 Jun 2009 06:38:52 +0000 hourly 1 https://wordpress.org/?v=5.3.3 By: New and Noteworthy in openark kit | code.openark.org https://shlomi-noach.github.io/blog/mysql/why-of-the-week/comment-page-1#comment-2492 Tue, 30 Jun 2009 06:38:52 +0000 https://shlomi-noach.github.io/blog/?p=720#comment-2492 […] The table must not have any ‘AFTER’ triggers defined. At current, I do not see a solution for that, the reason being that the utility needs to create those triggers as port of its mechanism, and that MySQL does not allow for atomic alteration of triggers. Also see this post. […]

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/why-of-the-week/comment-page-1#comment-1566 Tue, 14 Apr 2009 12:26:41 +0000 https://shlomi-noach.github.io/blog/?p=720#comment-1566 Sergei,

Short and fair explanation.
However, I disagree. MySQL is able to tell me about the foreign keys when asked for “SHOW CREATE TABLE“, which is exactly how I produced the above table description.
So, it is able to specify the FK, along with the constraint names. In this case, it should be able to duplicate this definition for a new table.

Regards

]]>
By: Sergei Golubchik https://shlomi-noach.github.io/blog/mysql/why-of-the-week/comment-page-1#comment-1565 Tue, 14 Apr 2009 06:58:15 +0000 https://shlomi-noach.github.io/blog/?p=720#comment-1565 “Why is that? Why wouldn’t the constraints be duplicated? No explanation is given in the manual”

This happens, of course, because CREATE TABLE … LIKE duplicates a table definition as it’s know to MySQL.

MySQL doesn’t know about foreign keys, it parses and ignores FK definitions.

]]>