[MDEV-27712] Reduce the size of Lex_length_and_dec_st from 16 to 8 Created: 2022-02-01 Updated: 2022-03-23 Resolved: 2022-03-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Fix Version/s: | 10.9.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
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. |