~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/buf/buf0buf.c

  • Committer: Stewart Smith
  • Author(s): Marko Mäkelä, Stewart Smith
  • Date: 2010-11-17 05:41:53 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1971.
  • Revision ID: stewart@flamingspork.com-20101117054153-ap3mtdgmdki1tan5
Merge Revision revid:marko.makela@oracle.com-20100623110659-pk5bqnmo0j7hj6md from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100623110659-pk5bqnmo0j7hj6md

Original Authors: Marko Mkel <marko.makela@oracle.com>
Original commit message:
Bug#54728: Replace the dulint struct with a 64-bit integer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
522
522
                ib_uint64_t     current_lsn;
523
523
 
524
524
                if (log_peek_lsn(&current_lsn)
525
 
                    && current_lsn < mach_read_ull(read_buf + FIL_PAGE_LSN)) {
 
525
                    && UNIV_UNLIKELY
 
526
                    (current_lsn
 
527
                     < mach_read_from_8(read_buf + FIL_PAGE_LSN))) {
526
528
                        ut_print_timestamp(stderr);
527
529
 
528
530
                        fprintf(stderr,
538
540
                                "InnoDB: for more information.\n",
539
541
                                (ulong) mach_read_from_4(read_buf
540
542
                                                         + FIL_PAGE_OFFSET),
541
 
                                mach_read_ull(read_buf + FIL_PAGE_LSN),
 
543
                                mach_read_from_8(read_buf + FIL_PAGE_LSN),
542
544
                                current_lsn);
543
545
                }
544
546
        }
735
737
#endif /* !UNIV_HOTBACKUP */
736
738
 
737
739
        switch (fil_page_get_type(read_buf)) {
 
740
                index_id_t      index_id;
738
741
        case FIL_PAGE_INDEX:
 
742
                index_id = btr_page_get_index_id(read_buf);
739
743
                fprintf(stderr,
740
744
                        "InnoDB: Page may be an index page where"
741
 
                        " index id is %lu %lu\n",
742
 
                        (ulong) ut_dulint_get_high(
743
 
                                btr_page_get_index_id(read_buf)),
744
 
                        (ulong) ut_dulint_get_low(
745
 
                                btr_page_get_index_id(read_buf)));
 
745
                        " index id is %llu\n",
 
746
                        (ullint) index_id);
746
747
#ifndef UNIV_HOTBACKUP
747
 
                index = dict_index_find_on_id_low(
748
 
                        btr_page_get_index_id(read_buf));
 
748
                index = dict_index_find_on_id_low(index_id);
749
749
                if (index) {
750
750
                        fputs("InnoDB: (", stderr);
751
751
                        dict_index_name_print(stderr, NULL, index);
4461
4461
/*===============*/
4462
4462
        buf_pool_t*     buf_pool)
4463
4463
{
4464
 
        dulint*         index_ids;
 
4464
        index_id_t*     index_ids;
4465
4465
        ulint*          counts;
4466
4466
        ulint           size;
4467
4467
        ulint           i;
4468
4468
        ulint           j;
4469
 
        dulint          id;
 
4469
        index_id_t      id;
4470
4470
        ulint           n_found;
4471
4471
        buf_chunk_t*    chunk;
4472
4472
        dict_index_t*   index;
4475
4475
 
4476
4476
        size = buf_pool->curr_size;
4477
4477
 
4478
 
        index_ids = mem_alloc(sizeof(dulint) * size);
 
4478
        index_ids = mem_alloc(size * sizeof *index_ids);
4479
4479
        counts = mem_alloc(sizeof(ulint) * size);
4480
4480
 
4481
4481
        buf_pool_mutex_enter(buf_pool);
4530
4530
 
4531
4531
                                while (j < n_found) {
4532
4532
 
4533
 
                                        if (ut_dulint_cmp(index_ids[j],
4534
 
                                                          id) == 0) {
 
4533
                                        if (index_ids[j] == id) {
4535
4534
                                                counts[j]++;
4536
4535
 
4537
4536
                                                break;
4554
4553
                index = dict_index_get_if_in_cache(index_ids[i]);
4555
4554
 
4556
4555
                fprintf(stderr,
4557
 
                        "Block count for index %lu in buffer is about %lu",
4558
 
                        (ulong) ut_dulint_get_low(index_ids[i]),
 
4556
                        "Block count for index %llu in buffer is about %lu",
 
4557
                        (ullint) index_ids[i],
4559
4558
                        (ulong) counts[i]);
4560
4559
 
4561
4560
                if (index) {