summaryrefslogtreecommitdiff
path: root/storage/myisam/ha_myisam.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-03-09 15:47:59 +0200
committerMichael Widenius <monty@askmonty.org>2011-03-09 15:47:59 +0200
commit139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch)
tree7d77d6f1073f8090f275b30cb3f10254497da243 /storage/myisam/ha_myisam.cc
parentb3f7eac5301529c2d069ebe4d0558980412af3a2 (diff)
parentce675406ca8dbc1532a908803a1371de8432d466 (diff)
downloadmariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz
Merge with 5.2
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;