~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/row/row0row.c

Merge initial InnoDB+ import.

This was applied by generating a patch between MySQL 5.1.50 InnoDB plugin and
the just-merged innodb+ from mysql-trunk revision-id: vasil.dimov@oracle.com-20100422110752-1zowoqxel5xx3z2e

Then, some manual merge resolving and it worked. This should make it much
easier to merge the rest of InnoDB 1.1 and 1.2 from the mysql tree using
my bzr-reapply script.

This takes us to InnoDB 1.1.1(ish).

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
294
 
295
295
        ut_ad(dtuple_check_typed(row));
296
296
 
297
 
        if (!ext) {
298
 
                /* REDUNDANT and COMPACT formats store a local
299
 
                768-byte prefix of each externally stored
300
 
                column. No cache is needed. */
301
 
                ut_ad(dict_table_get_format(index->table)
302
 
                      < DICT_TF_FORMAT_ZIP);
303
 
        } else if (j) {
 
297
        if (j) {
304
298
                *ext = row_ext_create(j, ext_cols, row,
305
299
                                      dict_table_zip_size(index->table),
306
300
                                      heap);
736
730
 
737
731
/***************************************************************//**
738
732
Searches an index record.
739
 
@return TRUE if found */
 
733
@return whether the record was found or buffered */
740
734
UNIV_INTERN
741
 
ibool
 
735
enum row_search_result
742
736
row_search_index_entry(
743
737
/*===================*/
744
738
        dict_index_t*   index,  /*!< in: index */
755
749
        ut_ad(dtuple_check_typed(entry));
756
750
 
757
751
        btr_pcur_open(index, entry, PAGE_CUR_LE, mode, pcur, mtr);
 
752
 
 
753
        switch (btr_pcur_get_btr_cur(pcur)->flag) {
 
754
        case BTR_CUR_DELETE_REF:
 
755
                ut_a(mode & BTR_DELETE);
 
756
                return(ROW_NOT_DELETED_REF);
 
757
 
 
758
        case BTR_CUR_DEL_MARK_IBUF:
 
759
        case BTR_CUR_DELETE_IBUF:
 
760
        case BTR_CUR_INSERT_TO_IBUF:
 
761
                return(ROW_BUFFERED);
 
762
 
 
763
        case BTR_CUR_HASH:
 
764
        case BTR_CUR_HASH_FAIL:
 
765
        case BTR_CUR_BINARY:
 
766
                break;
 
767
        }
 
768
 
758
769
        low_match = btr_pcur_get_low_match(pcur);
759
770
 
760
771
        rec = btr_pcur_get_rec(pcur);
761
772
 
762
773
        n_fields = dtuple_get_n_fields(entry);
763
774
 
764
 
        return(!page_rec_is_infimum(rec) && low_match == n_fields);
 
775
        if (page_rec_is_infimum(rec)) {
 
776
 
 
777
                return(ROW_NOT_FOUND);
 
778
        } else if (low_match != n_fields) {
 
779
 
 
780
                return(ROW_NOT_FOUND);
 
781
        }
 
782
 
 
783
        return(ROW_FOUND);
765
784
}
766
785
 
767
786
#if !defined(BUILD_DRIZZLE)