Bug #82470 Expression is always true
Submitted: 5 Aug 2016 9:10 Modified: 5 Aug 2016 13:28
Reporter: Павел Гусев Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: bug, code defect, expression issues

[5 Aug 2016 9:10] Павел Гусев
Description:
We've checked your source code with AppChecker (https://npo-echelon.ru/en/solutions/appchecker.php) static analyzer and found bug:

In file:
https://github.com/mysql/mysql-server/blob/e0e0ae2ea27c9bb76577664845507ef224d362e4/sql-co...

if (str[0] != 'a' || str[0] != 'A')

This expression is always true. 
I guess it should be && instead.

How to repeat:
The bug is in the source code
[5 Aug 2016 10:39] MySQL Verification Team
See https://bugs.mysql.com/bug.php?id=76913
[5 Aug 2016 13:28] MySQL Verification Team
Hi!

This bug is a duplicate of the existing bug #76913:

http://bugs.mysql.com/bug.php?id=76913

But, thanks for the report, anyway ...