← Back to team overview

maria-developers team mailing list archive

Re: Help with MDEV-4419, ENUM optimization

 

hi guys, i was trying to understand get_mm_leaf of opt_range.cc debuging
with VS 2008

but, i think that "get_mm_leaf" function, only execute when we are on a
'indexed field'

anyone know if there's a rewriter before get_mm_leaf and others index
optimization?
maybe it do something that change:
a>10 and a< 12
to
a=11

i will use it to do enum rewrite in WHERE part, like:
enum('a','b','c') not null
enum='d' => will be rewrite to 0 (impossible where)
enum!='d' => will be rewrite to 1 (always true)
enum <'b' => will be rewrite to enum in (0,1)
enum >'c' => will be rewrite to 0 (impossible where)

and others inequalities operators "LIKE", !=, <, <=, >, >=

thanks

Follow ups

References