diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 296bab00f90e2bf62e51a9c2bad12dfc321e5fdf..8a6a3e3d8fbefa288c01f715426821706393495e 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -16813,37 +16813,6 @@ ha_innobase::get_auto_increment(
 
 	(3) It is restricted only for insert operations. */
 
-	if (increment > 1 && thd_sql_command(m_user_thd) != SQLCOM_ALTER_TABLE
-	    && autoinc < col_max_value) {
-
-		ulonglong	prev_auto_inc = autoinc;
-
-		autoinc = ((autoinc - 1) + increment - offset)/ increment;
-
-		autoinc = autoinc * increment + offset;
-
-		/* If autoinc exceeds the col_max_value then reset
-		to old autoinc value. Because in case of non-strict
-		sql mode, boundary value is not considered as error. */
-
-		if (autoinc >= col_max_value) {
-			autoinc = prev_auto_inc;
-		}
-
-		ut_ad(autoinc > 0);
-	}
-
-	/** The following logic is needed to avoid duplicate key error
-	for autoincrement column.
-
-	(1) InnoDB gives the current autoincrement value with respect
-	to increment and offset value.
-
-	(2) Basically it does compute_next_insert_id() logic inside InnoDB
-	to avoid the current auto increment value changed by handler layer.
-
-	(3) It is restricted only for insert operations. */
-
 	if (increment > 1 && thd_sql_command(m_user_thd) != SQLCOM_ALTER_TABLE
 	    && autoinc < col_max_value) {
 
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 6714cae71b86d362bf2b75ce74cc4be321362a21..770f3dc2440e673d7f8fcc76139846096b89b8a6 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -16580,37 +16580,6 @@ ha_innobase::get_auto_increment(
 
 	(3) It is restricted only for insert operations. */
 
-	if (increment > 1 && thd_sql_command(user_thd) != SQLCOM_ALTER_TABLE
-	    && autoinc < col_max_value) {
-
-		ulonglong	prev_auto_inc = autoinc;
-
-		autoinc = ((autoinc - 1) + increment - offset)/ increment;
-
-		autoinc = autoinc * increment + offset;
-
-		/* If autoinc exceeds the col_max_value then reset
-		to old autoinc value. Because in case of non-strict
-		sql mode, boundary value is not considered as error. */
-
-		if (autoinc >= col_max_value) {
-			autoinc = prev_auto_inc;
-		}
-
-		ut_ad(autoinc > 0);
-	}
-
-	/** The following logic is needed to avoid duplicate key error
-	for autoincrement column.
-
-	(1) InnoDB gives the current autoincrement value with respect
-	to increment and offset value.
-
-	(2) Basically it does compute_next_insert_id() logic inside InnoDB
-	to avoid the current auto increment value changed by handler layer.
-
-	(3) It is restricted only for insert operations. */
-
 	if (increment > 1 && thd_sql_command(user_thd) != SQLCOM_ALTER_TABLE
 	    && autoinc < col_max_value) {