Drizzled Public API Documentation

read0read.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003 Copyright (C) 1997, 2009, Innobase Oy. All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify it under
00006 the terms of the GNU General Public License as published by the Free Software
00007 Foundation; version 2 of the License.
00008 
00009 This program is distributed in the hope that it will be useful, but WITHOUT
00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with
00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
00015 St, Fifth Floor, Boston, MA 02110-1301 USA
00016 
00017 *****************************************************************************/
00018 
00019 /**************************************************/
00026 #pragma once
00027 #ifndef read0read_h
00028 #define read0read_h
00029 
00030 #include "univ.i"
00031 
00032 
00033 #include "ut0byte.h"
00034 #include "ut0lst.h"
00035 #include "trx0trx.h"
00036 #include "read0types.h"
00037 
00038 /*********************************************************************/
00042 UNIV_INTERN
00043 read_view_t*
00044 read_view_open_now(
00045 /*===============*/
00046   trx_id_t  cr_trx_id,  
00048   mem_heap_t* heap);    
00050 /*********************************************************************/
00054 UNIV_INTERN
00055 read_view_t*
00056 read_view_oldest_copy_or_open_new(
00057 /*==============================*/
00058   trx_id_t  cr_trx_id,  
00060   mem_heap_t* heap);    
00062 /*********************************************************************/
00064 UNIV_INTERN
00065 void
00066 read_view_close(
00067 /*============*/
00068   read_view_t*  view);  
00069 /*********************************************************************/
00072 UNIV_INTERN
00073 void
00074 read_view_close_for_mysql(
00075 /*======================*/
00076   trx_t*  trx); 
00077 /*********************************************************************/
00080 UNIV_INLINE
00081 ibool
00082 read_view_sees_trx_id(
00083 /*==================*/
00084   const read_view_t*  view, 
00085   trx_id_t    trx_id);
00086 /*********************************************************************/
00088 UNIV_INTERN
00089 void
00090 read_view_print(
00091 /*============*/
00092   const read_view_t*  view);  
00093 /*********************************************************************/
00097 UNIV_INTERN
00098 cursor_view_t*
00099 read_cursor_view_create_for_mysql(
00100 /*==============================*/
00101   trx_t*    cr_trx);
00102 /*********************************************************************/
00105 UNIV_INTERN
00106 void
00107 read_cursor_view_close_for_mysql(
00108 /*=============================*/
00109   trx_t*    trx,    
00110   cursor_view_t*  curview); 
00111 /*********************************************************************/
00115 UNIV_INTERN
00116 void
00117 read_cursor_set_for_mysql(
00118 /*======================*/
00119   trx_t*    trx,  
00120   cursor_view_t*  curview);
00125 struct read_view_struct{
00126   ulint   type; 
00127   undo_no_t undo_no;
00131   trx_id_t  low_limit_no;
00137   trx_id_t  low_limit_id;
00141   trx_id_t  up_limit_id;
00146   ulint   n_trx_ids;
00148   trx_id_t* trx_ids;
00156   trx_id_t  creator_trx_id;
00159   UT_LIST_NODE_T(read_view_t) view_list;
00161 };
00162 
00164 #define VIEW_NORMAL   1 
00168 #define VIEW_HIGH_GRANULARITY 2 
00173 /* @} */
00174 
00179 struct cursor_view_struct{
00180   mem_heap_t* heap;
00182   read_view_t*  read_view;
00184 };
00185 
00186 #ifndef UNIV_NONINL
00187 #include "read0read.ic"
00188 #endif
00189 
00190 #endif