#At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on revid:inaam.rana@strippedq05x7tbfoo
3111 Marko Mäkelä 2010-06-22
dict_load_column_low(): Initialize pos. Improve documentation.
Approved by Jimmy Yang.
modified:
storage/innobase/dict/dict0load.c
storage/innobase/include/dict0load.h
=== modified file 'storage/innobase/dict/dict0load.c'
--- a/storage/innobase/dict/dict0load.c revid:inaam.rana@stripped
+++ b/storage/innobase/dict/dict0load.c revid:marko.makela@oracle.com-20100622104239-0lpbu70us50jaqfs
@@ -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))) {
+ pos = mach_read_from_4(field);
+
+ if (UNIV_UNLIKELY(table && table->n_def != pos)) {
return("SYS_COLUMNS.POS mismatch");
}
=== modified file 'storage/innobase/include/dict0load.h'
--- a/storage/innobase/include/dict0load.h revid:inaam.rana@strippedx7tbfoo
+++ b/storage/innobase/include/dict0load.h revid:marko.makela@stripped
@@ -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 */
Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100622104239-0lpbu70us50jaqfs.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-innodb branch (marko.makela:3111) | marko.makela | 22 Jun |