Bug #26865 Dangerous: QB can delete or update ALL rows, ignoring the where clause
Submitted: 6 Mar 2007 9:45 Modified: 12 Mar 2007 10:20
Reporter: Hartmut Grosser Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.2.10 OS:Windows (WinXP )
Assigned to: Mike Lischke CPU Architecture:Any

[6 Mar 2007 9:45] Hartmut Grosser
Description:
Depending on the cursor position QB ignores the where clause of a delete or update statement so that ALL rows are deleted or updated, not only the specified.

I use QB 1.2.10 on WinXP SP2. With QB 1.2.8 this error does not occur.

How to repeat:
Example 1:
delete
from mytable
where <condition>

If you place the cursor in the 2nd line ("from mytable") before pressing CTRL-ENTER the where clause is ignored (if you place the cursor in another line, the where clause is used). You can observe, that the background of the line with the where clause becomes grey, when the cursor is in the 2nd line.

Example 2:
update mytable
set field1 = ''
where <condition>

If you place the cursor in the 2nd line ("set field1...") the background of the line with the where clause becomes grey and the where clause is ignored when pressing CTRL-ENTER.
[6 Mar 2007 10:42] MySQL Verification Team
Thank you for the bug report.
[12 Mar 2007 10:20] Mike Lischke
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html