Bug #89337 using Where clause in delete from statement
Submitted: 21 Jan 2018 9:58 Modified: 21 Jan 2018 19:17
Reporter: Aditya Nagpal Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.1.41-community OS:Windows
Assigned to: CPU Architecture:Any

[21 Jan 2018 9:58] Aditya Nagpal
Description:
while using 'where' in Delete from table a bug occur.

I have create a table name account.
create table account(name varchar(10));
in this table there is only one column 'name'.

then i created 1 record in it.
insert into account values('abc');
when i use select * from account it dispay 1 record.
name
abc
but when i use delete from account where name=0;
then it deleted record. how? so i think this is a bug.

How to repeat:
create table account(name varchar(10));
insert into account values('abc');
select * from account;
delete from account where name=0;

using delete from account where name=0 deletes record.
[21 Jan 2018 10:02] Aditya Nagpal
where clause in delete from command

Attachment: bug.png (image/png, text), 50.25 KiB.

[21 Jan 2018 19:17] MySQL Verification Team
Thank you for the bug report.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.60 Source distribution 2018-JAN-16

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.5 > select 'abc' = 0;
+-----------+
| 'abc' = 0 |
+-----------+
|         1 |
+-----------+
1 row in set, 1 warning (0.00 sec)

mysql 5.5 >