diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index c8ed37c9..260f9e59 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -664,7 +664,7 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table) 'structured_types' => $structured_types, 'unsigned' => array(), 'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"), - 'functions' => array("len", "lower", "round", "upper"), + 'functions' => array("distinct", "len", "lower", "round", "upper"), 'grouping' => array("avg", "count", "count distinct", "max", "min", "sum"), 'edit_functions' => array( array( diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index e9596ad0..1df1ad3d 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -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) { @@ -1160,7 +1160,7 @@ if (!defined("DRIVER")) { 'structured_types' => $structured_types, 'unsigned' => array("unsigned", "zerofill", "unsigned zerofill"), ///< @var array number variants 'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"), ///< @var array operators used in select - 'functions' => array("char_length", "date", "from_unixtime", "unix_timestamp", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"), ///< @var array functions used in select + 'functions' => array("char_length", "date", "distinct", "from_unixtime", "unix_timestamp", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"), ///< @var array functions used in select 'operator_regexp' => 'REGEXP', 'grouping' => array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"), ///< @var array grouping functions used in select 'edit_functions' => array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only diff --git a/adminer/drivers/oracle.inc.php b/adminer/drivers/oracle.inc.php index 1c5b1598..8219058a 100644 --- a/adminer/drivers/oracle.inc.php +++ b/adminer/drivers/oracle.inc.php @@ -523,7 +523,7 @@ ORDER BY PROCESS 'structured_types' => $structured_types, 'unsigned' => array(), 'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"), - 'functions' => array("length", "lower", "round", "upper"), + 'functions' => array("distinct", "length", "lower", "round", "upper"), 'grouping' => array("avg", "count", "count distinct", "max", "min", "sum"), 'edit_functions' => array( array( //! no parentheses diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 4adc248e..4c6f61d4 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -911,7 +911,7 @@ AND typelem = 0" 'unsigned' => array(), 'operators' => array("=", "<", ">", "<=", ">=", "!=", "~", "~*", "!~", "!~*", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"), // no "SQL" to avoid CSRF 'operator_regexp' => '~*', - 'functions' => array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper"), + 'functions' => array("char_length", "distinct", "lower", "round", "to_hex", "to_timestamp", "upper"), 'grouping' => array("avg", "count", "count distinct", "max", "min", "sum"), 'edit_functions' => array( array( diff --git a/adminer/drivers/sqlite.inc.php b/adminer/drivers/sqlite.inc.php index e85fd31c..97531aae 100644 --- a/adminer/drivers/sqlite.inc.php +++ b/adminer/drivers/sqlite.inc.php @@ -793,7 +793,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { 'structured_types' => array_keys($types), 'unsigned' => array(), 'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"), // REGEXP can be user defined function - 'functions' => array("hex", "length", "lower", "round", "unixepoch", "upper"), + 'functions' => array("distinct", "hex", "length", "lower", "round", "unixepoch", "upper"), 'grouping' => array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"), 'edit_functions' => array( array(