~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-10-27 21:00:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1886.
  • Revision ID: brian@tangent.org-20101027210049-zfpgx2cfbrh8maq9
A couple of fixes to documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1996, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1996, 2009, Innobase Oy. 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
340
340
        que_thr_t*      thr,    /*!< in: query thread */
341
341
        mtr_t*          mtr);   /*!< in/out: mini-transaction */
342
342
/*********************************************************************//**
343
 
Like lock_clust_rec_read_check_and_lock(), but reads a
 
343
Like the counterpart for a clustered index below, but now we read a
344
344
secondary index record.
345
 
@return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, DB_DEADLOCK,
346
 
or DB_QUE_THR_SUSPENDED */
 
345
@return DB_SUCCESS, DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
347
346
UNIV_INTERN
348
 
enum db_err
 
347
ulint
349
348
lock_sec_rec_read_check_and_lock(
350
349
/*=============================*/
351
350
        ulint                   flags,  /*!< in: if BTR_NO_LOCKING_FLAG
372
371
puts the transaction and the query thread to the lock wait state and inserts a
373
372
waiting request for a record lock to the lock queue. Sets the requested mode
374
373
lock on the record.
375
 
@return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, DB_DEADLOCK,
376
 
or DB_QUE_THR_SUSPENDED */
 
374
@return DB_SUCCESS, DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
377
375
UNIV_INTERN
378
 
enum db_err
 
376
ulint
379
377
lock_clust_rec_read_check_and_lock(
380
378
/*===============================*/
381
379
        ulint                   flags,  /*!< in: if BTR_NO_LOCKING_FLAG
615
613
        FILE*           file,   /*!< in: file where to print */
616
614
        const lock_t*   lock);  /*!< in: record type lock */
617
615
/*********************************************************************//**
618
 
Prints info of locks for all transactions.
619
 
@return FALSE if not able to obtain kernel mutex
620
 
and exits without printing info */
 
616
Prints info of locks for all transactions. */
621
617
UNIV_INTERN
622
 
ibool
 
618
void
623
619
lock_print_info_summary(
624
620
/*====================*/
625
 
        FILE*   file,   /*!< in: file where to print */
626
 
        ibool   nowait);/*!< in: whether to wait for the kernel mutex */
627
 
/*************************************************************************
 
621
        FILE*   file);  /*!< in: file where to print */
 
622
/*********************************************************************//**
628
623
Prints info of locks for each transaction. */
629
624
UNIV_INTERN
630
625
void
639
634
ulint
640
635
lock_number_of_rows_locked(
641
636
/*=======================*/
642
 
        const trx_t*    trx);   /*!< in: transaction */
 
637
        trx_t*  trx);   /*!< in: transaction */
643
638
/*******************************************************************//**
644
639
Check if a transaction holds any autoinc locks.
645
640
@return TRUE if the transaction holds any AUTOINC locks. */
670
665
Gets the id of the transaction owning a lock.
671
666
@return transaction id */
672
667
UNIV_INTERN
673
 
trx_id_t
 
668
ullint
674
669
lock_get_trx_id(
675
670
/*============*/
676
671
        const lock_t*   lock);  /*!< in: lock */
699
694
Gets the id of the table on which the lock is.
700
695
@return id of the table */
701
696
UNIV_INTERN
702
 
table_id_t
 
697
ullint
703
698
lock_get_table_id(
704
699
/*==============*/
705
700
        const lock_t*   lock);  /*!< in: lock */