in reply to Re: DBI/MySQL/MariaDB clone tables across DB Connections
in thread DBI/MySQL/MariaDB clone tables across DB Connections

For the records:

> I would go the route of dumping things to files and then importing from files,

I just had to go the execute_for_fetch route for yet another project, and it's surprisingly fast, thanks for that! :)

But ...

> since that allows better granularity in the sense that either a table is imported completely or not at all.

When dealing with MySQL or MariaDB this depends on the engine used, since I get an array of potential errors returned from execute_for_fetch ...

On InnoDB I can then decide to either ->commit or ->rollback and this works fine.

But on MyISAM transactions and rollbacks are not supported.

There I have to go the route of using intermediate temporary tables to be safe(r).

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: DBI/MySQL/MariaDB clone tables across DB Connections
by Bod (Parson) on Apr 06, 2023 at 21:44 UTC
    But on MyISAM transactions and rollbacks are not supported

    They are also quite old and can be unstable. I never did find out why but I had some intermittent data loss from MyISAM so I am now using Aria tables instead, or InnoDB if I really need to enforce referrential integrity (which is rare).

    The only downside I have found with the Aria storage engine is that MySQL Workbench doesn't recognise them so can't generate forward engineered code. But that has the positive of improving my DDL familiarity which had got very rusty!

      > They are also quite old and can be unstable.

      I'm not the one to decide how my client wants to footgun himself despite my warnings ... =)

      Cheers Rolf
      (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
      Wikisyntax for the Monastery