New: Add option to not set LOCK commands around INSERT into database

mysql dump.
This commit is contained in:
Laurent Destailleur 2012-02-09 23:07:58 +01:00
parent 1e4efb9e16
commit f87b3be5d2
4 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -112,6 +112,7 @@ $label=getStaticMember($db, 'label');
if (! empty($conf->global->MAIN_FEATURES_LEVEL))
{
?>
<br>
<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />
<label for="radio_dump_mysql">MySQL Dump (php) <?php print img_warning('Backup can\'t be guaranted with this method. Prefer previous one'); ?></label>
</div>
@ -208,6 +209,10 @@ $label=getStaticMember($db, 'label');
id="checkbox_dump_extended_ins" /> <label
for="checkbox_dump_extended_ins"> <?php echo $langs->trans("ExtendedInsert"); ?></label><br>
<input type="checkbox" name="disable-add-locks" value="no"
id="checkbox_dump_disable-add-locks" /> <label
for="checkbox_dump_disable-add-locks"> <?php echo $langs->trans("NoLockBeforeInsert"); ?></label><br>
<input type="checkbox" name="delayed" value="yes"
id="checkbox_dump_delayed" /> <label for="checkbox_dump_delayed"> <?php echo $langs->trans("DelayedInsert"); ?></label><br>

View File

@ -120,6 +120,7 @@ if ($what == 'mysql')
{
$param.=" -t";
}
if ($_POST["disable-add-locks"]) $param.=" --add-locks=FALSE";
if ($_POST["sql_data"])
{
$param.=" --tables";

View File

@ -166,6 +166,7 @@ AddDropTable=Add DROP TABLE command
Datas=Data
NameColumn=Name columns
ExtendedInsert=Extended INSERT
NoLockBeforeInsert=No lock commands around INSERT
DelayedInsert=Delayed insert
EncodeBinariesInHexa=Encode binary data in hexadecimal
IgnoreDuplicateRecords=Ignore errors of duplicate records (INSERT IGNORE)

View File

@ -167,6 +167,7 @@ AddDropTable= Ajouter ordres DROP TABLE
Datas= Données
NameColumn= Nomme les colonnes
ExtendedInsert= Instructions INSERT étendues
NoLockBeforeInsert=Pas d'instruction LOCK autour des INSERT
DelayedInsert= Insertion avec délai
EncodeBinariesInHexa= Encoder les champs binaires en hexadécimal
IgnoreDuplicateRecords=Ignorer les erreurs de doublons (INSERT IGNORE)