~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-11-30 00:29:39 UTC
  • mto: (1965.2.2 build)
  • mto: This revision was merged to the branch mainline in revision 1966.
  • Revision ID: brian@tangent.org-20101130002939-8bzz3xpa0aapbq2w
Fix sleep() so that a kill command will kill it.

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
 
                    && UNIV_UNLIKELY
526
 
                    (current_lsn
527
 
                     < mach_read_from_8(read_buf + FIL_PAGE_LSN))) {
 
525
                    && current_lsn < mach_read_ull(read_buf + FIL_PAGE_LSN)) {
528
526
                        ut_print_timestamp(stderr);
529
527
 
530
528
                        fprintf(stderr,
540
538
                                "InnoDB: for more information.\n",
541
539
                                (ulong) mach_read_from_4(read_buf
542
540
                                                         + FIL_PAGE_OFFSET),
543
 
                                mach_read_from_8(read_buf + FIL_PAGE_LSN),
 
541
                                mach_read_ull(read_buf + FIL_PAGE_LSN),
544
542
                                current_lsn);
545
543
                }
546
544
        }
737
735
#endif /* !UNIV_HOTBACKUP */
738
736
 
739
737
        switch (fil_page_get_type(read_buf)) {
740
 
                index_id_t      index_id;
741
738
        case FIL_PAGE_INDEX:
742
 
                index_id = btr_page_get_index_id(read_buf);
743
739
                fprintf(stderr,
744
740
                        "InnoDB: Page may be an index page where"
745
 
                        " index id is %llu\n",
746
 
                        (ullint) index_id);
 
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)));
747
746
#ifndef UNIV_HOTBACKUP
748
 
                index = dict_index_find_on_id_low(index_id);
 
747
                index = dict_index_find_on_id_low(
 
748
                        btr_page_get_index_id(read_buf));
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
 
        index_id_t*     index_ids;
 
4464
        dulint*         index_ids;
4465
4465
        ulint*          counts;
4466
4466
        ulint           size;
4467
4467
        ulint           i;
4468
4468
        ulint           j;
4469
 
        index_id_t      id;
 
4469
        dulint          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(size * sizeof *index_ids);
 
4478
        index_ids = mem_alloc(sizeof(dulint) * size);
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 (index_ids[j] == id) {
 
4533
                                        if (ut_dulint_cmp(index_ids[j],
 
4534
                                                          id) == 0) {
4534
4535
                                                counts[j]++;
4535
4536
 
4536
4537
                                                break;
4553
4554
                index = dict_index_get_if_in_cache(index_ids[i]);
4554
4555
 
4555
4556
                fprintf(stderr,
4556
 
                        "Block count for index %llu in buffer is about %lu",
4557
 
                        (ullint) index_ids[i],
 
4557
                        "Block count for index %lu in buffer is about %lu",
 
4558
                        (ulong) ut_dulint_get_low(index_ids[i]),
4558
4559
                        (ulong) counts[i]);
4559
4560
 
4560
4561
                if (index) {