From a705b669ebc504d8b0c443af303037f676a4550b Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Fri, 13 Nov 2009 12:47:46 +0000 Subject: [PATCH] Truncate requires DROP privilege since MySQL 5.1.16 and is available on DB info page git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1241 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/select.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index e537193e..92c3bab3 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -57,7 +57,7 @@ if ($_POST && !$error) { if (!$_POST["import"]) { // edit $result = true; $affected = 0; - $command = ($_POST["delete"] ? ($_POST["all"] && !$where ? "TRUNCATE " : "DELETE FROM ") : ($_POST["clone"] ? "INSERT INTO " : "UPDATE ")) . idf_escape($TABLE); + $command = ($_POST["delete"] ? "DELETE FROM " : ($_POST["clone"] ? "INSERT INTO " : "UPDATE ")) . idf_escape($TABLE); $set = array(); if (!$_POST["delete"]) { foreach ($columns as $name => $val) { //! should check also for edit or insert privileges