Description
Steps to repro:
create table char_test(val char(10)); insert into table char_test values ('abc') select * from char_test; +----------------+ | char_test.val | +----------------+ | abc | +----------------+ select length(val) from char_test where val='abc'; +------+ | _c0 | +------+ | 10 | +------+
The problem surface when CBO is enabled and query have a predicate on the char field. the filter form in this case is 'abc ' (extra padded char) of string type since this is constant comparison. for string type genericudflength will not strip the extra chars.