[MDEV-19863] Add const to TYPELIB pointers Created: 2019-06-26 Updated: 2019-07-04 Resolved: 2019-06-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | 10.5.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
In many places in the code, a const qualifier can be added to TYPELIB pointers: Members:
Return values in methods returning a TYPELIB pointer:
Related method and function parameters getting a TYPELIB pointer should also be fixed accordingly. |
| Comments |
| Comment by Alexander Barkov [ 2019-07-04 ] | ||
|
There was a bug in the patch. Fortunately ASAN found it. This patch fixes the problem
Function pack_header() in unireg.cc | ||
| Comment by Alexander Barkov [ 2019-07-04 ] | ||
|
Pushed a cleanup patch: commit b3161bd99556dae6d27823e8572f822f1de8d137 (HEAD -> 10.5, origin/HEAD, origin/10.5) A cleanup (to fix ASAN problem) for In this statement: (uint *) thd->alloc(sizeof(uint) * field->interval->count+1); parentheses around the '+' operator were missing. So too few memory innodb.innodb-ucs2 Fixed to a correct version with parentheses: (uint *) thd->alloc(sizeof(uint) * (field->interval->count+1)); |