diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php
index bee16a0f..77f05c30 100644
--- a/adminer/include/adminer.inc.php
+++ b/adminer/include/adminer.inc.php
@@ -206,11 +206,23 @@ class Adminer {
* @return string
*/
function selectQuery($query, $time) {
- global $jush;
- return "
" . h(str_replace("\n", " ", $query)) . "
($time)"
+ global $jush, $driver;
+ $return = "
" . h(str_replace("\n", " ", $query)) . "
($time)"
. (support("sql") ? " " . lang('Edit') . "" : "")
- . "
" // - required for IE9 inline edit
;
+ $print = "\n"; // required for IE9 inline edit
+ $warnings = $driver->warnings();
+ if ($warnings && $warnings->num_rows) {
+ $id = "warnings";
+ ob_start();
+ select($warnings); // select() usually needs to print a big table progressively
+ $return .= ", " . lang('Warnings') . "" . script("qsl('a').onclick = partial(toggle, '$id');", "")
+ . "$print\n" . ob_get_clean() . "
\n"
+ ;
+ } else {
+ $return .= $print;
+ }
+ return $return;
}
/** Query printed in SQL command before execution
diff --git a/changes.txt b/changes.txt
index 927f62ec..38f0cc1c 100644
--- a/changes.txt
+++ b/changes.txt
@@ -4,7 +4,7 @@ PHP <5.3 compatibility even with Elasticsearch enabled
Fully support functions in default values
Stop redirecting links via adminer.org
Support X-Forwarded-Prefix
-MySQL: Display warnings in SQL command
+MySQL: Display warnings in SQL command and select
MariaDB: Support JSON since MariaDB 10.2
PostgreSQL: Support functions
PostgreSQL: Allow editing views with uppercase letters (bug #467)