mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
cleanup: remove dead code
This commit is contained in:
parent
ffb83ba650
commit
3d7e06d4ab
3 changed files with 1 additions and 103 deletions
|
@ -1443,17 +1443,6 @@ public:
|
|||
void append_row_to_str(String &str);
|
||||
public:
|
||||
|
||||
/*
|
||||
-------------------------------------------------------------------------
|
||||
Admin commands not supported currently (almost purely MyISAM routines)
|
||||
This means that the following methods are not implemented:
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
virtual int backup(TD* thd, HA_CHECK_OPT *check_opt);
|
||||
virtual int restore(THD* thd, HA_CHECK_OPT *check_opt);
|
||||
virtual int dump(THD* thd, int fd = -1);
|
||||
virtual int net_read_dump(NET* net);
|
||||
*/
|
||||
/* Enabled keycache for performance reasons, WL#4571 */
|
||||
virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt);
|
||||
virtual int preload_keys(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
|
|
|
@ -1081,92 +1081,7 @@ uint ha_maria::max_supported_key_length() const
|
|||
return maria_max_key_length();
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_REPLICATION
|
||||
int ha_maria::net_read_dump(NET * net)
|
||||
{
|
||||
int data_fd= file->dfile.file;
|
||||
int error= 0;
|
||||
|
||||
mysql_file_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME));
|
||||
for (;;)
|
||||
{
|
||||
ulong packet_len= my_net_read(net);
|
||||
if (!packet_len)
|
||||
break; // end of file
|
||||
if (packet_len == packet_error)
|
||||
{
|
||||
sql_print_error("ha_maria::net_read_dump - read error ");
|
||||
error= -1;
|
||||
goto err;
|
||||
}
|
||||
if (mysql_file_write(data_fd, (uchar *) net->read_pos, (uint) packet_len,
|
||||
MYF(MY_WME | MY_FNABP)))
|
||||
{
|
||||
error= errno;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
err:
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
int ha_maria::dump(THD * thd, int fd)
|
||||
{
|
||||
MARIA_SHARE *share= file->s;
|
||||
NET *net= &thd->net;
|
||||
uint block_size= share->block_size;
|
||||
my_off_t bytes_to_read= share->state.state.data_file_length;
|
||||
int data_fd= file->dfile.file;
|
||||
uchar *buf= (uchar *) my_malloc(block_size, MYF(MY_WME));
|
||||
if (!buf)
|
||||
return ENOMEM;
|
||||
|
||||
int error= 0;
|
||||
mysql_file_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME));
|
||||
for (; bytes_to_read > 0;)
|
||||
{
|
||||
size_t bytes= mysql_file_read(data_fd, buf, block_size, MYF(MY_WME));
|
||||
if (bytes == MY_FILE_ERROR)
|
||||
{
|
||||
error= errno;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (fd >= 0)
|
||||
{
|
||||
if (mysql_file_write(fd, buf, bytes, MYF(MY_WME | MY_FNABP)))
|
||||
{
|
||||
error= errno ? errno : EPIPE;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (my_net_write(net, buf, bytes))
|
||||
{
|
||||
error= errno ? errno : EPIPE;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
bytes_to_read -= bytes;
|
||||
}
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
if (my_net_write(net, (uchar*) "", 0))
|
||||
error= errno ? errno : EPIPE;
|
||||
net_flush(net);
|
||||
}
|
||||
|
||||
err:
|
||||
my_free(buf);
|
||||
return error;
|
||||
}
|
||||
#endif /* HAVE_REPLICATION */
|
||||
|
||||
/* Name is here without an extension */
|
||||
/* Name is here without an extension */
|
||||
|
||||
int ha_maria::open(const char *name, int mode, uint test_if_locked)
|
||||
{
|
||||
|
|
|
@ -151,15 +151,9 @@ public:
|
|||
|
||||
}
|
||||
int optimize(THD * thd, HA_CHECK_OPT * check_opt);
|
||||
int restore(THD * thd, HA_CHECK_OPT * check_opt);
|
||||
int backup(THD * thd, HA_CHECK_OPT * check_opt);
|
||||
int assign_to_keycache(THD * thd, HA_CHECK_OPT * check_opt);
|
||||
int preload_keys(THD * thd, HA_CHECK_OPT * check_opt);
|
||||
bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes);
|
||||
#ifdef HAVE_REPLICATION
|
||||
int dump(THD * thd, int fd);
|
||||
int net_read_dump(NET * net);
|
||||
#endif
|
||||
#ifdef HAVE_QUERY_CACHE
|
||||
my_bool register_query_cache_table(THD *thd, const char *table_key,
|
||||
uint key_length,
|
||||
|
|
Loading…
Reference in a new issue