1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-19 12:51:27 +02:00

improved kill command support for MySQL and initial support for PgSQL

This commit is contained in:
Bernhard J. M. Gruen
2015-03-18 10:34:35 +01:00
committed by Jakub Vrana
parent c5a7174a2a
commit 3289eca040
5 changed files with 28 additions and 6 deletions

View File

@@ -1015,6 +1015,16 @@ if (!defined("DRIVER")) {
return !preg_match("~scheme|sequence|type|view_trigger" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature);
}
function kill_process($val) {
return queries("KILL " . number($val));
}
function max_connections() {
global $connection;
return $connection->result("SELECT @@max_connections");
}
$id_name = "Id";
$jush = "sql"; ///< @var string JUSH identifier
$types = array(); ///< @var array ($type => $maximum_unsigned_length, ...)
$structured_types = array(); ///< @var array ($description => array($type, ...), ...)

View File

@@ -631,9 +631,19 @@ AND typelem = 0"
function support($feature) {
global $connection;
return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . ($connection->server_info >= 9.3 ? 'materializedview|' : '') . 'scheme|processlist|sequence|trigger|type|variables|drop_col)$~', $feature); //! routine|
return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . ($connection->server_info >= 9.3 ? 'materializedview|' : '') . 'scheme|processlist|sequence|trigger|type|variables|drop_col|kill)$~', $feature); //! routine|
}
function kill_process($val) {
return queries("SELECT pg_terminate_backend(" . number($val).")");
}
function max_connections() {
global $connection;
return $connection->result("SHOW max_connections");
}
$id_name = "pid";
$jush = "pgsql";
$types = array();
$structured_types = array();