~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/row0mysql.h

  • Committer: Monty Taylor
  • Date: 2010-11-26 22:50:54 UTC
  • mfrom: (1953.1.6 build)
  • Revision ID: mordred@inaugust.com-20101126225054-sg90svw8579t5p3i
Stewart - InnoDB 1.1.1
Monty - Fixed some autoconf tests which were returning false positives.

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        row_prebuilt_t* prebuilt);      /*!< in: prebuilt struct in MySQL
265
265
                                        handle */
266
266
/*********************************************************************//**
267
 
This can only be used when srv_locks_unsafe_for_binlog is TRUE or
268
 
session is using a READ COMMITTED isolation level. Before
269
 
calling this function we must use trx_reset_new_rec_lock_info() and
270
 
trx_register_new_rec_lock() to store the information which new record locks
271
 
really were set. This function removes a newly set lock under prebuilt->pcur,
272
 
and also under prebuilt->clust_pcur. Currently, this is only used and tested
273
 
in the case of an UPDATE or a DELETE statement, where the row lock is of the
274
 
LOCK_X type.
275
 
Thus, this implements a 'mini-rollback' that releases the latest record
276
 
locks we set.
277
 
@return error code or DB_SUCCESS */
 
267
This can only be used when srv_locks_unsafe_for_binlog is TRUE or this
 
268
session is using a READ COMMITTED or READ UNCOMMITTED isolation level.
 
269
Before calling this function row_search_for_mysql() must have
 
270
initialized prebuilt->new_rec_locks to store the information which new
 
271
record locks really were set. This function removes a newly set
 
272
clustered index record lock under prebuilt->pcur or
 
273
prebuilt->clust_pcur.  Thus, this implements a 'mini-rollback' that
 
274
releases the latest clustered index record lock we set.
 
275
@return error code or DB_SUCCESS */
278
276
UNIV_INTERN
279
277
int
280
278
row_unlock_for_mysql(
281
279
/*=================*/
282
 
        row_prebuilt_t* prebuilt,       /*!< in: prebuilt struct in MySQL
 
280
        row_prebuilt_t* prebuilt,       /*!< in/out: prebuilt struct in MySQL
283
281
                                        handle */
284
 
        ibool           has_latches_on_recs);/*!< TRUE if called so that we have
285
 
                                        the latches on the records under pcur
286
 
                                        and clust_pcur, and we do not need to
287
 
                                        reposition the cursors. */
 
282
        ibool           has_latches_on_recs);/*!< in: TRUE if called
 
283
                                        so that we have the latches on
 
284
                                        the records under pcur and
 
285
                                        clust_pcur, and we do not need
 
286
                                        to reposition the cursors. */
288
287
/*********************************************************************//**
289
288
Creates an query graph node of 'update' type to be used in the MySQL
290
289
interface.
695
694
        ulint           new_rec_locks;  /*!< normally 0; if
696
695
                                        srv_locks_unsafe_for_binlog is
697
696
                                        TRUE or session is using READ
698
 
                                        COMMITTED isolation level, in a
699
 
                                        cursor search, if we set a new
700
 
                                        record lock on an index, this is
701
 
                                        incremented; this is used in
702
 
                                        releasing the locks under the
703
 
                                        cursors if we are performing an
704
 
                                        UPDATE and we determine after
705
 
                                        retrieving the row that it does
706
 
                                        not need to be locked; thus,
707
 
                                        these can be used to implement a
708
 
                                        'mini-rollback' that releases
709
 
                                        the latest record locks */
 
697
                                        COMMITTED or READ UNCOMMITTED
 
698
                                        isolation level, set in
 
699
                                        row_search_for_mysql() if we set a new
 
700
                                        record lock on the secondary
 
701
                                        or clustered index; this is
 
702
                                        used in row_unlock_for_mysql()
 
703
                                        when releasing the lock under
 
704
                                        the cursor if we determine
 
705
                                        after retrieving the row that
 
706
                                        it does not need to be locked
 
707
                                        ('mini-rollback') */
710
708
        ulint           mysql_prefix_len;/*!< byte offset of the end of
711
709
                                        the last requested column */
712
710
        ulint           mysql_row_len;  /*!< length in bytes of a row in the