~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/csv/ha_tina.cc

  • Committer: Brian Aker
  • Date: 2008-12-05 07:03:50 UTC
  • Revision ID: brian@tangent.org-20081205070350-gvef0krbqgx3kv08
More solaris bits

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
  return ( a->begin > b->begin ? 1 : ( a->begin < b->begin ? -1 : 0 ) );
97
97
}
98
98
 
99
 
static unsigned char* tina_get_key(TINA_SHARE *share, size_t *length,
100
 
                          bool not_used __attribute__((unused)))
 
99
static unsigned char* tina_get_key(TINA_SHARE *share, size_t *length, bool)
101
100
{
102
101
  *length=share->table_name_length;
103
102
  return (unsigned char*) share->table_name;
118
117
  return 0;
119
118
}
120
119
 
121
 
static int tina_done_func(void *p __attribute__((unused)))
 
120
static int tina_done_func(void *)
122
121
{
123
122
  hash_free(&tina_open_tables);
124
123
  pthread_mutex_destroy(&tina_mutex);
130
129
/*
131
130
  Simple lock controls.
132
131
*/
133
 
static TINA_SHARE *get_share(const char *table_name,
134
 
                             Table *table __attribute__((unused)))
 
132
static TINA_SHARE *get_share(const char *table_name, Table *)
135
133
{
136
134
  TINA_SHARE *share;
137
135
  char meta_file_name[FN_REFLEN];
447
445
  Encode a buffer into the quoted format.
448
446
*/
449
447
 
450
 
int ha_tina::encode_quote(unsigned char *buf __attribute__((unused)))
 
448
int ha_tina::encode_quote(unsigned char *)
451
449
{
452
450
  char attribute_buffer[1024];
453
451
  String attribute(attribute_buffer, sizeof(attribute_buffer),
715
713
  for CSV engine. For more details see mysys/thr_lock.c
716
714
*/
717
715
 
718
 
void tina_get_status(void* param,
719
 
                     int concurrent_insert __attribute__((unused)))
 
716
void tina_get_status(void* param, int)
720
717
{
721
718
  ha_tina *tina= (ha_tina*) param;
722
719
  tina->get_status();
729
726
}
730
727
 
731
728
/* this should exist and return 0 for concurrent insert to work */
732
 
bool tina_check_status(void* param __attribute__((unused)))
 
729
bool tina_check_status(void *)
733
730
{
734
731
  return 0;
735
732
}
784
781
  this will not be called for every request. Any sort of positions
785
782
  that need to be reset should be kept in the ::extra() call.
786
783
*/
787
 
int ha_tina::open(const char *name, int mode __attribute__((unused)),
788
 
                  uint32_t open_options)
 
784
int ha_tina::open(const char *name, int, uint32_t open_options)
789
785
{
790
786
  if (!(share= get_share(name, table)))
791
787
    return(HA_ERR_OUT_OF_MEM);
895
891
  This will be called in a table scan right before the previous ::rnd_next()
896
892
  call.
897
893
*/
898
 
int ha_tina::update_row(const unsigned char * old_data __attribute__((unused)),
899
 
                        unsigned char * new_data)
 
894
int ha_tina::update_row(const unsigned char *, unsigned char * new_data)
900
895
{
901
896
  int size;
902
897
  int rc= -1;
941
936
  The table will then be deleted/positioned based on the ORDER (so RANDOM,
942
937
  DESC, ASC).
943
938
*/
944
 
int ha_tina::delete_row(const unsigned char * buf __attribute__((unused)))
 
939
int ha_tina::delete_row(const unsigned char *)
945
940
{
946
941
  ha_statistic_increment(&SSV::ha_delete_count);
947
942
 
1017
1012
 
1018
1013
*/
1019
1014
 
1020
 
int ha_tina::rnd_init(bool scan __attribute__((unused)))
 
1015
int ha_tina::rnd_init(bool)
1021
1016
{
1022
1017
  /* set buffer to the beginning of the file */
1023
1018
  if (share->crashed || init_data_file())
1078
1073
  its just a position. Look at the bdb code if you want to see a case
1079
1074
  where something other then a number is stored.
1080
1075
*/
1081
 
void ha_tina::position(const unsigned char *record __attribute__((unused)))
 
1076
void ha_tina::position(const unsigned char *)
1082
1077
{
1083
1078
  my_store_ptr(ref, ref_length, current_position);
1084
1079
  return;
1102
1097
  Currently this table handler doesn't implement most of the fields
1103
1098
  really needed. SHOW also makes use of this data
1104
1099
*/
1105
 
int ha_tina::info(uint32_t flag __attribute__((unused)))
 
1100
int ha_tina::info(uint32_t)
1106
1101
{
1107
1102
  /* This is a lie, but you don't want the optimizer to see zero or 1 */
1108
1103
  if (!records_is_known && stats.records < 2) 
1274
1269
         rows (after the first bad one) as well.
1275
1270
*/
1276
1271
 
1277
 
int ha_tina::repair(Session* session,
1278
 
                    HA_CHECK_OPT* check_opt __attribute__((unused)))
 
1272
int ha_tina::repair(Session* session, HA_CHECK_OPT *)
1279
1273
{
1280
1274
  char repaired_fname[FN_REFLEN];
1281
1275
  unsigned char *buf;
1420
1414
  Called by the database to lock the table. Keep in mind that this
1421
1415
  is an internal lock.
1422
1416
*/
1423
 
THR_LOCK_DATA **ha_tina::store_lock(Session *session __attribute__((unused)),
 
1417
THR_LOCK_DATA **ha_tina::store_lock(Session *,
1424
1418
                                    THR_LOCK_DATA **to,
1425
1419
                                    enum thr_lock_type lock_type)
1426
1420
{
1435
1429
  this (the database will call ::open() if it needs to).
1436
1430
*/
1437
1431
 
1438
 
int ha_tina::create(const char *name, Table *table_arg,
1439
 
                    HA_CREATE_INFO *create_info __attribute__((unused)))
 
1432
int ha_tina::create(const char *name, Table *table_arg, HA_CREATE_INFO *)
1440
1433
{
1441
1434
  char name_buff[FN_REFLEN];
1442
1435
  File create_file;
1472
1465
  return(0);
1473
1466
}
1474
1467
 
1475
 
int ha_tina::check(Session* session,
1476
 
                   HA_CHECK_OPT* check_opt __attribute__((unused)))
 
1468
int ha_tina::check(Session* session, HA_CHECK_OPT *)
1477
1469
{
1478
1470
  int rc= 0;
1479
1471
  unsigned char *buf;
1523
1515
}
1524
1516
 
1525
1517
 
1526
 
bool ha_tina::check_if_incompatible_data(HA_CREATE_INFO *info __attribute__((unused)),
1527
 
                                         uint32_t table_changes __attribute__((unused)))
 
1518
bool ha_tina::check_if_incompatible_data(HA_CREATE_INFO *, uint32_t)
1528
1519
{
1529
1520
  return COMPATIBLE_DATA_YES;
1530
1521
}