-
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.
Sergey Glukhov authoredThere 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