Changed the SQL window suggestion tool to have DELETE...WHERE 0 instead of 1.

This should help avoid accidental data loss.

Issue #12859

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
This commit is contained in:
Isaac Bennetch 2017-01-02 16:00:14 -05:00 committed by Michal Čihař
parent 9b7f4f74e9
commit 16fba839bb
2 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ phpMyAdmin - ChangeLog
- issue #12814 DateTime won't allow to input length in Routine editor
- issue #12841 Fixed moving of columns with whitespace in name
- issue #12847 Fixed editing of virtual columns
- issue #12859 Changed WHERE condition to 0 instead of 1 for SQL query window to avoid accidents
4.6.5.2 (2016-12-05)
- issue #12765 Fixed SQL export with newlines

View File

@ -1207,7 +1207,7 @@ function insertQuery(queryType)
} else if (queryType == "update") {
query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1";
} else if (queryType == "delete") {
query = "DELETE FROM `" + table + "` WHERE 1";
query = "DELETE FROM `" + table + "` WHERE 0";
}
setQuery(query);
sql_box_locked = false;