diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2010-12-09 12:59:12 +0300 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2010-12-09 12:59:12 +0300 |
commit | 0137e02899949d714723c537ed23b51e7f5b1a75 (patch) | |
tree | afa353259bdf6aa7951d57c746491dee1af40052 /storage | |
parent | 3cecccffaf6690536de46734dfd37086e298a916 (diff) | |
download | mariadb-git-0137e02899949d714723c537ed23b51e7f5b1a75.tar.gz |
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
my_seek() and my_tell() functions now honour MY_WME flag.
include/mysys_err.h:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- EE_CANT_SEEK added, used in my_seek() and my_tell() functions.
mysys/errors.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- EE_CANT_SEEK added, used in my_seek() and my_tell() functions.
mysys/my_seek.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- my_seek() and my_tell() handle MY_WME flag.
mysys/my_symlink.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- __attribute__((unused)) removed, as myf MyFlags is
actually used in the my_realpath() function.
storage/myisam/ha_myisam.cc:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- check my_seek() result.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/ha_myisam.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 12557b75cc1..2650cc850a8 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -590,7 +590,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); @@ -626,7 +630,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)); |