mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
SHOW ENGINES is only available in PHP 4.1.2 and above (and the output
format slightly changed between 4.1 and 5.0, too), SHOW VARIABLES LIKE 'have_%' is the more portable alternative here
This commit is contained in:
@@ -64,9 +64,9 @@ class PDOTest {
|
||||
}
|
||||
|
||||
static function detect_transactional_mysql_engine($db) {
|
||||
foreach ($db->query('show engines') as $row) {
|
||||
if ($row[1] == 'YES' && ($row[0] == 'INNOBASE' || $row[0] == 'BDB')) {
|
||||
return $row[0];
|
||||
foreach ($db->query("show variables like 'have%'") as $row) {
|
||||
if ($row[1] == 'YES' && ($row[0] == 'have_innodb' || $row[0] == 'have_bdb')) {
|
||||
return str_replace("have_", "", $row[0]);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user