Skip to content

Commit

Permalink
Fix auto increment export (bug #1309257).
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Sep 30, 2005
1 parent c8971b4 commit ea70777
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$

2005-09-30 Michal Čihař <michal@cihar.com>
* libraries/display_export.lib.php, libraries/export/sql.php,
db_operations.php, tbl_properties_operations.php: Fix auto increment
export (bug #1309257).

2005-09-28 Marc Delisle <lem9@users.sourceforge.net>
* tbl_alter.php, libraries/common.lib.php, /relation.lib.php:
bug #1262250, cannot change ENUM default value to empty
Expand Down
2 changes: 1 addition & 1 deletion db_operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@

<input type="checkbox" name="create_database_before_copying" value="1" id="checkbox_create_database_before_copying" style="vertical-align: middle" checked="checked" /><label for="checkbox_create_database_before_copying"><?php echo $strCreateDatabaseBeforeCopying; ?></label><br />
<input type="checkbox" name="drop_if_exists" value="true" id="checkbox_drop" style="vertical-align: middle" /><label for="checkbox_drop"><?php echo $strStrucDrop; ?></label>&nbsp;&nbsp;<br />
<input type="checkbox" name="auto_increment" value="1" id="checkbox_auto_increment" style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
<input type="checkbox" name="sql_auto_increment" value="1" id="checkbox_auto_increment" style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
<input type="checkbox" name="constraints" value="1" id="checkbox_constraints" style="vertical-align: middle" /><label for="checkbox_constraints"><?php echo $strAddConstraints; ?></label><br />
<?php
if (isset($_COOKIE) && isset($_COOKIE['pma_switch_to_new']) && $_COOKIE['pma_switch_to_new'] == 'true') {
Expand Down
2 changes: 1 addition & 1 deletion libraries/display_export.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function show_checked_option() {

&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="if_not_exists" value="1" id="checkbox_dump_if_not_exists" <?php PMA_exportCheckboxCheck('sql_if_not_exists'); ?> style="vertical-align: middle" /><label for="checkbox_dump_if_not_exists"><?php echo $strAddIfNotExists; ?></label><br />

&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="auto_increment" value="1" id="checkbox_auto_increment" <?php PMA_exportCheckboxCheck('sql_auto_increment'); ?> style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="sql_auto_increment" value="1" id="checkbox_auto_increment" <?php PMA_exportCheckboxCheck('sql_auto_increment'); ?> style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />

&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" <?php PMA_exportCheckboxCheck('sql_backquotes'); ?> style="vertical-align: middle" /><label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />

Expand Down
2 changes: 1 addition & 1 deletion libraries/export/sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
if ($result != FALSE) {
if (PMA_DBI_num_rows($result) > 0) {
$tmpres = PMA_DBI_fetch_assoc($result);
if (isset($GLOBALS['auto_increment']) && !empty($tmpres['Auto_increment'])) {
if (isset($GLOBALS['sql_auto_increment']) && !empty($tmpres['Auto_increment'])) {
$auto_increment .= ' AUTO_INCREMENT=' . $tmpres['Auto_increment'] . ' ';
}

Expand Down
2 changes: 1 addition & 1 deletion tbl_properties_operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
<input type="radio" name="what" value="dataonly" id="radio_copy_dataonly" style="vertical-align: middle" /><label for="radio_copy_dataonly"><?php echo $strDataOnly; ?></label>&nbsp;&nbsp;<br />

<input type="checkbox" name="drop_if_exists" value="true" id="checkbox_drop" style="vertical-align: middle" /><label for="checkbox_drop"><?php echo $strStrucDrop; ?></label>&nbsp;&nbsp;<br />
<input type="checkbox" name="auto_increment" value="1" id="checkbox_auto_increment" style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
<input type="checkbox" name="sql_auto_increment" value="1" id="checkbox_auto_increment" style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
<?php
// display "Add constraints" choice only if there are
// foreign keys
Expand Down

0 comments on commit ea70777

Please sign in to comment.