~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/dict/dict0load.c

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
*******************************************************/
9
9
 
10
10
#include "dict0load.h"
 
11
#ifndef UNIV_HOTBACKUP
 
12
#if defined(BUILD_DRIZZLE)
 
13
# include <config.h>
 
14
#else
 
15
# include "mysql_version.h"
 
16
#endif /* DRIZZLE */
 
17
#endif /* !UNIV_HOTBACKUP */
11
18
 
12
19
#ifdef UNIV_NONINL
13
20
#include "dict0load.ic"
44
51
 
45
52
/************************************************************************
46
53
Finds the first table name in the given database. */
47
 
 
 
54
UNIV_INTERN
48
55
char*
49
56
dict_get_first_table_name_in_db(
50
57
/*============================*/
59
66
        dtuple_t*       tuple;
60
67
        mem_heap_t*     heap;
61
68
        dfield_t*       dfield;
62
 
        rec_t*          rec;
63
 
        byte*           field;
 
69
        const rec_t*    rec;
 
70
        const byte*     field;
64
71
        ulint           len;
65
72
        mtr_t           mtr;
66
73
 
85
92
loop:
86
93
        rec = btr_pcur_get_rec(&pcur);
87
94
 
88
 
        if (!btr_pcur_is_on_user_rec(&pcur, &mtr)) {
 
95
        if (!btr_pcur_is_on_user_rec(&pcur)) {
89
96
                /* Not found */
90
97
 
91
98
                btr_pcur_close(&pcur);
129
136
/************************************************************************
130
137
Prints to the standard output information on all tables found in the data
131
138
dictionary system table. */
132
 
 
 
139
UNIV_INTERN
133
140
void
134
141
dict_print(void)
135
142
/*============*/
138
145
        dict_index_t*   sys_index;
139
146
        dict_table_t*   table;
140
147
        btr_pcur_t      pcur;
141
 
        rec_t*          rec;
142
 
        byte*           field;
 
148
        const rec_t*    rec;
 
149
        const byte*     field;
143
150
        ulint           len;
144
151
        mtr_t           mtr;
145
152
 
164
171
 
165
172
        rec = btr_pcur_get_rec(&pcur);
166
173
 
167
 
        if (!btr_pcur_is_on_user_rec(&pcur, &mtr)) {
 
174
        if (!btr_pcur_is_on_user_rec(&pcur)) {
168
175
                /* end of index */
169
176
 
170
177
                btr_pcur_close(&pcur);
220
227
}
221
228
 
222
229
/************************************************************************
 
230
Determine the flags of a table described in SYS_TABLES. */
 
231
static
 
232
ulint
 
233
dict_sys_tables_get_flags(
 
234
/*======================*/
 
235
                                /* out: compressed page size in kilobytes;
 
236
                                or 0 if the tablespace is uncompressed,
 
237
                                ULINT_UNDEFINED on error */
 
238
        const rec_t*    rec)    /* in: a record of SYS_TABLES */
 
239
{
 
240
        const byte*     field;
 
241
        ulint           len;
 
242
        ulint           n_cols;
 
243
        ulint           flags;
 
244
 
 
245
        field = rec_get_nth_field_old(rec, 5, &len);
 
246
        ut_a(len == 4);
 
247
 
 
248
        flags = mach_read_from_4(field);
 
249
 
 
250
        if (UNIV_LIKELY(flags == DICT_TABLE_ORDINARY)) {
 
251
                return(0);
 
252
        }
 
253
 
 
254
        field = rec_get_nth_field_old(rec, 4, &len);
 
255
        n_cols = mach_read_from_4(field);
 
256
 
 
257
        if (UNIV_UNLIKELY(!(n_cols & 0x80000000UL))) {
 
258
                /* New file formats require ROW_FORMAT=COMPACT. */
 
259
                return(ULINT_UNDEFINED);
 
260
        }
 
261
 
 
262
        switch (flags & (DICT_TF_FORMAT_MASK | DICT_TF_COMPACT)) {
 
263
        default:
 
264
        case DICT_TF_FORMAT_51 << DICT_TF_FORMAT_SHIFT:
 
265
        case DICT_TF_FORMAT_51 << DICT_TF_FORMAT_SHIFT | DICT_TF_COMPACT:
 
266
                /* flags should be DICT_TABLE_ORDINARY,
 
267
                or DICT_TF_FORMAT_MASK should be nonzero. */
 
268
                return(ULINT_UNDEFINED);
 
269
 
 
270
        case DICT_TF_FORMAT_ZIP << DICT_TF_FORMAT_SHIFT | DICT_TF_COMPACT:
 
271
#if DICT_TF_FORMAT_MAX > DICT_TF_FORMAT_ZIP
 
272
# error "missing case labels for DICT_TF_FORMAT_ZIP .. DICT_TF_FORMAT_MAX"
 
273
#endif
 
274
                /* We support this format. */
 
275
                break;
 
276
        }
 
277
 
 
278
        if (UNIV_UNLIKELY((flags & DICT_TF_ZSSIZE_MASK)
 
279
                          > (DICT_TF_ZSSIZE_MAX << DICT_TF_ZSSIZE_SHIFT))) {
 
280
                /* Unsupported compressed page size. */
 
281
                return(ULINT_UNDEFINED);
 
282
        }
 
283
 
 
284
        if (UNIV_UNLIKELY(flags & (~0 << DICT_TF_BITS))) {
 
285
                /* Some unused bits are set. */
 
286
                return(ULINT_UNDEFINED);
 
287
        }
 
288
 
 
289
        return(flags);
 
290
}
 
291
 
 
292
/************************************************************************
223
293
In a crash recovery we already have all the tablespace objects created.
224
294
This function compares the space id information in the InnoDB data dictionary
225
295
to what we already read with fil_load_single_table_tablespaces().
227
297
In a normal startup, we create the tablespace objects for every table in
228
298
InnoDB's data dictionary, if the corresponding .ibd file exists.
229
299
We also scan the biggest space id, and store it to fil_system. */
230
 
 
 
300
UNIV_INTERN
231
301
void
232
302
dict_check_tablespaces_and_store_max_id(
233
303
/*====================================*/
236
306
        dict_table_t*   sys_tables;
237
307
        dict_index_t*   sys_index;
238
308
        btr_pcur_t      pcur;
239
 
        rec_t*          rec;
240
 
        byte*           field;
241
 
        ulint           len;
242
 
        ulint           space_id;
 
309
        const rec_t*    rec;
243
310
        ulint           max_space_id    = 0;
244
311
        mtr_t           mtr;
245
312
 
258
325
 
259
326
        rec = btr_pcur_get_rec(&pcur);
260
327
 
261
 
        if (!btr_pcur_is_on_user_rec(&pcur, &mtr)) {
 
328
        if (!btr_pcur_is_on_user_rec(&pcur)) {
262
329
                /* end of index */
263
330
 
264
331
                btr_pcur_close(&pcur);
276
343
                return;
277
344
        }
278
345
 
279
 
        field = rec_get_nth_field_old(rec, 0, &len);
280
 
 
281
346
        if (!rec_get_deleted_flag(rec, 0)) {
282
347
 
283
348
                /* We found one */
284
 
 
285
 
                char*   name = mem_strdupl((char*) field, len);
 
349
                const byte*     field;
 
350
                ulint           len;
 
351
                ulint           space_id;
 
352
                ulint           flags;
 
353
                char*           name;
 
354
 
 
355
                field = rec_get_nth_field_old(rec, 0, &len);
 
356
                name = mem_strdupl((char*) field, len);
 
357
 
 
358
                flags = dict_sys_tables_get_flags(rec);
 
359
                if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) {
 
360
 
 
361
                        field = rec_get_nth_field_old(rec, 5, &len);
 
362
                        flags = mach_read_from_4(field);
 
363
 
 
364
                        ut_print_timestamp(stderr);
 
365
                        fputs("  InnoDB: Error: table ", stderr);
 
366
                        ut_print_filename(stderr, name);
 
367
                        fprintf(stderr, "\n"
 
368
                                "InnoDB: in InnoDB data dictionary"
 
369
                                " has unknown type %lx.\n",
 
370
                                (ulong) flags);
 
371
 
 
372
                        goto loop;
 
373
                }
286
374
 
287
375
                field = rec_get_nth_field_old(rec, 9, &len);
288
376
                ut_a(len == 4);
306
394
                        object and check that the .ibd file exists. */
307
395
 
308
396
                        fil_open_single_table_tablespace(FALSE, space_id,
309
 
                                                         name);
 
397
                                                         flags, name);
310
398
                }
311
399
 
312
400
                mem_free(name);
337
425
        btr_pcur_t      pcur;
338
426
        dtuple_t*       tuple;
339
427
        dfield_t*       dfield;
340
 
        rec_t*          rec;
341
 
        byte*           field;
 
428
        const rec_t*    rec;
 
429
        const byte*     field;
342
430
        ulint           len;
343
431
        byte*           buf;
344
432
        char*           name;
371
459
 
372
460
                rec = btr_pcur_get_rec(&pcur);
373
461
 
374
 
                ut_a(btr_pcur_is_on_user_rec(&pcur, &mtr));
 
462
                ut_a(btr_pcur_is_on_user_rec(&pcur));
375
463
 
376
464
                ut_a(!rec_get_deleted_flag(rec, 0));
377
465
 
404
492
 
405
493
                                prtype = dtype_form_prtype(
406
494
                                        prtype,
407
 
                                        DATA_DRIZZLE_BINARY_CHARSET_COLL);
 
495
                                        DATA_MYSQL_BINARY_CHARSET_COLL);
408
496
                        } else {
409
497
                                /* Use the default charset for
410
498
                                other than binary columns. */
430
518
}
431
519
 
432
520
/************************************************************************
433
 
Report that an index field or index for a table has been delete marked. */
434
 
static
435
 
void
436
 
dict_load_report_deleted_index(
437
 
/*===========================*/
438
 
        const char*     name,   /* in: table name */
439
 
        ulint           field)  /* in: index field, or ULINT_UNDEFINED */
440
 
{
441
 
        fprintf(stderr, "InnoDB: Error: data dictionary entry"
442
 
                " for table %s is corrupt!\n", name);
443
 
        if (field != ULINT_UNDEFINED) {
444
 
                fprintf(stderr,
445
 
                        "InnoDB: Index field %lu is delete marked.\n", field);
446
 
        } else {
447
 
                fputs("InnoDB: An index is delete marked.\n", stderr);
448
 
        }
449
 
}
450
 
 
451
 
/************************************************************************
452
521
Loads definitions for index fields. */
453
522
static
454
523
void
455
524
dict_load_fields(
456
525
/*=============*/
457
 
        dict_table_t*   table,  /* in: table */
458
526
        dict_index_t*   index,  /* in: index whose fields to load */
459
527
        mem_heap_t*     heap)   /* in: memory heap for temporary storage */
460
528
{
465
533
        dfield_t*       dfield;
466
534
        ulint           pos_and_prefix_len;
467
535
        ulint           prefix_len;
468
 
        rec_t*          rec;
469
 
        byte*           field;
 
536
        const rec_t*    rec;
 
537
        const byte*     field;
470
538
        ulint           len;
471
539
        byte*           buf;
472
540
        ulint           i;
495
563
 
496
564
                rec = btr_pcur_get_rec(&pcur);
497
565
 
498
 
                ut_a(btr_pcur_is_on_user_rec(&pcur, &mtr));
 
566
                ut_a(btr_pcur_is_on_user_rec(&pcur));
 
567
 
 
568
                /* There could be delete marked records in SYS_FIELDS
 
569
                because SYS_FIELDS.INDEX_ID can be updated
 
570
                by ALTER TABLE ADD INDEX. */
 
571
 
499
572
                if (rec_get_deleted_flag(rec, 0)) {
500
 
                        dict_load_report_deleted_index(table->name, i);
 
573
 
 
574
                        goto next_rec;
501
575
                }
502
576
 
503
577
                field = rec_get_nth_field_old(rec, 0, &len);
504
578
                ut_ad(len == 8);
505
 
                ut_a(ut_memcmp(buf, field, len) == 0);
506
579
 
507
580
                field = rec_get_nth_field_old(rec, 1, &len);
508
581
                ut_a(len == 4);
537
610
                                                          (char*) field, len),
538
611
                                         prefix_len);
539
612
 
 
613
next_rec:
540
614
                btr_pcur_move_to_next_user_rec(&pcur, &mtr);
541
615
        }
