Commit 79ec1587 authored by marko's avatar marko

branches/zip: innobase_rec_to_mysql(): Allow "index" to be any index,

clustered or secondary.  Remove the rec_offs_validate() assertion, because
the function may be passed a mrec_t* that would fail the check.
parent e25d62f2
...@@ -27,15 +27,13 @@ innobase_rec_to_mysql( ...@@ -27,15 +27,13 @@ innobase_rec_to_mysql(
/*==================*/ /*==================*/
TABLE* table, /* in/out: MySQL table */ TABLE* table, /* in/out: MySQL table */
const rec_t* rec, /* in: record */ const rec_t* rec, /* in: record */
const dict_index_t* index, /* in: clustered index */ const dict_index_t* index, /* in: index */
const ulint* offsets) /* in: rec_get_offsets( const ulint* offsets) /* in: rec_get_offsets(
rec, index, ...) */ rec, index, ...) */
{ {
uint n_fields = table->s->fields; uint n_fields = table->s->fields;
uint i; uint i;
ut_ad(dict_index_is_clust(index));
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(n_fields == dict_table_get_n_user_cols(index->table)); ut_ad(n_fields == dict_table_get_n_user_cols(index->table));
for (i = 0; i < n_fields; i++) { for (i = 0; i < n_fields; i++) {
...@@ -47,7 +45,6 @@ innobase_rec_to_mysql( ...@@ -47,7 +45,6 @@ innobase_rec_to_mysql(
const void* ifield; const void* ifield;
ipos = dict_index_get_nth_col_pos(index, i); ipos = dict_index_get_nth_col_pos(index, i);
ut_ad(ipos != ULINT_UNDEFINED);
if (UNIV_UNLIKELY(ipos == ULINT_UNDEFINED)) { if (UNIV_UNLIKELY(ipos == ULINT_UNDEFINED)) {
reset_field: reset_field:
......
...@@ -12,7 +12,7 @@ innobase_rec_to_mysql( ...@@ -12,7 +12,7 @@ innobase_rec_to_mysql(
/*==================*/ /*==================*/
TABLE* table, /* in/out: MySQL table */ TABLE* table, /* in/out: MySQL table */
const rec_t* rec, /* in: record */ const rec_t* rec, /* in: record */
const dict_index_t* index, /* in: clustered index */ const dict_index_t* index, /* in: index */
const ulint* offsets); /* in: rec_get_offsets( const ulint* offsets); /* in: rec_get_offsets(
rec, index, ...) */ rec, index, ...) */
......
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