mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 17:44:07 +02:00
MySQL: Drop support for MySQL 4
This commit is contained in:
@@ -444,10 +444,7 @@ if (!defined('Adminer\DRIVER')) {
|
|||||||
// SHOW DATABASES can take a very long time so it is cached
|
// SHOW DATABASES can take a very long time so it is cached
|
||||||
$return = get_session("dbs");
|
$return = get_session("dbs");
|
||||||
if ($return === null) {
|
if ($return === null) {
|
||||||
$query = (min_version(5)
|
$query = "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA ORDER BY SCHEMA_NAME"; // SHOW DATABASES can be disabled by skip_show_database
|
||||||
? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA ORDER BY SCHEMA_NAME"
|
|
||||||
: "SHOW DATABASES"
|
|
||||||
); // SHOW DATABASES can be disabled by skip_show_database
|
|
||||||
$return = ($flush ? slow_query($query) : get_vals($query));
|
$return = ($flush ? slow_query($query) : get_vals($query));
|
||||||
restart_session();
|
restart_session();
|
||||||
set_session("dbs", $return);
|
set_session("dbs", $return);
|
||||||
@@ -522,11 +519,7 @@ if (!defined('Adminer\DRIVER')) {
|
|||||||
* @return array [$name => $type]
|
* @return array [$name => $type]
|
||||||
*/
|
*/
|
||||||
function tables_list() {
|
function tables_list() {
|
||||||
return get_key_vals(
|
return get_key_vals("SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME");
|
||||||
min_version(5)
|
|
||||||
? "SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME"
|
|
||||||
: "SHOW TABLES"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Count tables in all databases
|
/** Count tables in all databases
|
||||||
@@ -550,7 +543,7 @@ if (!defined('Adminer\DRIVER')) {
|
|||||||
$return = array();
|
$return = array();
|
||||||
foreach (
|
foreach (
|
||||||
get_rows(
|
get_rows(
|
||||||
$fast && min_version(5)
|
$fast
|
||||||
? "SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
|
? "SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
|
||||||
: "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
|
: "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
|
||||||
) as $row
|
) as $row
|
||||||
@@ -705,7 +698,7 @@ if (!defined('Adminer\DRIVER')) {
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function information_schema($db) {
|
function information_schema($db) {
|
||||||
return (min_version(5) && $db == "information_schema")
|
return ($db == "information_schema")
|
||||||
|| (min_version(5.5) && $db == "performance_schema");
|
|| (min_version(5.5) && $db == "performance_schema");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1184,7 +1177,7 @@ if (!defined('Adminer\DRIVER')) {
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function support($feature) {
|
function support($feature) {
|
||||||
return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . (min_version(8) ? "" : "|descidx" . (min_version(5.1) ? "" : "|event|partitioning" . (min_version(5) ? "" : "|routine|trigger|view"))) . (min_version('8.0.16', '10.2.1') ? "" : "|check") . "~", $feature);
|
return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . (min_version(8) ? "" : "|descidx" . (min_version(5.1) ? "" : "|event|partitioning")) . (min_version('8.0.16', '10.2.1') ? "" : "|check") . "~", $feature);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Kill a process
|
/** Kill a process
|
||||||
|
@@ -3,6 +3,7 @@ Speed up with disabled output buffering
|
|||||||
Don't autofocus computed fields in insert form
|
Don't autofocus computed fields in insert form
|
||||||
Skip generated columns in multi-edit (bug #882)
|
Skip generated columns in multi-edit (bug #882)
|
||||||
MySQL: Display generated value in table structure
|
MySQL: Display generated value in table structure
|
||||||
|
MySQL: Drop support for MySQL 4
|
||||||
PostgreSQL: Compute size of all databases (bug #881)
|
PostgreSQL: Compute size of all databases (bug #881)
|
||||||
PostgreSQL: Do not alter indexes with expressions
|
PostgreSQL: Do not alter indexes with expressions
|
||||||
PostgreSQL: Fix export of indexes with expressions (bug #768)
|
PostgreSQL: Fix export of indexes with expressions (bug #768)
|
||||||
|
Reference in New Issue
Block a user