mirror of
https://github.com/vrana/adminer.git
synced 2025-09-03 11:22:35 +02:00
MySQL: Do not show 'empty' enum value in strict mode
This commit is contained in:
@@ -630,6 +630,13 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
return array();
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ if (!defined("DRIVER")) {
|
||||
$row = $result->fetch_array();
|
||||
return $row[$field];
|
||||
}
|
||||
|
||||
|
||||
function quote($string) {
|
||||
return "'" . $this->escape_string($string) . "'";
|
||||
}
|
||||
@@ -305,7 +305,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
return queries($prefix . implode(",\n", $values) . $suffix);
|
||||
}
|
||||
|
||||
|
||||
function slowQuery($query, $timeout) {
|
||||
if (min_version('5.7.8', '10.1.2')) {
|
||||
if (preg_match('~MariaDB~', $this->_conn->server_info)) {
|
||||
@@ -322,7 +322,7 @@ if (!defined("DRIVER")) {
|
||||
: $idf
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function warnings() {
|
||||
$result = $this->_conn->query("SHOW WARNINGS");
|
||||
if ($result && $result->num_rows) {
|
||||
@@ -1056,6 +1056,19 @@ if (!defined("DRIVER")) {
|
||||
return get_key_vals("SHOW VARIABLES");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
static $strictMode = null;
|
||||
|
||||
if ($strictMode === null) {
|
||||
$strictMode = (bool)preg_match('~STRICT_(TRANS|ALL)_TABLES~', get_key_vals("SHOW VARIABLES LIKE 'sql_mode'")["sql_mode"]);
|
||||
}
|
||||
|
||||
return $strictMode;
|
||||
}
|
||||
|
||||
/** Get process list
|
||||
* @return array ($row)
|
||||
*/
|
||||
|
@@ -486,6 +486,13 @@ AND c_src.TABLE_NAME = " . q($table);
|
||||
return get_key_vals('SELECT name, display_value FROM v$parameter');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function process_list() {
|
||||
return get_rows('SELECT sess.process AS "process", sess.username AS "user", sess.schemaname AS "schema", sess.status AS "status", sess.wait_class AS "wait_class", sess.seconds_in_wait AS "seconds_in_wait", sql.sql_text AS "sql_text", sess.machine AS "machine", sess.port AS "port"
|
||||
FROM v$session sess LEFT OUTER JOIN v$sql sql
|
||||
|
@@ -860,6 +860,13 @@ AND typelem = 0"
|
||||
return get_key_vals("SHOW ALL");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function process_list() {
|
||||
return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . (min_version(9.2) ? "pid" : "procpid"));
|
||||
}
|
||||
|
@@ -764,6 +764,13 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
$return = array();
|
||||
foreach (get_vals("PRAGMA compile_options") as $option) {
|
||||
|
Reference in New Issue
Block a user