~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/data/data0data.c

[patch 112/129] Merge patch for revision 1925 from InnoDB SVN:
revno: 1925
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6169
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6163
committer: calvin
timestamp: Thu 2009-11-12 12:40:43 +0000
message:
  branches/zip: add test case for bug#46676
  
  This crash is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
  But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
  Add test case to catch future regression.
added:
  mysql-test/innodb_bug46676.result 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.result
  mysql-test/innodb_bug46676.test 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.test
diff:
=== added file 'mysql-test/innodb_bug46676.result'

Show diffs side-by-side

added added

removed removed

Lines of Context:
367
367
        prtype = dtype_get_prtype(dfield_get_type(dfield));
368
368
 
369
369
        switch (dtype_get_mtype(dfield_get_type(dfield))) {
370
 
                ib_id_t id;
 
370
                dulint  id;
371
371
        case DATA_INT:
372
372
                switch (len) {
373
373
                        ulint   val;
407
407
                case 4:
408
408
                        val = mach_read_from_4(data);
409
409
 
410
 
                        static const ulint UNSIGNED_MASK= 0x80000000;
411
 
 
412
410
                        if (!(prtype & DATA_UNSIGNED)) {
413
 
                                val &= ~UNSIGNED_MASK;
 
411
                                val &= ~0x80000000;
414
412
                                fprintf(stderr, "%ld", (long) val);
415
413
                        } else {
416
414
                                fprintf(stderr, "%lu", (ulong) val);
419
417
 
420
418
                case 6:
421
419
                        id = mach_read_from_6(data);
422
 
                        fprintf(stderr, "%llu", (ullint) id);
 
420
                        fprintf(stderr, "{%lu %lu}",
 
421
                                ut_dulint_get_high(id),
 
422
                                ut_dulint_get_low(id));
423
423
                        break;
424
424
 
425
425
                case 7:
426
426
                        id = mach_read_from_7(data);
427
 
                        fprintf(stderr, "%llu", (ullint) id);
 
427
                        fprintf(stderr, "{%lu %lu}",
 
428
                                ut_dulint_get_high(id),
 
429
                                ut_dulint_get_low(id));
428
430
                        break;
429
431
                case 8:
430
432
                        id = mach_read_from_8(data);
431
 
                        fprintf(stderr, "%llu", (ullint) id);
 
433
                        fprintf(stderr, "{%lu %lu}",
 
434
                                ut_dulint_get_high(id),
 
435
                                ut_dulint_get_low(id));
432
436
                        break;
433
437
                default:
434
438
                        goto print_hex;
440
444
                case DATA_TRX_ID:
441
445
                        id = mach_read_from_6(data);
442
446
 
443
 
                        fprintf(stderr, "trx_id " TRX_ID_FMT, id);
 
447
                        fprintf(stderr, "trx_id " TRX_ID_FMT,
 
448
                                TRX_ID_PREP_PRINTF(id));
444
449
                        break;
445
450
 
446
451
                case DATA_ROLL_PTR:
447
452
                        id = mach_read_from_7(data);
448
453
 
449
 
                        fprintf(stderr, "roll_ptr " TRX_ID_FMT, id);
 
454
                        fprintf(stderr, "roll_ptr {%lu %lu}",
 
455
                                ut_dulint_get_high(id), ut_dulint_get_low(id));
450
456
                        break;
451
457
 
452
458
                case DATA_ROW_ID:
453
459
                        id = mach_read_from_6(data);
454
460
 
455
 
                        fprintf(stderr, "row_id " TRX_ID_FMT, id);
 
461
                        fprintf(stderr, "row_id {%lu %lu}",
 
462
                                ut_dulint_get_high(id), ut_dulint_get_low(id));
456
463
                        break;
457
464
 
458
465
                default:
459
 
                        id = mach_ull_read_compressed(data);
 
466
                        id = mach_dulint_read_compressed(data);
460
467
 
461
 
                        fprintf(stderr, "mix_id " TRX_ID_FMT, id);
 
468
                        fprintf(stderr, "mix_id {%lu %lu}",
 
469
                                ut_dulint_get_high(id), ut_dulint_get_low(id));
462
470
                }
463
471
                break;
464
472
 
658
666
                                goto skip_field;
659
667
                        }
660
668
 
661
 
                        /* In DYNAMIC and COMPRESSED format, store
662
 
                        locally any non-BLOB columns whose maximum
663
 
                        length does not exceed 256 bytes.  This is
664
 
                        because there is no room for the "external
665
 
                        storage" flag when the maximum length is 255
666
 
                        bytes or less. This restriction trivially
667
 
                        holds in REDUNDANT and COMPACT format, because
668
 
                        there we always store locally columns whose
669
 
                        length is up to local_len == 788 bytes.
670
 
                        @see rec_init_offsets_comp_ordinary */
671
 
                        if (ifield->col->mtype != DATA_BLOB
672
 
                            && ifield->col->len < 256) {
673
 
                                goto skip_field;
674
 
                        }
675
 
 
676
 
                        /* In DYNAMIC and COMPRESSED format, store
677
 
                        locally any non-BLOB columns whose maximum
678
 
                        length does not exceed 256 bytes.  This is
679
 
                        because there is no room for the "external
680
 
                        storage" flag when the maximum length is 255
681
 
                        bytes or less. This restriction trivially
682
 
                        holds in REDUNDANT and COMPACT format, because
683
 
                        there we always store locally columns whose
684
 
                        length is up to local_len == 788 bytes.
685
 
                        @see rec_init_offsets_comp_ordinary */
686
 
                        if (ifield->col->mtype != DATA_BLOB
687
 
                            && ifield->col->len < 256) {
688
 
                                goto skip_field;
689
 
                        }
690
 
 
691
 
                        /* In DYNAMIC and COMPRESSED format, store
692
 
                        locally any non-BLOB columns whose maximum
693
 
                        length does not exceed 256 bytes.  This is
694
 
                        because there is no room for the "external
695
 
                        storage" flag when the maximum length is 255
696
 
                        bytes or less. This restriction trivially
697
 
                        holds in REDUNDANT and COMPACT format, because
698
 
                        there we always store locally columns whose
699
 
                        length is up to local_len == 788 bytes.
700
 
                        @see rec_init_offsets_comp_ordinary */
701
 
                        if (ifield->col->mtype != DATA_BLOB
702
 
                            && ifield->col->len < 256) {
703
 
                                goto skip_field;
704
 
                        }
705
 
 
706
669
                        longest_i = i;
707
670
                        longest = savings;
708
671