542
616
 
564
638
        btr_pcur_t      pcur;
565
639
        dtuple_t*       tuple;
566
640
        dfield_t*       dfield;
567
 
        rec_t*          rec;
568
 
        byte*           field;
 
641
        const rec_t*    rec;
 
642
        const byte*     field;
569
643
        ulint           len;
570
644
        ulint           name_len;
571
645
        char*           name_buf;
606
680
        btr_pcur_open_on_user_rec(sys_index, tuple, PAGE_CUR_GE,
607
681
                                  BTR_SEARCH_LEAF, &pcur, &mtr);
608
682
        for (;;) {
609
 
                if (!btr_pcur_is_on_user_rec(&pcur, &mtr)) {
 
683
                if (!btr_pcur_is_on_user_rec(&pcur)) {
610
684
 
611
685
                        break;
612
686
                }
618
692
 
619
693
                if (ut_memcmp(buf, field, len) != 0) {
620
694
                        break;
621
 
                }
622
 
 
623
 
                if (rec_get_deleted_flag(rec, 0)) {
624
 
                        dict_load_report_deleted_index(table->name,
625
 
                                                       ULINT_UNDEFINED);
626
 
 
627
 
                        error = DB_CORRUPTION;
628
 
                        goto func_exit;
 
695
                } else if (rec_get_deleted_flag(rec, 0)) {
 
696
                        /* Skip delete marked records */
 
697
                        goto next_rec;
629
698
                }
630
699
 
631
700
                field = rec_get_nth_field_old(rec, 1, &len);
675
744
                } else if ((type & DICT_CLUSTERED) == 0
676
745
                            && NULL == dict_table_get_first_index(table)) {
677
746
 
678
 
                        fprintf(stderr,
679
 
                                "InnoDB: Error: trying to load index %s"
680
 
                                " for table %s\n"
681
 
                                "InnoDB: but the first index"
682
 
                                " is not clustered!\n",
683
 
                                name_buf, table->name);
 
747
                        fputs("InnoDB: Error: trying to load index ",
 
748
                              stderr);
 
749
                        ut_print_name(stderr, NULL, FALSE, name_buf);
 
750
                        fputs(" for table ", stderr);
 
751
                        ut_print_name(stderr, NULL, TRUE, table->name);
 
752
                        fputs("\nInnoDB: but the first index"
 
753
                              " is not clustered!\n", stderr);
684
754
 
685
755
                        error = DB_CORRUPTION;
686
756
                        goto func_exit;
698
768
                                                      space, type, n_fields);
699
769
                        index->id = id;
700
770
 
701
 
                        dict_load_fields(table, index, heap);
702
 
                        dict_index_add_to_cache(table, index, page_no);
 
771
                        dict_load_fields(index, heap);
 
772
                        error = dict_index_add_to_cache(table, index, page_no);
 
773
                        /* The data dictionary tables should never contain
 
774
                        invalid index definitions.  If we ignored this error
 
775
                        and simply did not load this index definition, the
 
776
                        .frm file would disagree with the index definitions
 
777
                        inside InnoDB. */
 
778
                        if (UNIV_UNLIKELY(error != DB_SUCCESS)) {
 
779
 
 
780
                                goto func_exit;
 
781
                        }
703
782
                }
