When importing a database with InnoDB tables, most of
the times the tables aren't sorted correctly, so that
some foreign key constrains fail.
Starting from version 3.23.52 and 4.0.3, MySQL supports
the "FOREIGN_KEY_CHECKS" variable. If this is set to 0
(zero), no checks are performed when importing a
database. This means the tables can be sorted in random
order.
This patch adds an option box in the "Export SQL"
window that indicates whether you want to disable the
foreign key check. If the option was selected, "SET
FOREIGN_KEY_CHECKS=0;" will be added to the output.
In attachement, you can find a patch against the CVS
repository.
Logged In: YES
user_id=590508
My patch did remove the spaces by performing an ltrim on
$regs before passing it to preg_replace.
Anyway, patch #5 also works, so the problem is indeed fixed.
Thanks.
Logged In: YES
user_id=192186
Yep, you're right, I missed ltrim.