File tree 1 file changed +13
-4
lines changed
app/code/Magento/ImportExport/Model/ResourceModel 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,20 @@ public function getMaxDataSize()
53
53
public function getNextAutoincrement ($ tableName )
54
54
{
55
55
$ connection = $ this ->getConnection ();
56
- $ entityStatus = $ connection ->showTableStatus ($ tableName );
57
-
58
- if (empty ($ entityStatus ['Auto_increment ' ])) {
56
+ $ sql = sprintf (
57
+ 'SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = %s AND TABLE_SCHEMA = DATABASE() ' ,
58
+ $ this ->quote ($ tableName ),
59
+ $ fromDbName
60
+ );
61
+ $ entityStatus = $ connection ->fetchRow ($ sql );
62
+ if (empty ($ entityStatus ['AUTO_INCREMENT ' ]))
63
+ {
59
64
throw new \Magento \Framework \Exception \LocalizedException (__ ('Cannot get autoincrement value ' ));
60
65
}
61
- return $ entityStatus ['Auto_increment ' ];
66
+
67
+ return $ entityStatus ['AUTO_INCREMENT ' ];
68
+
69
+
70
+
62
71
}
63
72
}
You can’t perform that action at this time.
0 commit comments