Commit f1cc5233 authored by marko's avatar marko

dict_col_t: Reduce ord_part to one bit.

dict_index_add_to_cache(): Instead of incrementing ord_part, set it.

dict_index_remove_from_cache(): Do not touch ord_part.

dtype_t: Reduce mbminlen from 3 to 2 bits.

row_upd(): Add a UNIV_LIKELY hint around node->in_mysql_interface.
parent acd34bac
...@@ -1388,7 +1388,7 @@ dict_index_add_to_cache( ...@@ -1388,7 +1388,7 @@ dict_index_add_to_cache(
field = dict_index_get_nth_field(new_index, i); field = dict_index_get_nth_field(new_index, i);
dict_field_get_col(field)->ord_part++; dict_field_get_col(field)->ord_part = 1;
} }
/* Create an index tree memory object for the index */ /* Create an index tree memory object for the index */
...@@ -1431,9 +1431,7 @@ dict_index_remove_from_cache( ...@@ -1431,9 +1431,7 @@ dict_index_remove_from_cache(
dict_table_t* table, /* in: table */ dict_table_t* table, /* in: table */
dict_index_t* index) /* in, own: index */ dict_index_t* index) /* in, own: index */
{ {
dict_field_t* field;
ulint size; ulint size;
ulint i;
ut_ad(table && index); ut_ad(table && index);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
...@@ -1445,15 +1443,6 @@ dict_index_remove_from_cache( ...@@ -1445,15 +1443,6 @@ dict_index_remove_from_cache(
ut_ad(index->tree->tree_index); ut_ad(index->tree->tree_index);
dict_tree_free(index->tree); dict_tree_free(index->tree);
/* Decrement the ord_part counts in columns which are ordering */
for (i = 0; i < dict_index_get_n_unique(index); i++) {
field = dict_index_get_nth_field(index, i);
ut_ad(dict_field_get_col(field)->ord_part > 0);
(dict_field_get_col(field)->ord_part)--;
}
/* Remove the index from the list of indexes of the table */ /* Remove the index from the list of indexes of the table */
UT_LIST_REMOVE(indexes, table->indexes, index); UT_LIST_REMOVE(indexes, table->indexes, index);
......
...@@ -412,7 +412,7 @@ struct dtype_struct{ ...@@ -412,7 +412,7 @@ struct dtype_struct{
/* the remaining fields do not affect alphabetical ordering: */ /* the remaining fields do not affect alphabetical ordering: */
ulint mbminlen:3; /* minimum length of a character, in bytes */ ulint mbminlen:2; /* minimum length of a character, in bytes */
ulint mbmaxlen:3; /* maximum length of a character, in bytes */ ulint mbmaxlen:3; /* maximum length of a character, in bytes */
ulint len:16; /* length; for MySQL data this is ulint len:16; /* length; for MySQL data this is
......
...@@ -125,8 +125,8 @@ struct dict_col_struct{ ...@@ -125,8 +125,8 @@ struct dict_col_struct{
starting from 0) */ starting from 0) */
ulint clust_pos:10;/* position of the column in the ulint clust_pos:10;/* position of the column in the
clustered index */ clustered index */
ulint ord_part:12;/* count of how many times this column ulint ord_part:1;/* nonzero if this column appears
appears in ordering fields of an index */ in ordering fields of an index */
const char* name; /* name */ const char* name; /* name */
dtype_t type; /* data type */ dtype_t type; /* data type */
}; };
......
...@@ -1832,7 +1832,7 @@ row_upd( ...@@ -1832,7 +1832,7 @@ row_upd(
ut_ad(node && thr); ut_ad(node && thr);
if (node->in_mysql_interface) { if (UNIV_LIKELY(node->in_mysql_interface)) {
/* We do not get the cmpl_info value from the MySQL /* We do not get the cmpl_info value from the MySQL
interpreter: we must calculate it on the fly: */ interpreter: we must calculate it on the fly: */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment