~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

Viewing changes to storage/innobase/row/row0vers.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
                                /* The view already sees this version: we can
474
474
                                copy it to in_heap and return */
475
475
 
 
476
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
 
477
                                ut_a(!rec_offs_any_null_extern(
 
478
                                             version, *offsets));
 
479
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 
480
 
476
481
                                buf = mem_heap_alloc(in_heap,
477
482
                                                     rec_offs_size(*offsets));
478
483
                                *old_vers = rec_copy(buf, version, *offsets);
506
511
                *offsets = rec_get_offsets(prev_version, index, *offsets,
507
512
                                           ULINT_UNDEFINED, offset_heap);
508
513
 
 
514
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
 
515
                ut_a(!rec_offs_any_null_extern(prev_version, *offsets));
 
516
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 
517
 
509
518
                trx_id = row_get_rec_trx_id(prev_version, index, *offsets);
510
519
 
511
520
                if (read_view_sees_trx_id(view, trx_id)) {
593
602
 
594
603
                mutex_enter(&kernel_mutex);
595
604
                version_trx = trx_get_on_id(version_trx_id);
 
605
                if (version_trx
 
606
                    && (version_trx->conc_state == TRX_COMMITTED_IN_MEMORY
 
607
                        || version_trx->conc_state == TRX_NOT_STARTED)) {
 
608
 
 
609
                        version_trx = NULL;
 
610
                }
596
611
                mutex_exit(&kernel_mutex);
597
612
 
598
 
                if (!version_trx
599
 
                    || version_trx->conc_state == TRX_NOT_STARTED
600
 
                    || version_trx->conc_state == TRX_COMMITTED_IN_MEMORY) {
 
613
                if (!version_trx) {
601
614
 
602
615
                        /* We found a version that belongs to a
603
616
                        committed transaction: return it. */
604
617
 
 
618
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
 
619
                        ut_a(!rec_offs_any_null_extern(version, *offsets));
 
620
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 
621
 
605
622
                        if (rec == version) {
606
623
                                *old_vers = rec;
607
624
                                err = DB_SUCCESS;
659
676
                version = prev_version;
660
677
                *offsets = rec_get_offsets(version, index, *offsets,
661
678
                                           ULINT_UNDEFINED, offset_heap);
 
679
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
 
680
                ut_a(!rec_offs_any_null_extern(version, *offsets));
 
681
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
662
682
        }/* for (;;) */
663
683
 
664
684
        if (heap) {