From f5a02f0eca2eaecce2f19f977caf15217faa3140 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Thu, 20 Aug 2015 10:30:44 +0530 Subject: [PATCH] sql_auto_increment is about auto increment value Signed-off-by: Madhura Jayaratne --- libraries/plugins/export/ExportSql.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index 5a121bcb35..d8fc15f8a4 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -1687,15 +1687,17 @@ class ExportSql extends ExportPlugin } // Generating auto-increment-related query. - if ((isset($GLOBALS['sql_auto_increment'])) - && (! empty($auto_increment)) + if ((! empty($auto_increment)) && ($update_indexes_increments) && ($statement->entityOptions->has('AUTO_INCREMENT') !== false) ) { $sql_auto_increments_query = $alter_header . - $crlf . ' MODIFY ' . implode(',' . $crlf . ' MODIFY ', $auto_increment) . - ', AUTO_INCREMENT=' . $statement->entityOptions->has('AUTO_INCREMENT') - . $alter_footer; + $crlf . ' MODIFY ' . implode(',' . $crlf . ' MODIFY ', $auto_increment); + if (isset($GLOBALS['sql_auto_increment'])) { + $sql_auto_increments_query .= ', AUTO_INCREMENT=' + . $statement->entityOptions->has('AUTO_INCREMENT'); + } + $sql_auto_increments_query .= $alter_footer; $sql_auto_increments = $this->generateComment( $crlf, $sql_auto_increments,