summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-08-27 13:09:49 +0300
committerSergei Golubchik <serg@mariadb.org>2021-05-19 22:27:27 +0200
commitc76eabfb5e39a1b0831159decd3e0b544b9ad2e3 (patch)
tree00947044367f2fb5ae9699f0a2741a58bf50ddf7 /sql/sql_base.cc
parent8e8bda7fd3a47b13c43a7ad11a23af7dc72cd784 (diff)
downloadmariadb-git-c76eabfb5e39a1b0831159decd3e0b544b9ad2e3.tar.gz
Improved storage size for Item, Field and some other classes
- Changed order of class fields to remove dead alignment space. - Changed bool fields in Item to bit fields. - Used packed enum's for some fields in common classes - Removed not used Item::rsize. - Changed some class variables from uint/int to smaller type int's. - Ensured that field_index is uint16 in all classes and functions. Fixed also that we proparly compare with NO_CACHED_FIELD_INDEX when checking if variable is not set. - Removed checking of highest bit of unireg_check (has not been used in a long time) - Fixed wrong arguments to make_cond_for_table() for join_tab_idx_arg from false to 0. One of the result was reducing the size if class Item with ~24 bytes
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 7b61f750359..583903509a6 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -6014,10 +6014,10 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name, si
Field *
find_field_in_table(THD *thd, TABLE *table, const char *name, size_t length,
- bool allow_rowid, uint *cached_field_index_ptr)
+ bool allow_rowid, uint16 *cached_field_index_ptr)
{
Field *field;
- uint cached_field_index= *cached_field_index_ptr;
+ uint16 cached_field_index= *cached_field_index_ptr;
DBUG_ENTER("find_field_in_table");
DBUG_PRINT("enter", ("table: '%s', field name: '%s'", table->alias.c_ptr(),
name));
@@ -6113,7 +6113,7 @@ find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
ignored_tables_list_t ignored_tables,
Item **ref,
bool check_privileges, bool allow_rowid,
- uint *cached_field_index_ptr,
+ uint16 *cached_field_index_ptr,
bool register_tree_change, TABLE_LIST **actual_table)
{
Field *fld;