NEW 9.0: enable user to use the mysqldump '--quick' option

(useful if the server has low RAM or large tables)
This commit is contained in:
Florian Mortgat 2019-12-02 16:54:05 +01:00
parent 87e81f1afd
commit 4846885eea
4 changed files with 13 additions and 1 deletions

View File

@ -211,7 +211,6 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
<div class="formelementrow"><input type="checkbox"
name="use_transaction" value="yes" id="checkbox_use_transaction" /> <label
for="checkbox_use_transaction"> <?php echo $langs->trans("UseTransactionnalMode"); ?></label>
</div>
<?php if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?>
@ -234,6 +233,14 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
<option value="ORACLE">ORACLE</option>
<option value="POSTGRESQL">POSTGRESQL</option>
</select> <br>
<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" />
<label for="checkbox_use_quick">
<?php echo $form->textwithpicto(
$langs->trans('ExportUseMySQLQuickParameter'),
$langs->trans('ExportUseMySQLQuickParameterHelp')
); ?>
</label>
<br/>
<!-- <input type="checkbox" name="drop_database" value="yes"
id="checkbox_drop_database" /> <label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
-->

View File

@ -262,6 +262,7 @@ class Utils
if (GETPOST("disable_fk", "alpha") || $usedefault) $param.=" -K";
if (GETPOST("sql_compat", "alpha") && GETPOST("sql_compat", "alpha") != 'NONE') $param.=" --compatible=".escapeshellarg(GETPOST("sql_compat", "alpha"));
if (GETPOST("drop_database", "alpha")) $param.=" --add-drop-database";
if (GETPOST("use_mysql_quick_param", "alpha"))$param.=" --quick";
if (GETPOST("sql_structure", "alpha") || $usedefault)
{
if (GETPOST("drop", "alpha") || $usedefault) $param.=" --add-drop-table=TRUE";

View File

@ -174,6 +174,8 @@ Compression=Compression
CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import
CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later
ExportCompatibility=Compatibility of generated export file
ExportUseMySQLQuickParameter=Use the --quick parameter
ExportUseMySQLQuickParameterHelp=The '--quick' parameter helps limit RAM consumption for large tables.
MySqlExportParameters=MySQL export parameters
PostgreSqlExportParameters= PostgreSQL export parameters
UseTransactionnalMode=Use transactional mode

View File

@ -174,6 +174,8 @@ Compression=Compression
CommandsToDisableForeignKeysForImport=Commande pour désactiver les clés étrangères à l'importation
CommandsToDisableForeignKeysForImportWarning=Requis si vous voulez être en mesure de restaurer votre « dump » SQL plus tard
ExportCompatibility=Compatibilité du fichier d'exportation généré
ExportUseMySQLQuickParameter=Utiliser le paramètre --quick
ExportUseMySQLQuickParameterHelp=permet de limiter la consommation de mémoire vive (utile en cas de tables volumineuses)
MySqlExportParameters=Paramètres de l'exportation MySQL
PostgreSqlExportParameters= Paramètres de l'exportation PostgreSQL
UseTransactionnalMode=Utiliser le mode transactionnel