Drizzled Public API Documentation

row0merge.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003 Copyright (C) 2005, 2010, 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 row0merge_h
00028 #define row0merge_h
00029 
00030 #include "univ.i"
00031 #include "data0data.h"
00032 #include "dict0types.h"
00033 #include "trx0types.h"
00034 #include "que0types.h"
00035 #include "mtr0mtr.h"
00036 #include "rem0types.h"
00037 #include "rem0rec.h"
00038 #include "read0types.h"
00039 #include "btr0types.h"
00040 #include "row0mysql.h"
00041 #include "lock0types.h"
00042 
00044 struct merge_index_field_struct {
00045   ulint   prefix_len; 
00047   const char* field_name; 
00048 };
00049 
00051 typedef struct merge_index_field_struct merge_index_field_t;
00052 
00054 struct merge_index_def_struct {
00055   const char*   name;   
00056   ulint     ind_type; 
00058   ulint     n_fields; 
00060   merge_index_field_t*  fields;   
00061 };
00062 
00064 typedef struct merge_index_def_struct merge_index_def_t;
00065 
00066 /*********************************************************************/
00069 UNIV_INTERN
00070 ulint
00071 row_merge_lock_table(
00072 /*=================*/
00073   trx_t*    trx,    
00074   dict_table_t* table,    
00075   enum lock_mode  mode);    
00076 /*********************************************************************/
00080 UNIV_INTERN
00081 void
00082 row_merge_drop_index(
00083 /*=================*/
00084   dict_index_t* index,  
00085   dict_table_t* table,  
00086   trx_t*    trx); 
00087 /*********************************************************************/
00092 UNIV_INTERN
00093 void
00094 row_merge_drop_indexes(
00095 /*===================*/
00096   trx_t*    trx,    
00097   dict_table_t* table,    
00098   dict_index_t**  index,    
00099   ulint   num_created); 
00100 /*********************************************************************/
00102 UNIV_INTERN
00103 void
00104 row_merge_drop_temp_indexes(void);
00105 /*=============================*/
00106 /*********************************************************************/
00111 UNIV_INTERN
00112 ulint
00113 row_merge_rename_tables(
00114 /*====================*/
00115   dict_table_t* old_table,  
00117   dict_table_t* new_table,  
00119   const char* tmp_name, 
00120   trx_t*    trx);   
00122 /*********************************************************************/
00126 UNIV_INTERN
00127 dict_table_t*
00128 row_merge_create_temporary_table(
00129 /*=============================*/
00130   const char*   table_name, 
00131   const merge_index_def_t*index_def,  
00133   const dict_table_t* table,    
00134   trx_t*      trx);   
00136 /*********************************************************************/
00141 UNIV_INTERN
00142 ulint
00143 row_merge_rename_indexes(
00144 /*=====================*/
00145   trx_t*    trx,    
00146   dict_table_t* table);   
00147 /*********************************************************************/
00150 UNIV_INTERN
00151 dict_index_t*
00152 row_merge_create_index(
00153 /*===================*/
00154   trx_t*      trx,  
00155   dict_table_t*   table,  
00156   const merge_index_def_t*index_def);
00158 /*********************************************************************/
00161 UNIV_INTERN
00162 ibool
00163 row_merge_is_index_usable(
00164 /*======================*/
00165   const trx_t*    trx,  
00166   const dict_index_t* index); 
00167 /*********************************************************************/
00171 UNIV_INTERN
00172 ulint
00173 row_merge_drop_table(
00174 /*=================*/
00175   trx_t*    trx,    
00176   dict_table_t* table);   
00178 /*********************************************************************/
00183 UNIV_INTERN
00184 ulint
00185 row_merge_build_indexes(
00186 /*====================*/
00187   trx_t*    trx,    
00188   dict_table_t* old_table,  
00190   dict_table_t* new_table,  
00193   dict_index_t**  indexes,  
00194   ulint   n_indexes,  
00195   TABLE*  table);   
00198 #endif /* row0merge.h */