1457
1457
/*************************************************************************
1458
This can only be used when srv_locks_unsafe_for_binlog is TRUE or
1459
this session is using a READ COMMITTED isolation level. Before
1460
calling this function we must use trx_reset_new_rec_lock_info() and
1461
trx_register_new_rec_lock() to store the information which new record locks
1462
really were set. This function removes a newly set lock under prebuilt->pcur,
1463
and also under prebuilt->clust_pcur. Currently, this is only used and tested
1464
in the case of an UPDATE or a DELETE statement, where the row lock is of the
1466
Thus, this implements a 'mini-rollback' that releases the latest record
1458
This can only be used when srv_locks_unsafe_for_binlog is TRUE or this
1459
session is using a READ COMMITTED or READ UNCOMMITTED isolation level.
1460
Before calling this function row_search_for_mysql() must have
1461
initialized prebuilt->new_rec_locks to store the information which new
1462
record locks really were set. This function removes a newly set
1463
clustered index record lock under prebuilt->pcur or
1464
prebuilt->clust_pcur. Thus, this implements a 'mini-rollback' that
1465
releases the latest clustered index record lock we set. */
1470
1468
row_unlock_for_mysql(
1471
1469
/*=================*/
1472
1470
/* out: error code or DB_SUCCESS */
1473
row_prebuilt_t* prebuilt, /* in: prebuilt struct in MySQL
1471
row_prebuilt_t* prebuilt, /* in/out: prebuilt struct in MySQL
1475
1473
ibool has_latches_on_recs)/* TRUE if called so that we have
1476
1474
the latches on the records under pcur