16 #include <sys/types.h> 
   19 #include "transparent_file.h" 
   21 #define DEFAULT_CHAIN_LENGTH 512 
   27 #define TINA_VERSION 1 
   31   char data_file_name[FN_REFLEN];
 
   32   uint table_name_length, use_count;
 
   43   my_off_t saved_data_file_length;
 
   46   bool update_file_opened;
 
   47   bool tina_write_opened;
 
   49   File tina_write_filedes;  
 
   51   ha_rows rows_recorded;    
 
   52   uint data_file_version;   
 
   64   my_off_t current_position;  
 
   65   my_off_t next_position;     
 
   66   my_off_t local_saved_data_file_length; 
 
   67   my_off_t temp_file_length;
 
   68   uchar byte_buffer[IO_SIZE];
 
   71   File update_temp_file;
 
   78   tina_set chain_buffer[DEFAULT_CHAIN_LENGTH];
 
   83   uint local_data_file_version;  
 
   84   bool records_is_known;
 
   88   bool get_write_pos(my_off_t *end_pos, 
tina_set *closest_hole);
 
   89   int open_update_temp_file_if_needed();
 
   90   int init_tina_writer();
 
  101     free_root(&blobroot, MYF(0));
 
  104   const char *index_type(uint inx) { 
return "NONE"; }
 
  106   ulonglong table_flags()
 const 
  108     return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_NO_AUTO_INCREMENT |
 
  109             HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
 
  112   ulong index_flags(uint idx, uint part, 
bool all_parts)
 const 
  120   uint max_record_length()
 const { 
return HA_MAX_REC_LENGTH; }
 
  121   uint max_keys()
          const { 
return 0; }
 
  122   uint max_key_parts()
     const { 
return 0; }
 
  123   uint max_key_length()
    const { 
return 0; }
 
  127   virtual double scan_time() { 
return (
double) (
stats.records+
stats.deleted) / 20.0+10; }
 
  129   virtual bool fast_key_read() { 
return 1;}
 
  137   int open(
const char *
name, 
int mode, uint open_options);
 
  139   int write_row(uchar * 
buf);
 
  140   int update_row(
const uchar * old_data, uchar * new_data);
 
  141   int delete_row(
const uchar * 
buf);
 
  145   bool check_and_repair(THD *thd);
 
  147   bool is_crashed() 
const;
 
  151   bool auto_repair()
 const { 
return 1; }
 
  152   void position(
const uchar *
record);
 
  154   int extra(
enum ha_extra_function operation);
 
  161       enum thr_lock_type lock_type);
 
  168   void update_status();
 
  171   int encode_quote(uchar *
buf);
 
  172   int find_current_row(uchar *
buf);