[MDEV-29154] Excessive warnings upon a call to RANDOM_BYTES Created: 2022-07-22 Updated: 2022-07-31 Resolved: 2022-07-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.10.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
I am not setting it to critical 10.10v1 to avoid it blocking the release, but it would be good to look into this. Not only does it cause an untidy output with a long list of duplicate warnings, but also my concern is that it may indicate some redundancy in the way the function is executed.
The CAST alone only produces one warning, as expected:
If random_bytes is replaced by another function, no extra warnings are produced (although I didn't try all functions, so maybe random_bytes is not unique in this sense):
|
| Comments |
| Comment by Daniel Black [ 2022-07-23 ] | ||||||||||||||||||||||||||||||||||
|
Have brought the 5 warnings back to a standard 2 consistent with sha2 and format that also call args[x]->val_int() in ::fix_length_and_dec and ::val_str.
Not a complete solution, but a little more palatable. I think I need a bit of advice how to avoid this in the Item hierarchy with caching or otherwise. | ||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-07-25 ] | ||||||||||||||||||||||||||||||||||
|
nikitamalyavin, since you've been drawn back to the discussion here in elenst if that approach is ok, I guess the other sha2/format can get a similar fix. Related to the original 5 warnings by putting function calls in MY_(MAX|MIN) there's other (git grep -A 1 'MY_M[AI][XN]') non-simple args used, Attempting to solve at high level:
| ||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-07-27 ] | ||||||||||||||||||||||||||||||||||
|
Fixed enough thanks serg. Reducing double warnings generally should be its own task. |