• Alexander Barkov's avatar
    A cleanup (to fix ASAN problem) for MDEV-19863 Add const to TYPELIB pointers · b3161bd9
    Alexander Barkov authored
    In this statement:
    
      (uint *) thd->alloc(sizeof(uint) * field->interval->count+1);
    
    parentheses around the '+' operator were missing. So too few memory
    was allocated, which caused ASAN builds to fail on these tests:
    
      innodb.innodb-ucs2
      parts.part_ctype_utf32
      main.mix2_myisam_ucs2
      main.case
      main.ctype_ucs
      main.ctype_utf16
      main.ctype_utf16_uca
      main.ctype_utf16le
    
    Fixed to a correct version with parentheses:
    
      (uint *) thd->alloc(sizeof(uint) * (field->interval->count+1));
    b3161bd9
unireg.cc 32.7 KB