Commit 73addb4d authored by brian@avenger.(none)'s avatar brian@avenger.(none)

Remove build errors introduced by 5.0 changes.

Removed duplicate code where defaults in handler.h will work just as well. 
parent 2fd0ae51
......@@ -530,7 +530,7 @@ int ha_archive::write_row(byte * buf)
z_off_t written;
DBUG_ENTER("ha_archive::write_row");
statistic_increment(ha_write_count,&LOCK_status);
statistic_increment(table->in_use->status_var.ha_write_count, &LOCK_status);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
table->timestamp_field->set_time();
pthread_mutex_lock(&share->mutex);
......@@ -671,7 +671,8 @@ int ha_archive::rnd_next(byte *buf)
DBUG_RETURN(HA_ERR_END_OF_FILE);
scan_rows--;
statistic_increment(ha_read_rnd_next_count,&LOCK_status);
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
&LOCK_status);
current_position= gztell(archive);
rc= get_row(archive, buf);
......@@ -707,7 +708,8 @@ void ha_archive::position(const byte *record)
int ha_archive::rnd_pos(byte * buf, byte *pos)
{
DBUG_ENTER("ha_archive::rnd_pos");
statistic_increment(ha_read_rnd_count,&LOCK_status);
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
&LOCK_status);
current_position= ha_get_ptr(pos, ref_length);
z_off_t seek= gzseek(archive, current_position, SEEK_SET);
......@@ -870,71 +872,6 @@ THR_LOCK_DATA **ha_archive::store_lock(THD *thd,
return to;
}
/******************************************************************************
Everything below here is default, please look at ha_example.cc for
descriptions.
******************************************************************************/
int ha_archive::update_row(const byte * old_data, byte * new_data)
{
DBUG_ENTER("ha_archive::update_row");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_archive::delete_row(const byte * buf)
{
DBUG_ENTER("ha_archive::delete_row");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_archive::index_read(byte * buf, const byte * key,
uint key_len __attribute__((unused)),
enum ha_rkey_function find_flag
__attribute__((unused)))
{
DBUG_ENTER("ha_archive::index_read");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_archive::index_read_idx(byte * buf, uint index, const byte * key,
uint key_len __attribute__((unused)),
enum ha_rkey_function find_flag
__attribute__((unused)))
{
DBUG_ENTER("ha_archive::index_read_idx");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_archive::index_next(byte * buf)
{
DBUG_ENTER("ha_archive::index_next");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_archive::index_prev(byte * buf)
{
DBUG_ENTER("ha_archive::index_prev");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_archive::index_first(byte * buf)
{
DBUG_ENTER("ha_archive::index_first");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_archive::index_last(byte * buf)
{
DBUG_ENTER("ha_archive::index_last");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
void ha_archive::info(uint flag)
{
DBUG_ENTER("ha_archive::info");
......@@ -945,23 +882,4 @@ void ha_archive::info(uint flag)
DBUG_VOID_RETURN;
}
int ha_archive::extra(enum ha_extra_function operation)
{
DBUG_ENTER("ha_archive::extra");
DBUG_RETURN(0);
}
int ha_archive::reset(void)
{
DBUG_ENTER("ha_archive::reset");
DBUG_RETURN(0);
}
ha_rows ha_archive::records_in_range(uint inx, key_range *min_key,
key_range *max_key)
{
DBUG_ENTER("ha_archive::records_in_range ");
DBUG_RETURN(records); // HA_ERR_WRONG_COMMAND
}
#endif /* HAVE_ARCHIVE_DB */
......@@ -78,31 +78,9 @@ class ha_archive: public handler
{
return 0;
}
/*
Have to put something here, there is no real limit as far as
archive is concerned.
*/
uint max_supported_record_length() const { return UINT_MAX; }
/*
Called in test_quick_select to determine if indexes should be used.
*/
virtual double scan_time() { return (double) (records) / 20.0+10; }
/* The next method will never be called */
virtual double read_time(uint index, uint ranges, ha_rows rows)
{ return (double) rows / 20.0+1; }
int open(const char *name, int mode, uint test_if_locked);
int close(void);
int write_row(byte * buf);
int update_row(const byte * old_data, byte * new_data);
int delete_row(const byte * buf);
int index_read(byte * buf, const byte * key,
uint key_len, enum ha_rkey_function find_flag);
int index_read_idx(byte * buf, uint idx, const byte * key,
uint key_len, enum ha_rkey_function find_flag);
int index_next(byte * buf);
int index_prev(byte * buf);
int index_first(byte * buf);
int index_last(byte * buf);
int rnd_init(bool scan=1);
int rnd_next(byte *buf);
int rnd_pos(byte * buf, byte *pos);
......@@ -116,10 +94,7 @@ class ha_archive: public handler
int write_data_header(gzFile file_to_write);
void position(const byte *record);
void info(uint);
int extra(enum ha_extra_function operation);
int reset(void);
int external_lock(THD *thd, int lock_type);
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment