Bug #108516 Return value of my_b_flush_io_cache(IO_CACHE*, int) not get checked
| Submitted: | 16 Sep 2022 1:50 | Modified: | 16 Sep 2022 5:58 |
|---|---|---|---|
| Reporter: | Li Zhong | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
| Version: | 8.0.21 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[16 Sep 2022 1:50]
Li Zhong
[16 Sep 2022 5:58]
MySQL Verification Team
Hello Li Zhong, Thank you for the report and feedback. regards, Umesh
[19 Sep 2022 13:24]
Tor Didriksen
Posted by developer:
my_b_flush_io_cache *does* return -1 on error
return (info->error = -1);
so the hash source code is OK.
In most other contexts we test for non-zero, with
if (flush_io_cache(&file) ...
so maybe your static analysis tool thinks this is a boolean true/false function.
Anyways, it seems better to test for non-zero, also in HashJoinChunk::Rewind()
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.