~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/ha_innodb.cc

  • Committer: Stewart Smith
  • Author(s): Marko Mäkelä, Stewart Smith
  • Date: 2010-12-17 04:05:47 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2022.
  • Revision ID: stewart@flamingspork.com-20101217040547-vxdivnnqnp62xfqi
Merge Revision revid:marko.makela@oracle.com-20101019060415-bj3u6ewk022mk4nr from MySQL InnoDB

Original revid:marko.makela@oracle.com-20101019060415-bj3u6ewk022mk4nr

Original Authors: Marko Mkel <marko.makela@oracle.com>
Original commit message:
Bug #56680 wrong InnoDB results from a case-insensitive covering index

row_search_for_mysql(): When a secondary index record might not be
visible in the current transaction's read view and we consult the
clustered index and optionally some undo log records, return the
relevant columns of the clustered index record to MySQL instead of the
secondary index record.

ibuf_insert_to_index_page_low(): New function, refactored from
ibuf_insert_to_index_page().

ibuf_insert_to_index_page(): When we are inserting a record in place
of a delete-marked record and some fields of the record differ, update
that record just like row_ins_sec_index_entry_by_modify() would do.

btr_cur_update_alloc_zip(): Make the function public.

mysql_row_templ_t: Add clust_rec_field_no.

row_sel_store_mysql_rec(), row_sel_push_cache_row_for_mysql(): Add the
flag rec_clust, for returning data at clust_rec_field_no instead of
rec_field_no. Resurrect the debug assertion that the record not be
marked for deletion. (Bug #55626)

[UNIV_DEBUG || UNIV_IBUF_DEBUG] ibuf_debug, buf_page_get_gen(),
buf_flush_page_try():
Implement innodb_change_buffering_debug=1 for evicting pages from the
buffer pool, so that change buffering will be attempted more
frequently.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4283
4283
    n_requested_fields++;
4284
4284
 
4285
4285
    templ->col_no = i;
 
4286
    templ->clust_rec_field_no = dict_col_get_clust_pos(col, clust_index);
 
4287
    ut_ad(templ->clust_rec_field_no != ULINT_UNDEFINED);
4286
4288
 
4287
4289
    if (index == clust_index) {
4288
 
      templ->rec_field_no = dict_col_get_clust_pos(col, index);
 
4290
      templ->rec_field_no = templ->clust_rec_field_no;
4289
4291
    } else {
4290
4292
      templ->rec_field_no = dict_index_get_nth_col_pos(
4291
4293
                index, i);
4292
 
    }
4293
 
 
4294
 
    if (templ->rec_field_no == ULINT_UNDEFINED) {
4295
 
      prebuilt->need_to_access_clustered = TRUE;
 
4294
      if (templ->rec_field_no == ULINT_UNDEFINED) {
 
4295
        prebuilt->need_to_access_clustered = TRUE;
 
4296
      }
4296
4297
    }
4297
4298
 
4298
4299
    if (field->null_ptr) {
4342
4343
    for (i = 0; i < n_requested_fields; i++) {
4343
4344
      templ = prebuilt->mysql_template + i;
4344
4345
 
4345
 
      templ->rec_field_no = dict_col_get_clust_pos(
4346
 
        &index->table->cols[templ->col_no],
4347
 
        clust_index);
 
4346
      templ->rec_field_no = templ->clust_rec_field_no;
4348
4347
    }
4349
4348
  }
4350
4349
}