Commit b99fbdf2 authored by marko's avatar marko

branches/zip: dict0dict.c: Minor cleanup.

dict_index_copy(): Remove the prototype, because this static function
will be defined before its first use.  Add const qualifier to "table".

dict_index_build_internal_clust(), dict_index_build_internal_non_clust():
Add const qualifier to "table".  Correct the comment about setting indexed[].
parent 97025c3a
...@@ -120,17 +120,6 @@ innobase_get_charset( ...@@ -120,17 +120,6 @@ innobase_get_charset(
void* mysql_thd); /* in: MySQL thread handle */ void* mysql_thd); /* in: MySQL thread handle */
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
/***********************************************************************
Copies fields contained in index2 to index1. */
static
void
dict_index_copy(
/*============*/
dict_index_t* index1, /* in: index to copy to */
dict_index_t* index2, /* in: index to copy from */
dict_table_t* table, /* in: table */
ulint start, /* in: first position to copy */
ulint end); /* in: last position to copy */
/*********************************************************************** /***********************************************************************
Tries to find column names for the index and sets the col field of the Tries to find column names for the index and sets the col field of the
index. */ index. */
...@@ -147,11 +136,12 @@ static ...@@ -147,11 +136,12 @@ static
dict_index_t* dict_index_t*
dict_index_build_internal_clust( dict_index_build_internal_clust(
/*============================*/ /*============================*/
/* out, own: the internal representation /* out, own: the internal
of the clustered index */ representation of the clustered
dict_table_t* table, /* in: table */ index */
dict_index_t* index); /* in: user representation of a clustered const dict_table_t* table, /* in: table */
index */ dict_index_t* index); /* in: user representation of
a clustered index */
/*********************************************************************** /***********************************************************************
Builds the internal dictionary cache representation for a non-clustered Builds the internal dictionary cache representation for a non-clustered
index, containing also system fields not defined by the user. */ index, containing also system fields not defined by the user. */
...@@ -159,11 +149,12 @@ static ...@@ -159,11 +149,12 @@ static
dict_index_t* dict_index_t*
dict_index_build_internal_non_clust( dict_index_build_internal_non_clust(
/*================================*/ /*================================*/
/* out, own: the internal representation /* out, own: the internal
of the non-clustered index */ representation of the non-clustered
dict_table_t* table, /* in: table */ index */
dict_index_t* index); /* in: user representation of a non-clustered const dict_table_t* table, /* in: table */
index */ dict_index_t* index); /* in: user representation of
a non-clustered index */
/************************************************************************** /**************************************************************************
Removes a foreign constraint struct from the dictionary cache. */ Removes a foreign constraint struct from the dictionary cache. */
static static
...@@ -1438,11 +1429,11 @@ static ...@@ -1438,11 +1429,11 @@ static
void void
dict_index_copy( dict_index_copy(
/*============*/ /*============*/
dict_index_t* index1, /* in: index to copy to */ dict_index_t* index1, /* in: index to copy to */
dict_index_t* index2, /* in: index to copy from */ dict_index_t* index2, /* in: index to copy from */
dict_table_t* table, /* in: table */ const dict_table_t* table, /* in: table */
ulint start, /* in: first position to copy */ ulint start, /* in: first position to copy */
ulint end) /* in: last position to copy */ ulint end) /* in: last position to copy */
{ {
dict_field_t* field; dict_field_t* field;
ulint i; ulint i;
...@@ -1516,11 +1507,12 @@ static ...@@ -1516,11 +1507,12 @@ static
dict_index_t* dict_index_t*
dict_index_build_internal_clust( dict_index_build_internal_clust(
/*============================*/ /*============================*/
/* out, own: the internal representation /* out, own: the internal
of the clustered index */ representation of the clustered
dict_table_t* table, /* in: table */ index */
dict_index_t* index) /* in: user representation of a clustered const dict_table_t* table, /* in: table */
index */ dict_index_t* index) /* in: user representation of
a clustered index */
{ {
dict_index_t* new_index; dict_index_t* new_index;
dict_field_t* field; dict_field_t* field;
...@@ -1625,7 +1617,7 @@ dict_index_build_internal_clust( ...@@ -1625,7 +1617,7 @@ dict_index_build_internal_clust(
/* Remember the table columns already contained in new_index */ /* Remember the table columns already contained in new_index */
indexed = mem_zalloc(table->n_cols * sizeof *indexed); indexed = mem_zalloc(table->n_cols * sizeof *indexed);
/* Mark with 0 the table columns already contained in new_index */ /* Mark the table columns already contained in new_index */
for (i = 0; i < new_index->n_def; i++) { for (i = 0; i < new_index->n_def; i++) {
field = dict_index_get_nth_field(new_index, i); field = dict_index_get_nth_field(new_index, i);
...@@ -1668,11 +1660,12 @@ static ...@@ -1668,11 +1660,12 @@ static
dict_index_t* dict_index_t*
dict_index_build_internal_non_clust( dict_index_build_internal_non_clust(
/*================================*/ /*================================*/
/* out, own: the internal representation /* out, own: the internal
of the non-clustered index */ representation of the non-clustered
dict_table_t* table, /* in: table */ index */
dict_index_t* index) /* in: user representation of a non-clustered const dict_table_t* table, /* in: table */
index */ dict_index_t* index) /* in: user representation of
a non-clustered index */
{ {
dict_field_t* field; dict_field_t* field;
dict_index_t* new_index; dict_index_t* new_index;
...@@ -1710,7 +1703,7 @@ dict_index_build_internal_non_clust( ...@@ -1710,7 +1703,7 @@ dict_index_build_internal_non_clust(
/* Remember the table columns already contained in new_index */ /* Remember the table columns already contained in new_index */
indexed = mem_zalloc(table->n_cols * sizeof *indexed); indexed = mem_zalloc(table->n_cols * sizeof *indexed);
/* Mark with 0 table columns already contained in new_index */ /* Mark the table columns already contained in new_index */
for (i = 0; i < new_index->n_def; i++) { for (i = 0; i < new_index->n_def; i++) {
field = dict_index_get_nth_field(new_index, i); field = dict_index_get_nth_field(new_index, i);
......
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