Commit 2ec45a26 authored by Marko Mäkelä's avatar Marko Mäkelä

dict_load_column_low(): Initialize pos. Improve documentation.

Approved by Jimmy Yang.
parent d8605104
......@@ -782,12 +782,13 @@ const char*
dict_load_column_low(
/*=================*/
dict_table_t* table, /*!< in/out: table, could be NULL
if we just polulate a dict_column_t
if we just populate a dict_column_t
struct with information from
a SYS_COLUMNS record */
mem_heap_t* heap, /*!< in/out: memory heap
for temporary storage */
dict_col_t* column, /*!< out: dict_column_t to fill */
dict_col_t* column, /*!< out: dict_column_t to fill,
or NULL if table != NULL */
dulint* table_id, /*!< out: table id */
const char** col_name, /*!< out: column name */
const rec_t* rec) /*!< in: SYS_COLUMNS record */
......@@ -800,6 +801,8 @@ dict_load_column_low(
ulint col_len;
ulint pos;
ut_ad(table || column);
if (UNIV_UNLIKELY(rec_get_deleted_flag(rec, 0))) {
return("delete-marked record in SYS_COLUMNS");
}
......@@ -827,9 +830,9 @@ err_len:
goto err_len;
}
if (!table) {
pos = mach_read_from_4(field);
} else if (UNIV_UNLIKELY(table->n_def != mach_read_from_4(field))) {
if (UNIV_UNLIKELY(table && table->n_def != pos)) {
return("SYS_COLUMNS.POS mismatch");
}
......
......@@ -109,7 +109,8 @@ dict_load_column_low(
a SYS_COLUMNS record */
mem_heap_t* heap, /*!< in/out: memory heap
for temporary storage */
dict_col_t* column, /*!< out: dict_column_t to fill */
dict_col_t* column, /*!< out: dict_column_t to fill,
or NULL if table != NULL */
dulint* table_id, /*!< out: table id */
const char** col_name, /*!< out: column name */
const rec_t* rec); /*!< in: SYS_COLUMNS record */
......
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