List:Commits« Previous MessageNext Message »
From:Jim Starkey Date:August 20 2007 4:04pm
Subject:bk commit into 6.0-falcon tree (jas:1.2675)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0-falcon repository of jas. When jas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-20 12:04:23-04:00, jas@stripped +3 -0
  Merge jstarkey@stripped:/home/bk/mysql-5.1-falcon
  into  fluffy.netfrastructure.com:/home/mysql/mysql-5.1-falcon
  MERGE: 1.2655.1.1

  storage/falcon/Database.cpp@stripped, 2007-08-20 12:04:17-04:00, jas@stripped +0 -0
    Auto merged
    MERGE: 1.85.2.2

  storage/falcon/IO.cpp@stripped, 2007-08-20 12:04:18-04:00, jas@stripped +0 -0
    Auto merged
    MERGE: 1.14.1.1

  storage/falcon/IOx.h@stripped, 2007-08-20 12:04:18-04:00, jas@stripped +0 -0
    Auto merged
    MERGE: 1.10.1.1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jas
# Host:	fluffy.netfrastructure.com
# Root:	/home/mysql/mysql-5.1-falcon/RESYNC

--- 1.87/storage/falcon/Database.cpp	2007-08-20 12:04:30 -04:00
+++ 1.88/storage/falcon/Database.cpp	2007-08-20 12:04:30 -04:00
@@ -592,8 +592,7 @@
 	int page_size = PAGE_SIZE;
 #endif
 
-	//cache = dbb->create (filename, page_size, configuration->pageCacheSize, HdrDatabaseFile, 0, logRoot);
-	cache = dbb->create (filename, page_size, configuration->pageCacheSize, HdrDatabaseFile, 0, "");
+	cache = dbb->create(filename, page_size, configuration->pageCacheSize, HdrDatabaseFile, 0, "", 0);
 	
 	try
 		{

--- 1.16/storage/falcon/IO.cpp	2007-08-20 12:04:30 -04:00
+++ 1.17/storage/falcon/IO.cpp	2007-08-20 12:04:30 -04:00
@@ -129,7 +129,7 @@
 	return fileId != -1;
 }
 
-bool IO::createFile(const char * name)
+bool IO::createFile(const char *name, uint64 initialAllocation)
 {
 	Log::debug("IO::createFile: creating file \"%s\"\n", name);
 
@@ -147,6 +147,25 @@
 	flock(fileId, LOCK_EX);
 #endif
 #endif
+
+	if (initialAllocation)
+		{
+		UCHAR *raw = new UCHAR[8192 * 257];
+		UCHAR *aligned = (UCHAR*) (((UIPTR) raw + 8191) / 8192 * 8192);
+		uint size = 8192 * 256;
+		memset(aligned, 0, size);
+		uint64 offset = 0;
+		
+		for (uint64 remaining = initialAllocation; remaining;)
+			{
+			uint n = (int) MIN(remaining, size);
+			write(offset, n, aligned);
+			offset += n;
+			remaining -= n;
+			}
+		
+		sync();
+		}
 
 	return fileId != -1;
 }

--- 1.11/storage/falcon/IOx.h	2007-08-20 12:04:30 -04:00
+++ 1.12/storage/falcon/IOx.h	2007-08-20 12:04:30 -04:00
@@ -50,7 +50,7 @@
 	void	readHeader (Hdr *header);
 	void	writePage (Bdb *buffer);
 	void	readPage (Bdb *page);
-	bool	createFile (const char *name);
+	bool	createFile (const char *name, uint64 initialAllocation);
 	bool	openFile (const char *name, bool readOnly);
 	void	longSeek(int64 offset);
 	void	read(int64 offset, int length, UCHAR* buffer);
Thread
bk commit into 6.0-falcon tree (jas:1.2675)Jim Starkey20 Aug