~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Lee Bieber
  • Date: 2010-12-23 23:11:00 UTC
  • mfrom: (2024.1.1 clean)
  • Revision ID: kalebral@gmail.com-20101223231100-0rqirgz7ugkl10yp
Merge Brian - session list cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
                const char* err_msg;
190
190
 
191
191
                err_msg = dict_process_sys_tables_rec(
192
 
                        heap, rec, &table,
193
 
                        static_cast<dict_table_info>(DICT_TABLE_LOAD_FROM_CACHE
194
 
                        | DICT_TABLE_UPDATE_STATS));
 
192
                        heap, rec, &table, DICT_TABLE_LOAD_FROM_CACHE
 
193
                        | DICT_TABLE_UPDATE_STATS);
195
194
 
196
195
                mtr_commit(&mtr);
197
196
 
377
376
        const char*     err_msg;
378
377
        byte*           buf;
379
378
 
380
 
        buf = static_cast<unsigned char *>(mem_heap_alloc(heap, 8));
 
379
        buf = mem_heap_alloc(heap, 8);
381
380
 
382
381
        /* Parse the record, and get "dict_index_t" struct filled */
383
382
        err_msg = dict_load_index_low(buf, NULL,
429
428
        byte*           last_index_id;
430
429
        const char*     err_msg;
431
430
 
432
 
        buf = static_cast<unsigned char *>(mem_heap_alloc(heap, 8));
 
431
        buf = mem_heap_alloc(heap, 8);
433
432
 
434
 
        last_index_id = static_cast<unsigned char *>(mem_heap_alloc(heap, 8));
 
433
        last_index_id = mem_heap_alloc(heap, 8);
435
434
        mach_write_to_8(last_index_id, last_id);
436
435
 
437
436
        err_msg = dict_load_field_low(buf, NULL, sys_field,
702
701
                return(ULINT_UNDEFINED);
703
702
        }
704
703
 
705
 
        if (UNIV_UNLIKELY(flags & (SIZE_MAX << DICT_TF_BITS))) {
 
704
        if (UNIV_UNLIKELY(flags & (~0 << DICT_TF_BITS))) {
706
705
                /* Some unused bits are set. */
707
706
                return(ULINT_UNDEFINED);
708
707
        }
1028
1027
        tuple = dtuple_create(heap, 1);
1029
1028
        dfield = dtuple_get_nth_field(tuple, 0);
1030
1029
 
1031
 
        buf = static_cast<unsigned char *>(mem_heap_alloc(heap, 8));
 
1030
        buf = mem_heap_alloc(heap, 8);
1032
1031
        mach_write_to_8(buf, table->id);
1033
1032
 
1034
1033
        dfield_set_data(dfield, buf, 8);
1212
1211
        tuple = dtuple_create(heap, 1);
1213
1212
        dfield = dtuple_get_nth_field(tuple, 0);
1214
1213
 
1215
 
        buf = static_cast<unsigned char *>(mem_heap_alloc(heap, 8));
 
1214
        buf = mem_heap_alloc(heap, 8);
1216
1215
        mach_write_to_8(buf, index->id);
1217
1216
 
1218
1217
        dfield_set_data(dfield, buf, 8);
1415
1414
        tuple = dtuple_create(heap, 1);
1416
1415
        dfield = dtuple_get_nth_field(tuple, 0);
1417
1416
 
1418
 
        buf = static_cast<unsigned char *>(mem_heap_alloc(heap, 8));
 
1417
        buf = mem_heap_alloc(heap, 8);
1419
1418
        mach_write_to_8(buf, table->id);
1420
1419
 
1421
1420
        dfield_set_data(dfield, buf, 8);
1641
1640
 
1642
1641
                flags2 = mach_read_from_4(field);
1643
1642
 
1644
 
                if (flags2 & (SIZE_MAX << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
 
1643
                if (flags2 & (~0 << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
1645
1644
                        ut_print_timestamp(stderr);
1646
1645
                        fputs("  InnoDB: Warning: table ", stderr);
1647
1646
                        ut_print_filename(stderr, name);
1988
1987
 
1989
1988
        ut_ad(mutex_own(&(dict_sys->mutex)));
1990
1989
 
1991
 
        foreign->foreign_col_names = static_cast<const char **>(mem_heap_alloc(
1992
 
                foreign->heap, foreign->n_fields * sizeof(void*)));
 
1990
        foreign->foreign_col_names = mem_heap_alloc(
 
1991
                foreign->heap, foreign->n_fields * sizeof(void*));
1993
1992
 
1994
 
        foreign->referenced_col_names = static_cast<const char **>(mem_heap_alloc(
1995
 
                foreign->heap, foreign->n_fields * sizeof(void*)));
 
1993
        foreign->referenced_col_names = mem_heap_alloc(
 
1994
                foreign->heap, foreign->n_fields * sizeof(void*));
1996
1995
        mtr_start(&mtr);
1997
1996
 
1998
1997
        sys_foreign_cols = dict_table_get_low("SYS_FOREIGN_COLS");
2295
2294
 
2296
2295
        if (0 != cmp_data_data(dfield_get_type(dfield)->mtype,
2297
2296
                               dfield_get_type(dfield)->prtype,
2298
 
                               static_cast<const unsigned char *>(dfield_get_data(dfield)),
2299
 
                               dfield_get_len(dfield),
 
2297
                               dfield_get_data(dfield), dfield_get_len(dfield),
2300
2298
                               field, len)) {
2301
2299
 
2302
2300
                goto load_next_index;