diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-05-10 12:21:08 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-05-10 12:21:08 +0200 |
commit | 9cb4b6c00985b3f70ed30dcefc8770b34f334c47 (patch) | |
tree | 964c94f4886e2e013579feb5628a31130dd72fb0 /storage/connect/maputil.cpp | |
parent | cdbb79583778827e7ceb90f3e9230062327e0b09 (diff) | |
download | mariadb-git-9cb4b6c00985b3f70ed30dcefc8770b34f334c47.tar.gz |
- FIX some MAP and XMAP errors (such as mapped indexes not closed)
Do not put version in XML files header
Remove HTON_NO_PARTITION for testing
Fix a wrong return (instead of DBUG_RETURN) in index_init
Plus a few typos
modified:
storage/connect/connect.cc
storage/connect/filter.cpp
storage/connect/ha_connect.cc
storage/connect/maputil.cpp
storage/connect/mysql-test/connect/r/alter_xml.result
storage/connect/mysql-test/connect/r/xml.result
storage/connect/table.cpp
storage/connect/tabxml.cpp
storage/connect/xindex.cpp
storage/connect/xindex.h
storage/connect/xtable.h
Diffstat (limited to 'storage/connect/maputil.cpp')
-rw-r--r-- | storage/connect/maputil.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/storage/connect/maputil.cpp b/storage/connect/maputil.cpp index b7032f10d2b..7104259ebad 100644 --- a/storage/connect/maputil.cpp +++ b/storage/connect/maputil.cpp @@ -80,7 +80,16 @@ HANDLE CreateFileMap(PGLOBAL g, LPCSTR filename, } // endif hFileMap access = (mode == MODE_READ) ? FILE_MAP_READ : FILE_MAP_WRITE; - mm->memory = MapViewOfFile(hFileMap, access, 0, 0, 0); + + if (!(mm->memory = MapViewOfFile(hFileMap, access, 0, 0, 0))) { + DWORD ler = GetLastError(); + + sprintf(g->Message, "Error %ld in MapViewOfFile %s", + ler, filename); + CloseHandle(hFile); + return INVALID_HANDLE_VALUE; + } // endif memory + // lenH is the high-order word of the file size mm->lenL = GetFileSize(hFile, &mm->lenH); CloseHandle(hFileMap); // Not used anymore |