~ubuntu-branches/ubuntu/quantal/mysql-5.5/quantal-security

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-07-23 19:08:38 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130723190838-5gq97s6jx3163lx0
Tags: 5.5.32-0ubuntu0.12.10.1
* SECURITY UPDATE: Update to 5.5.32 to fix security issues (LP: #1203828)
  - http://www.oracle.com/technetwork/topics/security/cpujuly2013-1899826.html
  - CVE-2013-1861
  - CVE-2013-3783
  - CVE-2013-3793
  - CVE-2013-3802
  - CVE-2013-3804
  - CVE-2013-3809
  - CVE-2013-3812
* SECURITY UPDATE: insecure creation of debian.cnf file
  - debian/mysql-server-5.5.postinst: set umask to 066 before creating
    debian.cnf.
  - CVE-2013-2162
* Adjust Apparmor profile to allow reading PID file. (LP: #1185573)
* Fix FTBFS from test suite failure
  - debian/patches/72_fix_rpl_deadlock_innodb_test.patch: ignore warning
    from rpl.rpl_deadlock_innodb test in mysql-test/include/mtr_warnings.sql.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
 
3
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
1698
1698
        do {
1699
1699
                const rec_t*            rec     = btr_pcur_get_rec(&pcur);
1700
1700
                const buf_block_t*      block   = btr_pcur_get_block(&pcur);
 
1701
                ulint                   lock_type;
1701
1702
 
1702
1703
                if (page_rec_is_infimum(rec)) {
1703
1704
 
1707
1708
                offsets = rec_get_offsets(rec, index, offsets,
1708
1709
                                          ULINT_UNDEFINED, &heap);
1709
1710
 
 
1711
                /* If the transaction isolation level is no stronger than
 
1712
                READ COMMITTED, then avoid gap locks. */
 
1713
                if (!page_rec_is_supremum(rec)
 
1714
                    && thr_get_trx(thr)->isolation_level
 
1715
                                        <= TRX_ISO_READ_COMMITTED) {
 
1716
                        lock_type = LOCK_REC_NOT_GAP;
 
1717
                } else {
 
1718
                        lock_type = LOCK_ORDINARY;
 
1719
                }
 
1720
 
1710
1721
                if (allow_duplicates) {
1711
1722
 
1712
1723
                        /* If the SQL-query will update or replace
1715
1726
                        INSERT ON DUPLICATE KEY UPDATE). */
1716
1727
 
1717
1728
                        err = row_ins_set_exclusive_rec_lock(
1718
 
                                LOCK_ORDINARY, block,
1719
 
                                rec, index, offsets, thr);
 
1729
                                lock_type, block, rec, index, offsets, thr);
1720
1730
                } else {
1721
1731
 
1722
1732
                        err = row_ins_set_shared_rec_lock(
1723
 
                                LOCK_ORDINARY, block,
1724
 
                                rec, index, offsets, thr);
 
1733
                                lock_type, block, rec, index, offsets, thr);
1725
1734
                }
1726
1735
 
1727
1736
                switch (err) {