File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/code/core/Mage/ImportExport/Model/Resource/Helper Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ public function getMaxDataSize()
56
56
public function getNextAutoincrement ($ tableName )
57
57
{
58
58
$ adapter = $ this ->_getReadAdapter ();
59
- $ this ->setInformationSchemaStatsExpiry ();
59
+ try {
60
+ $ this ->setInformationSchemaStatsExpiry ();
61
+ } catch (Exception $ e ) {
62
+ //this will throw an exception for < mysql8
63
+ }
60
64
$ entityStatus = $ adapter ->showTableStatus ($ tableName );
61
65
if (empty ($ entityStatus ['Auto_increment ' ])) {
62
66
Mage::throwException (Mage::helper ('importexport ' )->__ ('Cannot get autoincrement value ' ));
@@ -70,7 +74,6 @@ public function getNextAutoincrement($tableName)
70
74
public function setInformationSchemaStatsExpiry ()
71
75
{
72
76
if (!self ::$ instantInformationSchemaStatsExpiry ) {
73
- // Set information_schema_stats_expiry to 0
74
77
$ this ->_getReadAdapter ()->query ('SET information_schema_stats_expiry = 0; ' );
75
78
self ::$ instantInformationSchemaStatsExpiry = true ;
76
79
}
You can’t perform that action at this time.
0 commit comments