Permalink
Browse files

Fix SQL query history

  • Loading branch information...
1 parent 8d3afc0 commit de451010b1b11a53bb1de4de4ea70f5783ca2e43 @vrana committed Sep 7, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 adminer/sql.inc.php
View
@@ -35,7 +35,10 @@
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
$q = $query . (ereg(";[ \t\r\n]*\$", $query) ? "" : ";"); //! doesn't work with DELIMITER |
if (!$history || reset(end($history)) != $q) { // no repeated queries
+ restart_session();
$history[] = array($q, time());
+ set_session("queries", $history_all); // required because reference is unlinked by stop_session()
+ stop_session();
}
}
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\n)";

0 comments on commit de45101

Please sign in to comment.