~ubuntu-branches/ubuntu/utopic/mariadb-5.5/utopic-security

« back to all changes in this revision

Viewing changes to storage/xtradb/row/row0sel.c

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2014-08-27 21:12:36 UTC
  • mfrom: (2.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20140827211236-se41hwfe4xy0hpef
* d/control: Removed Provides: libmysqlclient-dev (Closes: #759309)
* d/control: Removed Provides: libmysqld-dev with same motivation
* Re-introduced tha HPPA build patch as the upstream fix wasn't complete
* Fixed all kFreeBSD build and test suite issues
* Added Italian translation (Closes: #759813)

Show diffs side-by-side

added added

removed removed

Lines of Context:
879
879
 
880
880
        if (!node->read_view) {
881
881
                /* Try to place a lock on the index record */
 
882
                ulint   lock_type;
 
883
                trx_t*  trx;
 
884
 
 
885
                trx = thr_get_trx(thr);
882
886
 
883
887
                /* If innodb_locks_unsafe_for_binlog option is used
884
 
                or this session is using READ COMMITTED isolation level
 
888
                or this session is using READ COMMITTED or lower isolation level
885
889
                we lock only the record, i.e., next-key locking is
886
890
                not used. */
887
 
                ulint   lock_type;
888
 
                trx_t*  trx;
889
 
 
890
 
                trx = thr_get_trx(thr);
891
 
 
892
891
                if (srv_locks_unsafe_for_binlog
893
892
                    || trx->isolation_level <= TRX_ISO_READ_COMMITTED) {
894
893
                        lock_type = LOCK_REC_NOT_GAP;
1494
1493
                search result set, resulting in the phantom problem. */
1495
1494
 
1496
1495
                if (!consistent_read) {
1497
 
 
1498
 
                        /* If innodb_locks_unsafe_for_binlog option is used
1499
 
                        or this session is using READ COMMITTED isolation
1500
 
                        level, we lock only the record, i.e., next-key
1501
 
                        locking is not used. */
1502
 
 
1503
1496
                        rec_t*  next_rec = page_rec_get_next(rec);
1504
1497
                        ulint   lock_type;
1505
1498
                        trx_t*  trx;
1509
1502
                        offsets = rec_get_offsets(next_rec, index, offsets,
1510
1503
                                                  ULINT_UNDEFINED, &heap);
1511
1504
 
 
1505
                        /* If innodb_locks_unsafe_for_binlog option is used
 
1506
                        or this session is using READ COMMITTED or lower isolation
 
1507
                        level, we lock only the record, i.e., next-key
 
1508
                        locking is not used. */
1512
1509
                        if (srv_locks_unsafe_for_binlog
1513
1510
                            || trx->isolation_level
1514
1511
                            <= TRX_ISO_READ_COMMITTED) {
1557
1554
 
1558
1555
        if (!consistent_read) {
1559
1556
                /* Try to place a lock on the index record */
1560
 
 
1561
 
                /* If innodb_locks_unsafe_for_binlog option is used
1562
 
                or this session is using READ COMMITTED isolation level,
1563
 
                we lock only the record, i.e., next-key locking is
1564
 
                not used. */
1565
 
 
1566
1557
                ulint   lock_type;
1567
1558
                trx_t*  trx;
1568
1559
 
1571
1562
 
1572
1563
                trx = thr_get_trx(thr);
1573
1564
 
 
1565
                /* If innodb_locks_unsafe_for_binlog option is used
 
1566
                or this session is using READ COMMITTED or lower isolation level,
 
1567
                we lock only the record, i.e., next-key locking is
 
1568
                not used. */
1574
1569
                if (srv_locks_unsafe_for_binlog
1575
1570
                    || trx->isolation_level <= TRX_ISO_READ_COMMITTED) {
1576
1571
 
4142
4137
                        /* Try to place a lock on the index record */
4143
4138
 
4144
4139
                        /* If innodb_locks_unsafe_for_binlog option is used
4145
 
                        or this session is using a READ COMMITTED isolation
 
4140
                        or this session is using a READ COMMITTED or lower isolation
4146
4141
                        level we do not lock gaps. Supremum record is really
4147
4142
                        a gap and therefore we do not set locks there. */
4148
4143
 
4289
4284
                                /* Try to place a gap lock on the index
4290
4285
                                record only if innodb_locks_unsafe_for_binlog
4291
4286
                                option is not set or this session is not
4292
 
                                using a READ COMMITTED isolation level. */
 
4287
                                using a READ COMMITTED or lower isolation level. */
4293
4288
 
4294
4289
                                err = sel_set_rec_lock(
4295
4290
                                        btr_pcur_get_block(pcur),
4336
4331
                                /* Try to place a gap lock on the index
4337
4332
                                record only if innodb_locks_unsafe_for_binlog
4338
4333
                                option is not set or this session is not
4339
 
                                using a READ COMMITTED isolation level. */
 
4334
                                using a READ COMMITTED or lower isolation level. */
4340
4335
 
4341
4336
                                err = sel_set_rec_lock(
4342
4337
                                        btr_pcur_get_block(pcur),