mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Remove build errors introduced by 5.0 changes.
Removed duplicate code where defaults in handler.h will work just as well.
This commit is contained in:
@@ -530,7 +530,7 @@ int ha_archive::write_row(byte * buf)
|
|||||||
z_off_t written;
|
z_off_t written;
|
||||||
DBUG_ENTER("ha_archive::write_row");
|
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)
|
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
|
||||||
table->timestamp_field->set_time();
|
table->timestamp_field->set_time();
|
||||||
pthread_mutex_lock(&share->mutex);
|
pthread_mutex_lock(&share->mutex);
|
||||||
@@ -671,7 +671,8 @@ int ha_archive::rnd_next(byte *buf)
|
|||||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||||
scan_rows--;
|
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);
|
current_position= gztell(archive);
|
||||||
rc= get_row(archive, buf);
|
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)
|
int ha_archive::rnd_pos(byte * buf, byte *pos)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_archive::rnd_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);
|
current_position= ha_get_ptr(pos, ref_length);
|
||||||
z_off_t seek= gzseek(archive, current_position, SEEK_SET);
|
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;
|
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)
|
void ha_archive::info(uint flag)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_archive::info");
|
DBUG_ENTER("ha_archive::info");
|
||||||
@@ -945,23 +882,4 @@ void ha_archive::info(uint flag)
|
|||||||
|
|
||||||
DBUG_VOID_RETURN;
|
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 */
|
#endif /* HAVE_ARCHIVE_DB */
|
||||||
|
@@ -78,31 +78,9 @@ public:
|
|||||||
{
|
{
|
||||||
return 0;
|
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 open(const char *name, int mode, uint test_if_locked);
|
||||||
int close(void);
|
int close(void);
|
||||||
int write_row(byte * buf);
|
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_init(bool scan=1);
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
@@ -116,10 +94,7 @@ public:
|
|||||||
int write_data_header(gzFile file_to_write);
|
int write_data_header(gzFile file_to_write);
|
||||||
void position(const byte *record);
|
void position(const byte *record);
|
||||||
void info(uint);
|
void info(uint);
|
||||||
int extra(enum ha_extra_function operation);
|
|
||||||
int reset(void);
|
|
||||||
int external_lock(THD *thd, int lock_type);
|
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 create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
|
||||||
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
||||||
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
||||||
|
Reference in New Issue
Block a user