summaryrefslogtreecommitdiff
path: root/storage/connect/filamfix.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2014-08-27 00:49:07 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2014-08-27 00:49:07 +0200
commit66ffa09491e19a2d8c2f7638741909d13c7b25d7 (patch)
treee62e85c5bd7050f4e8b443d8a224b24ffdc45c4d /storage/connect/filamfix.cpp
parent8f0e75285ec999abbe73efe7a9c12a474c896ba0 (diff)
downloadmariadb-git-66ffa09491e19a2d8c2f7638741909d13c7b25d7.tar.gz
- Fix a test failure. Due to mmap on void file being accepted on Windows
while returning an error on Linux. Now accepted on linux. modified: storage/connect/maputil.cpp - Fix a BUG in the XHUGE class. lseek64 was wrongly regarded as in error when returning 0 instead of -1. This produced wrong index files. modified: storage/connect/filamfix.cpp storage/connect/maputil.cpp storage/connect/xindex.cpp - Fix length mismatch (tab instead of blanks?) modified: storage/connect/mysql-test/connect/r/updelx.result
Diffstat (limited to 'storage/connect/filamfix.cpp')
-rw-r--r--storage/connect/filamfix.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/connect/filamfix.cpp b/storage/connect/filamfix.cpp
index da05e7b824f..1fa72d52746 100644
--- a/storage/connect/filamfix.cpp
+++ b/storage/connect/filamfix.cpp
@@ -647,7 +647,9 @@ bool BGXFAM::BigSeek(PGLOBAL g, HANDLE h, BIGINT pos, int org)
} // endif
#else // !WIN32
if (lseek64(h, pos, org) < 0) {
- sprintf(g->Message, MSG(ERROR_IN_LSK), errno);
+// sprintf(g->Message, MSG(ERROR_IN_LSK), errno);
+ sprintf(g->Message, "lseek64: %s", strerror(errno));
+ printf("%s\n", g->Message);
return true;
} // endif
#endif // !WIN32
@@ -849,7 +851,7 @@ bool BGXFAM::OpenTableFile(PGLOBAL g)
#else // UNIX
int rc = 0;
int oflag = O_LARGEFILE; // Enable file size > 2G
- mode_t tmode = 0;
+ mode_t tmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
/*********************************************************************/
/* Create the file object according to access mode */
@@ -874,7 +876,7 @@ bool BGXFAM::OpenTableFile(PGLOBAL g)
break;
case MODE_INSERT:
oflag |= (O_WRONLY | O_CREAT | O_APPEND);
- tmode = S_IREAD | S_IWRITE;
+ // tmode = S_IREAD | S_IWRITE;
break;
default:
sprintf(g->Message, MSG(BAD_OPEN_MODE), mode);