Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
+16
-2
@@ -209,13 +209,27 @@ class DbPDOCore extends Db
|
|||||||
|
|
||||||
if (strtolower($engine) == 'innodb')
|
if (strtolower($engine) == 'innodb')
|
||||||
{
|
{
|
||||||
|
$value = 0;
|
||||||
|
|
||||||
$sql = 'SHOW VARIABLES WHERE Variable_name = \'have_innodb\'';
|
$sql = 'SHOW VARIABLES WHERE Variable_name = \'have_innodb\'';
|
||||||
$result = $link->query($sql);
|
$result = $link->query($sql);
|
||||||
if (!$result)
|
if (!$result)
|
||||||
return 4;
|
$value = 4;
|
||||||
$row = $result->fetch();
|
$row = $result->fetch();
|
||||||
if (!$row || strtolower($row['Value']) != 'yes')
|
if (!$row || strtolower($row['Value']) != 'yes')
|
||||||
return 4;
|
$value = 4;
|
||||||
|
|
||||||
|
/* MySQL >= 5.6 */
|
||||||
|
$sql = 'SHOW ENGINES';
|
||||||
|
$result = $link->query($sql);
|
||||||
|
while ($row = $result->fetch())
|
||||||
|
if ($row['Engine'] == 'InnoDB')
|
||||||
|
{
|
||||||
|
if (in_array($row['Support'], array('DEFAULT', 'YES')))
|
||||||
|
$value = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
}
|
}
|
||||||
unset($link);
|
unset($link);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+16
-2
@@ -168,13 +168,27 @@ class MySQLCore extends Db
|
|||||||
|
|
||||||
if (strtolower($engine) == 'innodb')
|
if (strtolower($engine) == 'innodb')
|
||||||
{
|
{
|
||||||
|
$value = 0;
|
||||||
|
|
||||||
$sql = 'SHOW VARIABLES WHERE Variable_name = \'have_innodb\'';
|
$sql = 'SHOW VARIABLES WHERE Variable_name = \'have_innodb\'';
|
||||||
$result = mysql_query($sql);
|
$result = mysql_query($sql);
|
||||||
if (!$result)
|
if (!$result)
|
||||||
return 4;
|
$value = 4;
|
||||||
$row = mysql_fetch_assoc($result);
|
$row = mysql_fetch_assoc($result);
|
||||||
if (!$row || strtolower($row['Value']) != 'yes')
|
if (!$row || strtolower($row['Value']) != 'yes')
|
||||||
return 4;
|
$value = 4;
|
||||||
|
|
||||||
|
/* MySQL >= 5.6 */
|
||||||
|
$sql = 'SHOW ENGINES';
|
||||||
|
$result = mysql_query($sql);
|
||||||
|
while ($row = mysql_fetch_assoc($result))
|
||||||
|
if ($row['Engine'] == 'InnoDB')
|
||||||
|
{
|
||||||
|
if (in_array($row['Support'], array('DEFAULT', 'YES')))
|
||||||
|
$value = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
}
|
}
|
||||||
@mysql_close($link);
|
@mysql_close($link);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user