Skip to content
  • Sergey Glukhov's avatar
    53807130
    Bug#27660560 RECENT REGRESSION: CRASH IN CHECK_COVERING_PREFIX_KEYS. · 53807130
    Sergey Glukhov authored
    There are three problems in Item_func_like::check_covering_prefix_keys:
    
    -Missing check for null value after val_str() call, added.
    
    -Missing chech for THD::error after val_str() call, added.
    
    -Calculation of the const part length of the wild pattern.
     It was calculated using prefix_length * wild_str->charset()->mbmaxlen,
     where prefix_length is number of characters. Then it compared with
     KEY_PART_INF::length mesured in bytes. It does not work properly
     for BLOB fields if wild_str->charset()->mbmaxlen is bigger than 1.
     Now prefix_length is passed to TABLE::update_covering_prefix_keys()
     and KEY_PART_INF::length is divided by mbmaxlen of the Field chararcter
     set.
    53807130
    Bug#27660560 RECENT REGRESSION: CRASH IN CHECK_COVERING_PREFIX_KEYS.
    Sergey Glukhov authored
    There are three problems in Item_func_like::check_covering_prefix_keys:
    
    -Missing check for null value after val_str() call, added.
    
    -Missing chech for THD::error after val_str() call, added.
    
    -Calculation of the const part length of the wild pattern.
     It was calculated using prefix_length * wild_str->charset()->mbmaxlen,
     where prefix_length is number of characters. Then it compared with
     KEY_PART_INF::length mesured in bytes. It does not work properly
     for BLOB fields if wild_str->charset()->mbmaxlen is bigger than 1.
     Now prefix_length is passed to TABLE::update_covering_prefix_keys()
     and KEY_PART_INF::length is divided by mbmaxlen of the Field chararcter
     set.
Loading