1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- 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
This commit is contained in:
Olivier Bertrand
2014-05-10 12:21:08 +02:00
parent cdbb795837
commit 9cb4b6c009
11 changed files with 637 additions and 620 deletions

View File

@@ -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