diff options
author | malff/marcsql@weblab.(none) <> | 2007-08-28 11:16:03 -0600 |
---|---|---|
committer | malff/marcsql@weblab.(none) <> | 2007-08-28 11:16:03 -0600 |
commit | ec9b9a98aa0aff20f30bee78f14100c6baf5eff5 (patch) | |
tree | 70afad84e6412f0477286b00de5be3bd10c80368 /myisammrg/myrg_close.c | |
parent | 7a1942d2e1954a3641287cf1514d7dd77aa2351a (diff) | |
download | mariadb-git-ec9b9a98aa0aff20f30bee78f14100c6baf5eff5.tar.gz |
Bug#30625 (Performance, reduce depth for expressions)
This is a performance bug, affecting in particular the bison generated code
for the parser.
Prior to this fix, the grammar used a long chain of reduces to parse an
expression, like:
bit_expr -> bit_term
bit_term -> bit_factor
bit_factor -> value_expr
value_expr -> term
term -> factor
etc
This chain of reduces cause the internal state automaton in the generated
parser to execute more state transitions and more reduces, so that the
generated MySQLParse() function would spend a lot of time looping to execute
all the grammar reductions.
With this patch, the grammar has been reorganized so that rules are more
"flat", limiting the depth of reduces needed to parse <expr>.
Tests have been written to enforce that relative priorities and properties
of operators have not changed while changing the grammar.
See the bug report for performance data.
Diffstat (limited to 'myisammrg/myrg_close.c')
0 files changed, 0 insertions, 0 deletions