summaryrefslogtreecommitdiff
path: root/storage/maria/ma_page.c
diff options
context:
space:
mode:
authorunknown <guilhem@mysqlwin32.>2008-02-02 00:01:31 +0100
committerunknown <guilhem@mysqlwin32.>2008-02-02 00:01:31 +0100
commit4a1763e4287724421720e174f938d7303ad07c04 (patch)
tree31abb1520554ab9ab32a14cefc1c3ce72a6084f3 /storage/maria/ma_page.c
parent16f92309e43e431f60826bdbf4660d5ded157903 (diff)
downloadmariadb-git-4a1763e4287724421720e174f938d7303ad07c04.tar.gz
Fix for Windows-specific bugs:
- one which led REDO_INSERT_ROW_BLOBS to fail to apply - one excess close ("-1 file left open") Don't need maria-path option / environment variable. Fixes for ma_test_all-t to run under Windows. Port of ma_test_recovery to Perl, written by Jani. storage/maria/unittest/ma_test_recovery.expected: Rename: storage/maria/ma_test_recovery.expected -> storage/maria/unittest/ma_test_recovery.expected mysys/my_pread.c: Fix for Windows-specific bug (maria_read_log -a failed during ma_test_all-t): Windows does not have pread() so the branch setting HA_ERR_FILE_TOO_SHORT was not compiled in, broke applying of REDO_INSERT_ROW_BLOBS. After fixing that, it appeared that in my Windows machine, errno is not changed in case of EOF; as we read it we have to reset it at start. The changed to readbytes!=-1 is to detect EOF mysys/my_read.c: The change to readbytes!=-1 is to detect EOF storage/maria/ma_loghandler.c: Fix for Windows-specific bug: as we don't open the directory we should not close it. storage/maria/ma_page.c: This is C, cannot declare variable after instruction. storage/maria/ma_test_recovery: ma_test_recovery.expected moved storage/maria/unittest/ma_test_all-t: Can now safely guess maria_path so don't need the command-line option or environment variable. Port to Windows (.exe, different locations of executables); can guess suffix, don't need --suffix. storage/maria/unittest/ma_test_recovery.pl: Perl version of ma_test_recovery, written by Jani. Will deprecate the shell version.
Diffstat (limited to 'storage/maria/ma_page.c')
-rw-r--r--storage/maria/ma_page.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/maria/ma_page.c b/storage/maria/ma_page.c
index 1170ca13d26..ce0db0f69d6 100644
--- a/storage/maria/ma_page.c
+++ b/storage/maria/ma_page.c
@@ -326,9 +326,12 @@ my_off_t _ma_new(register MARIA_HA *info, int level,
Next deleted page's number is in the header of the present page
(single linked list):
*/
+#ifndef DBUG_OFF
+ my_off_t current_key_del;
+#endif
share->current_key_del= mi_sizekorr(buff+share->keypage_header);
#ifndef DBUG_OFF
- my_off_t current_key_del= share->current_key_del;
+ current_key_del= share->current_key_del;
DBUG_ASSERT(current_key_del != share->state.key_del &&
(current_key_del != 0) &&
((current_key_del == HA_OFFSET_ERROR) ||