| Bug #77023 | Do not check for several conditions at once in a single ndbrequire | ||
|---|---|---|---|
| Submitted: | 13 May 2015 11:09 | Modified: | 22 May 2015 9:41 |
| Reporter: | Hartmut Holzgraefe | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S4 (Feature request) |
| Version: | ndb-7.4.4; any | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[22 May 2015 9:41]
MySQL Verification Team
Hello Hartmut, Thank you for the feature request! Thanks, Umesh

Description: There are quite a few cases where a ndbrequire() assertion check checks for multiple combined conditions at once, e.g.: ./src/kernel/blocks/dblqh/DblqhMain.cpp:686: ndbrequire(c_tup != 0 && c_tux != 0 && c_acc != 0 && c_lgman != 0); If such a condition fails it is next to impossible to identify what actually triggert the assertion. E.g. was c_tup zero here? Or was it c_tux? Or c_acc? Or maybe even c_lgman? How to repeat: See description Suggested fix: Split such combined assertion checks into multiple checks that only check for one possible failure each, e.g. instead of ndbrequire(c_tup != 0 && c_tux != 0 && c_acc != 0 && c_lgman != 0); do ndbrequire(c_tup != 0); ndbrequire(c_tux != 0); ndbrequire(c_acc != 0); ndbrequire(c_lgman != 0);