Commit d0631476 authored by marko's avatar marko

branches/zip: Minor cleanup.

dict_find_index_by_max_id(): Rename this static function to its
only caller, dict_table_get_index_by_max_id().

dict_table_get_index_by_max_id(): Copy the function comment from
dict_find_index_by_max_id().
parent ff9f1a14
......@@ -2016,13 +2016,13 @@ next_rec:
return(NULL);
}
/*************************************************************************
Tries to find an index whose fields match exactly, in the same order. If
more than one index is found then return the index with the higher id.*/
static
/**************************************************************************
Returns an index object by matching on the name and column names and
if more than one index matches return the index with the max id */
dict_index_t*
dict_find_index_by_max_id(
/*======================*/
dict_table_get_index_by_max_id(
/*===========================*/
/* out: matching index, NULL if not found */
dict_table_t* table, /* in: table */
const char* name, /* in: the index name to find */
......@@ -4443,23 +4443,6 @@ dict_table_get_index_on_name_and_min_id(
}
/**************************************************************************
Returns an index object by matching on the name and column names and
if more than one index matches return the index with the max id */
dict_index_t*
dict_table_get_index_by_max_id(
/*===========================*/
/* out: index, NULL if does not exist */
dict_table_t* table, /* in: table */
const char* name, /* in: index name to find*/
const char** column_names, /* in: column names to match */
ulint n_cols) /* in: number of columns */
{
/* Find an exact match with the passed in index */
return(dict_find_index_by_max_id(table, name, column_names, n_cols));
}
#ifdef UNIV_DEBUG
/**************************************************************************
Check for duplicate index entries in a table [using the index name] */
......
......@@ -426,10 +426,10 @@ more than index is found return the index with the higher id.*/
dict_index_t*
dict_table_get_index_by_max_id(
/*===========================*/
/* out: index, NULL if does not exist */
/* out: matching index, NULL if not found */
dict_table_t* table, /* in: table */
const char* name, /* in: index name to find*/
const char** column_names, /* in: column names to match */
const char* name, /* in: the index name to find */
const char** columns,/* in: array of column names */
ulint n_cols);/* in: number of columns */
/**************************************************************************
Returns a column's name. */
......
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