From 31c54744009fde1cefebe875fe8859a706f15668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 4 Jun 2003 11:48:15 +0000 Subject: [PATCH] Use TRUNCATE when using MySQL 4 (bug #748792). --- ChangeLog | 3 +++ mult_submits.inc.php3 | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 323da310f..9cdd5671f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-06-04 Michal Cihar + * mult_submits.inc.php3: Use TRUNCATE when using MySQL 4 (bug #748792). + 2003-06-03 Marc Delisle * lang/spanish: Updates, thanks to Dr. med. Daniel Hinostroza C. * lang/slovak update, thanks to Lubos Klokner diff --git a/mult_submits.inc.php3 b/mult_submits.inc.php3 index 861f40a4c..f33f94219 100644 --- a/mult_submits.inc.php3 +++ b/mult_submits.inc.php3 @@ -196,8 +196,12 @@ else if ($mult_btn == $strYes) { break; case 'empty_tbl': - $a_query = 'DELETE FROM ' - . PMA_backquote(urldecode($selected[$i])); + if (PMA_MYSQL_INT_VERSION >= 40000) { + $a_query .= 'TRUNCATE '; + } else { + $a_query .= 'DELETE FROM '; + } + $a_query .= PMA_backquote(htmlspecialchars(urldecode($selected[$i]))) break; case 'drop_fld':