summaryrefslogtreecommitdiff
path: root/storage/myisam/ha_myisam.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam/ha_myisam.cc')
-rw-r--r--storage/myisam/ha_myisam.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 7d5a81f7943..1edecf5289a 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -598,7 +598,11 @@ int ha_myisam::net_read_dump(NET* net)
int data_fd = file->dfile;
int error = 0;
- my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME));
+ if (my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)) == MY_FILEPOS_ERROR)
+ {
+ error= my_errno;
+ goto err;
+ }
for (;;)
{
ulong packet_len = my_net_read(net);
@@ -634,7 +638,11 @@ int ha_myisam::dump(THD* thd, int fd)
return ENOMEM;
int error = 0;
- my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME));
+ if (my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)) == MY_FILEPOS_ERROR)
+ {
+ error= my_errno;
+ goto err;
+ }
for (; bytes_to_read > 0;)
{
size_t bytes = my_read(data_fd, buf, blocksize, MYF(MY_WME));
@@ -1491,7 +1499,7 @@ int ha_myisam::enable_indexes(uint mode)
}
else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE)
{
- THD *thd=current_thd;
+ THD *thd= table->in_use;
HA_CHECK &param= *(HA_CHECK*) thd->alloc(sizeof(param));
const char *save_proc_info=thd->proc_info;