List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:August 19 2008 9:49am
Subject:bzr push into mysql-6.0-falcon branch (vvaintroub:2789)
View as plain text  
 2789 Vladislav Vaintroub	2008-08-19 [merge]
      merge
modified:
  storage/falcon/Index.cpp
  storage/falcon/Index.h
  storage/falcon/StorageTable.cpp
  storage/falcon/StorageTableShare.cpp

=== modified file 'storage/falcon/BackLog.cpp'
--- a/storage/falcon/BackLog.cpp	2008-07-17 13:52:17 +0000
+++ b/storage/falcon/BackLog.cpp	2008-08-18 20:17:15 +0000
@@ -37,7 +37,9 @@ BackLog::BackLog(Database *db, const cha
 {
 	database = db;
 	dbb = new Dbb(database->dbb, 0);
+#ifndef FALCONDB
 	dbb->createPath(fileName);
+#endif
 	dbb->create(fileName, dbb->pageSize, 0, HdrTableSpace, 0, NULL);
 	dbb->noLog = true;
 	dbb->tableSpaceId = -1;

=== modified file 'storage/falcon/IO.cpp'
--- a/storage/falcon/IO.cpp	2008-08-14 16:34:43 +0000
+++ b/storage/falcon/IO.cpp	2008-08-18 20:17:15 +0000
@@ -411,13 +411,17 @@ void IO::declareFatalError()
 	fatalError = true;
 }
 
+
+#ifndef ENOSYS
+#define ENOSYS EEXIST
+#endif
+
+// Make sure parent directories for file exist
 void IO::createPath(const char *fileName)
 {
-	// First, better make sure directories exists
 	JString fname = getPath(fileName);
 
 	char directory [256], *q = directory;
-
 	for (const char *p = fname.getString(); *p;)
 		{
 		char c = *p++;
@@ -427,9 +431,14 @@ void IO::createPath(const char *fileName
 			*q = 0;
 			
 			if (q > directory && q [-1] != ':')
-				if (MKDIR (directory) && errno != EEXIST)
+				{
+				if (MKDIR (directory) && errno != EEXIST && errno != ENOSYS)
+					// ENOSYS is a Solaris speficic workaround, mkdir returns it
+					// on existing automounted NFS directories, instead
+					// of EEXIST.
 					throw SQLError (IO_ERROR, 
 					"can't create directory \"%s\"\n", directory);
+				}
 			}
 		*q++ = c;
 		}

=== modified file 'storage/falcon/RepositoryVolume.cpp'
--- a/storage/falcon/RepositoryVolume.cpp	2008-07-24 08:45:03 +0000
+++ b/storage/falcon/RepositoryVolume.cpp	2008-08-18 20:17:15 +0000
@@ -232,7 +232,9 @@ void RepositoryVolume::makeWritable()
 
 void RepositoryVolume::create()
 {
+#ifndef FALCONDB
 	IO::createPath (fileName);
+#endif
 	dbb->create(fileName, dbb->pageSize, 0, HdrRepositoryFile, 0, NULL);
 	Sync syncDDL(&database->syncSysDDL, "RepositoryVolume::create");
 	Transaction *transaction = database->getSystemTransaction();

=== modified file 'storage/falcon/StorageDatabase.cpp'
--- a/storage/falcon/StorageDatabase.cpp	2008-08-18 05:45:29 +0000
+++ b/storage/falcon/StorageDatabase.cpp	2008-08-18 20:17:15 +0000
@@ -156,7 +156,9 @@ Connection* StorageDatabase::createDatab
 	try
 		{
 		masterConnection = getConnection();
+#ifndef FALCONDB
 		IO::createPath(filename);
+#endif
 		masterConnection->createDatabase(name, filename, ACCOUNT, PASSWORD, threads);
 		Statement *statement = masterConnection->createStatement();
 		

=== modified file 'storage/falcon/TableSpace.cpp'
--- a/storage/falcon/TableSpace.cpp	2008-07-17 13:52:17 +0000
+++ b/storage/falcon/TableSpace.cpp	2008-08-18 20:17:15 +0000
@@ -123,7 +123,9 @@ void TableSpace::open()
 
 void TableSpace::create()
 {
+#ifndef FALCONDB
 	dbb->createPath(filename);
+#endif
 	dbb->create(filename, dbb->pageSize, 0, HdrTableSpace, 0, NULL);
 	active = true;
 	dbb->flush();

Thread
bzr push into mysql-6.0-falcon branch (vvaintroub:2789) Vladislav Vaintroub19 Aug