Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Adds AUTO_INCREMENT value while copying table. Fixes bug #4079 #675

wants to merge 1 commit into from

2 participants


The $GLOBALS['sql_auto_increment'] was not set to the appropriate value during the copy table procedure.
Replaced it with $_POST['sql_auto_increment'].

Let me know if this is the correct way to access the value of sql_auto_increment, so that I can modify the code accordingly if required.

@lem9 lem9 was assigned

Thanks for the fix. I have tested and the bug also happens in the QA_4_0 branch (current version), so could you prepare a pull request for QA_4_0 instead?

Also, you might have noticed that this pull request fails to pass the test suite, can you have a look at the Travis report and modify the test suite accordingly?

Closing for now.

@lem9 lem9 closed this

Okay. I will see why it fails to pass the test suite and modify the test suite accordingly.

Will try to create a pull request for the QA_4_0 branch instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
2  libraries/Util.class.php
@@ -2656,7 +2656,7 @@ public static function getCheckbox($html_field_name, $label, $checked, $onclick)
* @param boolean $escape_label whether to use htmlspecialchars() on label
* @param string $class enclose each choice with a div of this class
- * @return string set of html radio fiels
+ * @return string set of html radio fields
public static function getRadioFields(
$html_field_name, $choices, $checked_choice = '',
2  libraries/plugins/export/ExportSql.class.php
@@ -1027,7 +1027,7 @@ public function getTableDef(
// in SHOW CREATE TABLE so we'll remove it below
// It's required for Drizzle because SHOW CREATE TABLE uses
// the value from table's creation time
- if (isset($GLOBALS['sql_auto_increment'])
+ if (isset($_POST['sql_auto_increment'])
&& ! empty($tmpres['Auto_increment'])
) {
$auto_increment .= ' AUTO_INCREMENT='
Something went wrong with that request. Please try again.