We want to use Bison stack more efficiently and pass more structures through the stack instead of using Lex members.
In particular, we want to get rid of Lex->charset. This change is really overdue.
To be able to do this, we want to pass through the Bison stack a structure with data type handler and its basic attributes, consisting of the following four members:
This structure should fit into the Bison variable limitation (see sql_yacc.yy):
Currently this structure would not fit because Lex_length_and_dec_st consists of two pointers and therefore occupies 16 bytes (on 64bit platforms):
Let's reduce the size of Lex_length_and_dec_st from current 16 bytes as follows:
After this change, the future structure consisting of the four fields (mentioned above) will occupy 24 bytes:
Note, this task is only about changing Lex_length_and_dec_st. The new structure (with handler, charset, length and dec) will be added later, under terms of a separate task.