704
783
 
 
784
next_rec:
705
785
                btr_pcur_move_to_next_user_rec(&pcur, &mtr);
706
786
        }
707
787
 
718
798
all foreign key constraints where the foreign key is in the table or where
719
799
a foreign key references columns in this table. Adds all these to the data
720
800
dictionary cache. */
721
 
 
 
801
UNIV_INTERN
722
802
dict_table_t*
723
803
dict_load_table(
724
804
/*============*/
738
818
        dtuple_t*       tuple;
739
819
        mem_heap_t*     heap;
740
820
        dfield_t*       dfield;
741
 
        rec_t*          rec;
742
 
        byte*           field;
 
821
        const rec_t*    rec;
 
822
        const byte*     field;
743
823
        ulint           len;
744
824
        ulint           space;
745
825
        ulint           n_cols;
767
847
                                  BTR_SEARCH_LEAF, &pcur, &mtr);
768
848
        rec = btr_pcur_get_rec(&pcur);
769
849
 
770
 
        if (!btr_pcur_is_on_user_rec(&pcur, &mtr)
 
850
        if (!btr_pcur_is_on_user_rec(&pcur)
771
851
            || rec_get_deleted_flag(rec, 0)) {
772
852
                /* Not found */
773
853
err_exit:
793
873
 
794
874
        /* Check if the tablespace exists and has the right name */
795
875
        if (space != 0) {
 
876
                flags = dict_sys_tables_get_flags(rec);
 
877
 
 
878
                if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) {
 
879
                        field = rec_get_nth_field_old(rec, 5, &len);
 
880
                        flags = mach_read_from_4(field);
 
881
 
 
882
                        ut_print_timestamp(stderr);
 
883
                        fputs("  InnoDB: Error: table ", stderr);
 
884
                        ut_print_filename(stderr, name);
 
885
                        fprintf(stderr, "\n"
 
886
                                "InnoDB: in InnoDB data dictionary"
 
887
                                " has unknown type %lx.\n",
 
888
                                (ulong) flags);
 
889
                        goto err_exit;
 
890
                }
 
891
 
796
892
                if (fil_space_for_table_exists_in_mem(space, name, FALSE,
797
893
                                                      FALSE, FALSE)) {
798
894
                        /* Ok; (if we did a crash recovery then the tablespace
809
905
                                " Retrying an open.\n",
810
906
                                name, (ulong)space);
811
907
                        /* Try to open the tablespace */
812
 
                        if (!fil_open_single_table_tablespace(TRUE,
813
 
                                                              space, name)) {
 
908
                        if (!fil_open_single_table_tablespace(
 
909
                                    TRUE, space, flags, name)) {
814
910
                                /* We failed to find a sensible tablespace
815
911
                                file */
816
912
 
817
913
                                ibd_file_missing = TRUE;
818
914
                        }
819
915
                }
 
916
        } else {
 
917
                flags = 0;
820
918
        }
821
919
 
822
920
        ut_a(name_of_col_is(sys_tables, sys_index, 4, "N_COLS"));
824
922
        field = rec_get_nth_field_old(rec, 4, &len);
825
923
        n_cols = mach_read_from_4(field);
826
924
 
827
 
        flags = 0;
828
 
 
829
925
        /* The high-order bit of N_COLS is the "compact format" flag. */
830
926
        if (n_cols & 0x80000000UL) {
831
927
                flags |= DICT_TF_COMPACT;
841
937
        field = rec_get_nth_field_old(rec, 3, &len);
842
938
        table->id = mach_read_from_8(field);
843
939
 
844
 
        field = rec_get_nth_field_old(rec, 5, &len);
845
 
        if (UNIV_UNLIKELY(mach_read_from_4(field) != DICT_TABLE_ORDINARY)) {
846
 
                ut_print_timestamp(stderr);
847
 
                fprintf(stderr,
848
 
                        "  InnoDB: table %s: unknown table type %lu\n",
849
 
                        name, (ulong) mach_read_from_4(field));
850
 
                goto err_exit;
851
 
        }
852
 
 
853
940
        btr_pcur_close(&pcur);
854
941
        mtr_commit(&mtr);
855
942
 
860
947
        mem_heap_empty(heap);
861
948
 
862
949
        err = dict_load_indexes(table, heap);
863
 
 
 
950
#ifndef UNIV_HOTBACKUP
864
951
        /* If the force recovery flag is set, we open the table irrespective
865
952
        of the error condition, since the user may want to dump data from the
866
953
        clustered index. However we load the foreign key information only if
871
958
        } else if (err == DB_SUCCESS) {
872
959
                err = dict_load_foreigns(table->name, TRUE);
873
960
        }
874
 
#if 0
 
961
# if 0
875
962
        if (err != DB_SUCCESS && table != NULL) {
876
963
 
877
964
                mutex_enter(&dict_foreign_err_mutex);
894
981
 
895
982
                mutex_exit(&dict_foreign_err_mutex);
896
983
        }
897
 
#endif /* 0 */
 
984
# endif /* 0 */
 
985
#endif /* !UNIV_HOTBACKUP */
898
986
        mem_heap_free(heap);
899
987
 
900
988
        return(table);
902
990
 
903
991
/***************************************************************************
904
992
Loads a table object based on the table id. */
905
 
 
 
993
UNIV_INTERN
906
994
dict_table_t*
907
995
dict_load_table_on_id(
908
996
/*==================*/
916
1004
        dfield_t*       dfield;
917
1005
        dict_index_t*   sys_table_ids;
918
1006
        dict_table_t*   sys_tables;
919
 
        rec_t*          rec;
920
 
        byte*           field;
 
1007
        const rec_t*    rec;
 
1008
        const byte*     field;
921
1009
        ulint           len;
922
1010
        dict_table_t*   table;
923
1011
        mtr_t           mtr;
950
1038
                                  BTR_SEARCH_LEAF, &pcur, &mtr);
951
1039
        rec = btr_pcur_get_rec(&pcur);
952
1040
 
953
 
        if (!btr_pcur_is_on_user_rec(&pcur, &mtr)
 
1041
        if (!btr_pcur_is_on_user_rec(&pcur)
954
1042
            || rec_get_deleted_flag(rec, 0)) {
955
1043
                /* Not found */
956
1044
 
995
1083
This function is called when the database is booted. Loads system table
996
1084
index definitions except for the clustered index which is added to the
997
1085
dictionary cache at booting before calling this function. */
998
 
 
 
1086
UNIV_INTERN
999
1087
void
1000
1088
dict_load_sys_table(
1001
1089
/*================*/
1012
1100
        mem_heap_free(heap);
1013
1101
}
1014
1102
 
 
1103
#ifndef UNIV_HOTBACKUP
1015
1104
/************************************************************************
1016
1105
Loads foreign key constraint col names (also for the referenced table). */
1017
1106
static
1027
1116
        btr_pcur_t      pcur;
1028
1117
        dtuple_t*       tuple;
1029
1118
        dfield_t*       dfield;
1030
 
        rec_t*          rec;
1031
 
        byte*           field;
 
1119
        const rec_t*    rec;
 
1120
        const byte*     field;
1032
1121
        ulint           len;
1033
1122
        ulint           i;
1034
1123
        mtr_t           mtr;
1058
1147
 
1059
1148
                rec = btr_pcur_get_rec(&pcur);
1060
1149
 
1061
 
                ut_a(btr_pcur_is_on_user_rec(&pcur, &mtr));
 
1150
                ut_a(btr_pcur_is_on_user_rec(&pcur));
1062
1151
                ut_a(!rec_get_deleted_flag(rec, 0));
1063
1152
 
1064
1153
                field = rec_get_nth_field_old(rec, 0, &len);
1103
1192
        dtuple_t*       tuple;
1104
1193
        mem_heap_t*     heap2;
1105
1194
        dfield_t*       dfield;
1106
 
        rec_t*          rec;
1107
 
        byte*           field;
 
1195
        const rec_t*    rec;
 
1196
        const byte*     field;
1108
1197
        ulint           len;
1109
1198
        ulint           n_fields_and_type;
1110
1199
        mtr_t           mtr;
1129
1218
                                  BTR_SEARCH_LEAF, &pcur, &mtr);
1130
1219
        rec = btr_pcur_get_rec(&pcur);
1131
1220
 
1132
 
        if (!btr_pcur_is_on_user_rec(&pcur, &mtr)
 
1221
        if (!btr_pcur_is_on_user_rec(&pcur)
1133
1222
            || rec_get_deleted_flag(rec, 0)) {
1134
1223
                /* Not found */
1135
1224
 
1215
1304
constraints to the data dictionary. Note that we know that the dictionary
1216
1305
cache already contains all constraints where the other relevant table is
1217
1306
already in the dictionary cache. */
1218
 
 
 
1307
UNIV_INTERN
1219
1308
ulint
1220
1309
dict_load_foreigns(
1221
1310
/*===============*/
1230
1319
        dfield_t*       dfield;
1231
1320
        dict_index_t*   sec_index;
1232
1321
        dict_table_t*   sys_foreign;
1233
 
        rec_t*          rec;
1234
 
        byte*           field;
 
1322
        const rec_t*    rec;
 
1323
        const byte*     field;
1235
1324
        ulint           len;
1236
1325
        char*           id ;
1237
1326
        ulint           err;
1273
1362
loop:
1274
1363
        rec = btr_pcur_get_rec(&pcur);
1275
1364
 
1276
 
        if (!btr_pcur_is_on_user_rec(&pcur, &mtr)) {
 
1365
        if (!btr_pcur_is_on_user_rec(&pcur)) {
1277
1366
                /* End of index */
1278
1367
 
1279
1368
                goto load_next_index;
1355
1444
 
1356
1445
        return(DB_SUCCESS);
1357
1446
}
 
1447
#endif /* !UNIV_HOTBACKUP */