This is not a bug, but feature request to have the option 'Enclose Export in Transaction' checked by default. In the case of views if it's not checked and something goes wrong, you end up with the temporary tables that were created for views remaining and it's quite a mess, I would like to see either it simply be checked by default, or at least a new setting for exports that you could set the default for your phpMyAdmin installation (I saw there is already a settings tab for export so it would not be a lot of work to create a new option there). Personally I think it would always be better to have it be a transaction since I doubt most people would actually want a partial import after an error but rather be able to correct the error and re-import. With the checkbox still there (certainly not advocating getting rid of it as an option) one could still uncheck and create an export that isn't wrapped in a transaction if they needed to, but I think most people would be better served with this enabled.
The option 'Enclose export in a transaction' is always unchecked when you first get to the export screen.
Operating system: Ubuntu 16.04
Web server: 2.4.18
PHP version: 7.0.13
phpMyAdmin version: 4.6.6
Browser: Firefox 51/chrome 56
Operating system: Mac OS Sierra
You can change the default for your installation using:
$cfg['Export']['sql_use_transaction'] = true;
This feature was added in 7dbba54 (#5185) and defaults to disabled as most people used MyISAM by that time where transactions are not supported. Maybe it's time to revisit this decision now...
Thanks for the quick reply!!
While I do think it would be beneficial to re-evaluate if users can control this with a default, especially now that MySQL 5.7 defaults to innodb, being able to set this in the config.inc.php file will suit my needs for now.
You make a pretty good argument for why this should be changed, I agree that we should re-examine this decision to see whether it's worth changing now.
Enclose exports in transaction by default
Signed-off-by: Michal Čihař <firstname.lastname@example.org>
I've changed the default value for 4.7.0 - I don't think this causes any harm as it's ignored on engines which do not support transactions.