~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/csv/ha_tina.cc

  • Committer: Brian Aker
  • Date: 2009-04-13 16:22:40 UTC
  • mfrom: (971.1.78 mordred)
  • Revision ID: brian@gaz-20090413162240-ugi3gvhofmcuglzl
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
  }
118
118
};
119
119
 
120
 
static int tina_init_func(void *p)
 
120
static Tina *tina_engine= NULL;
 
121
 
 
122
static int tina_init_func(PluginRegistry &registry)
121
123
{
122
 
  StorageEngine **engine= static_cast<StorageEngine **>(p);
123
124
 
124
 
  Tina *tina_engine= new Tina(engine_name);
 
125
  tina_engine= new Tina(engine_name);
 
126
  registry.add(tina_engine);
125
127
 
126
128
  pthread_mutex_init(&tina_mutex,MY_MUTEX_INIT_FAST);
127
129
  (void) hash_init(&tina_open_tables,system_charset_info,32,0,0,
128
130
                   (hash_get_key) tina_get_key,0,0);
129
 
  *engine= tina_engine;
130
131
  return 0;
131
132
}
132
133
 
133
 
static int tina_done_func(void *p)
 
134
static int tina_done_func(PluginRegistry &registry)
134
135
{
135
 
  Tina *tina_engine= static_cast<Tina *>(p);
 
136
  registry.remove(tina_engine);
136
137
  delete tina_engine;
137
138
 
138
139
  hash_free(&tina_open_tables);
600
601
    return(HA_ERR_END_OF_FILE);
601
602
 
602
603
  /* We must read all columns in case a table is opened for update */
603
 
  read_all= !bitmap_is_clear_all(table->write_set);
 
604
  read_all= !table->write_set->none();
604
605
  error= HA_ERR_CRASHED_ON_USAGE;
605
606
 
606
607
  memset(buf, 0, table->s->null_bytes);
670
671
      }
671
672
    }
672
673
 
673
 
    if (read_all || bitmap_is_set(table->read_set, (*field)->field_index))
 
674
    if (read_all || table->read_set->test((*field)->field_index))
674
675
    {
675
676
      if ((*field)->store(buffer.ptr(), buffer.length(), buffer.charset(),
676
677
                          CHECK_FIELD_WARN))
1537
1538
 
1538
1539
drizzle_declare_plugin(csv)
1539
1540
{
1540
 
  DRIZZLE_STORAGE_ENGINE_PLUGIN,
1541
1541
  "CSV",
1542
1542
  "1.0",
1543
1543
  "Brian Aker, MySQL AB",