Bug #78637 Incorrect for loop condition in mysql_crawler.cc
Submitted: 30 Sep 2015 7:43 Modified: 3 Nov 2015 15:48
Reporter: Alexey Kopytov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqlpump Command-line Client Severity:S3 (Non-critical)
Version:5.7.8 OS:Any
Assigned to: CPU Architecture:Any

[30 Sep 2015 7:43] Alexey Kopytov
Description:
LLVM generates the following warning when building mysqlpump:

[ 71%] Building CXX object client/dump/CMakeFiles/mysqlpump_lib.dir/mysql_crawler.cc.o
Scanning dependencies of target sql
client/dump/mysql_crawler.cc:92:11: warning: inequality
      comparison result unused [-Wunused-comparison]
       it != db_list.end(),it_end != db_end_task_list.end(); ++it, ++it_end)
       ~~~^~~~~~~~~~~~~~~~
client/dump/mysql_crawler.cc:92:11: note: use '|=' to turn this
      inequality comparison into an or-assignment
       it != db_list.end(),it_end != db_end_task_list.end(); ++it, ++it_end)
          ^~
          |=
1 warning generated.

How to repeat:
Look at the code, build with LLVM, pay attention to warnings.

Suggested fix:
I guess the condition is supposed to be "it != db_list.end() && it_end != db_end_task_list.end()".
[30 Sep 2015 12:22] Umesh Shastry
Hello Alexey,

Thank you for the report.

Thanks,
Umesh
[3 Nov 2015 15:48] Paul Dubois
Noted in 5.7.9, 5.8.0 changelogs.

mysqlpump failed to compile with Clang.