List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:August 27 2008 8:08pm
Subject:bzr push into mysql-6.0-falcon branch (cpowers:2804)
View as plain text  
 2804 Christopher Powers	2008-08-27 [merge]
      merge
removed:
  mysql-test/r/backup_view_on_view.result
  mysql-test/t/backup_view_on_view.test
added:
  mysql-test/include/mysqlbinlog_row_engine.inc
  mysql-test/r/backup_backupdir.result
  mysql-test/r/backup_concurrent.result
  mysql-test/r/mysqlbinlog_row.result
  mysql-test/r/mysqlbinlog_row_big.result
  mysql-test/r/mysqlbinlog_row_innodb.result
  mysql-test/r/mysqlbinlog_row_myisam.result
  mysql-test/r/mysqlbinlog_row_trans.result
  mysql-test/suite/backup/combinations
  mysql-test/suite/backup/include/
  mysql-test/suite/backup/include/backup_engine.inc
  mysql-test/suite/backup/r/backup_functions.result
  mysql-test/suite/backup/r/backup_procedures.result
  mysql-test/suite/backup/r/backup_triggers.result
  mysql-test/suite/backup/t/backup_functions.test
  mysql-test/suite/backup/t/backup_procedures.test
  mysql-test/suite/backup/t/backup_triggers.test
  mysql-test/t/backup_backupdir.test
  mysql-test/t/backup_concurrent.test
  mysql-test/t/mysqlbinlog_row.test
  mysql-test/t/mysqlbinlog_row_big.test
  mysql-test/t/mysqlbinlog_row_innodb.test
  mysql-test/t/mysqlbinlog_row_myisam.test
  mysql-test/t/mysqlbinlog_row_trans.test
modified:
  .bzrignore
  client/Makefile.am
  client/mysqlbinlog.cc
  include/my_global.h
  libmysql/CMakeLists.txt
  mysql-test/lib/mtr_cases.pl
  mysql-test/lib/mtr_report.pl
  mysql-test/mysql-test-run.pl
  mysql-test/r/backup_progress.result
  mysql-test/r/backup_views.result
  mysql-test/r/maria.result
  mysql-test/r/maria2.result
  mysql-test/suite/funcs_1/r/is_columns_mysql.result
  mysql-test/suite/funcs_1/r/is_tables_mysql.result
  mysql-test/t/backup_progress.test
  mysql-test/t/backup_views.test
  mysql-test/t/maria.test
  mysql-test/t/maria2.test
  mysql-test/valgrind.supp
  mysys/my_pread.c
  scripts/mysql_system_tables.sql
  sql/backup/backup_aux.h
  sql/backup/backup_info.cc
  sql/backup/backup_kernel.h
  sql/backup/data_backup.cc
  sql/backup/image_info.cc
  sql/backup/image_info.h
  sql/backup/kernel.cc
  sql/backup/stream.cc
  sql/backup/stream.h
  sql/backup/stream_v1.c
  sql/handler.h
  sql/log_event.cc
  sql/log_event.h
  sql/mdl.cc
  sql/mysqld.cc
  sql/rpl_tblmap.cc
  sql/rpl_tblmap.h
  sql/rpl_utility.h
  sql/set_var.cc
  sql/set_var.h
  sql/share/errmsg.txt
  sql/si_objects.cc
  sql/sql_base.cc
  sql/sql_parse.cc
  sql/sql_select.cc
  sql/sql_table.cc
  storage/falcon/CMakeLists.txt
  storage/falcon/Transaction.cpp
  storage/maria/CMakeLists.txt
  storage/maria/ha_maria.cc
  storage/maria/ma_blockrec.c
  storage/maria/ma_check.c
  storage/maria/ma_checkpoint.c
  storage/maria/ma_close.c
  storage/maria/ma_create.c
  storage/maria/ma_dbug.c
  storage/maria/ma_delete.c
  storage/maria/ma_extra.c
  storage/maria/ma_info.c
  storage/maria/ma_keycache.c
  storage/maria/ma_locking.c
  storage/maria/ma_loghandler.c
  storage/maria/ma_open.c
  storage/maria/ma_pagecache.c
  storage/maria/ma_recovery.c
  storage/maria/ma_search.c
  storage/maria/ma_state.c
  storage/maria/ma_state.h
  storage/maria/ma_update.c
  storage/maria/ma_write.c
  storage/maria/maria_def.h
  storage/maria/maria_ftdump.c
  storage/maria/maria_pack.c
  storage/myisam/mi_dynrec.c
  storage/myisam/mi_examine_log.c
  storage/myisam/mi_locking.c
  storage/myisam/mi_open.c
  storage/myisam/mi_search.c
  storage/myisam/myisam_backup_engine.cc
  storage/myisam/myisamdef.h

=== modified file 'storage/falcon/RecordVersion.cpp'
--- a/storage/falcon/RecordVersion.cpp	2008-07-15 18:57:27 +0000
+++ b/storage/falcon/RecordVersion.cpp	2008-08-27 12:55:46 +0000
@@ -368,8 +368,6 @@ int RecordVersion::thaw()
 	// true, then the record data can be restored from the serial log. If writePending
 	// is false, then the record data has been written to the data pages.
 	
-	bool wasWritePending = (trans) ? trans->writePending : false;
-
 	if (trans && trans->writePending)
 		{
 		trans->addRef();
@@ -416,11 +414,9 @@ int RecordVersion::thaw()
 			}
 		}
 		
-	if (bytesRestored <= 0)
-		Log::debug("RecordVersion::thaw: writePending %d, was %d, recordFetched %d, data %p\n",
-					trans->writePending, wasWritePending, recordFetched, data.record);
-
-	ASSERT(bytesRestored > 0 || data.record == NULL);
+	if (state == recChilled)
+		ASSERT(bytesRestored > 0 || data.record == NULL);
+		
 	state = recData;
 		
 	return bytesRestored;

=== modified file 'storage/falcon/SRLUpdateRecords.cpp'
--- a/storage/falcon/SRLUpdateRecords.cpp	2008-04-09 08:23:51 +0000
+++ b/storage/falcon/SRLUpdateRecords.cpp	2008-08-27 07:08:18 +0000
@@ -84,34 +84,39 @@ int SRLUpdateRecords::thaw(RecordVersion
 	// Get section id, record id and data length written. Input pointer will be at
 	// beginning of record data.
 
-	int tableSpaceId;
+	int tableSpaceId = 0;
 	
 	if (control->version >= srlVersion8)
 		tableSpaceId = control->getInt();
-	else
-		tableSpaceId = 0;
 		
 	control->getInt();			// sectionId
 	int recordNumber = control->getInt();
 	int dataLength   = control->getInt();
-	ASSERT(recordNumber == record->recordNumber);
-	int bytesReallocated = record->setRecordData(control->input, dataLength);
+	int bytesReallocated = 0;
+	
+	// setRecordData() handles race conditions with an interlocked compare and exchange,
+	// but check the state and record number anyway
 
-	if (bytesReallocated > 0)
-		bytesReallocated = record->getEncodedSize();
+	if (record->state == recChilled && recordNumber == record->recordNumber)
+		bytesReallocated = record->setRecordData(control->input, dataLength);
 
 	window->deactivateWindow();
 
-	if (log->chilledRecords > 0)
-		log->chilledRecords--;
+	if (bytesReallocated > 0)
+		{
+		ASSERT(recordNumber == record->recordNumber);
+		bytesReallocated = record->getEncodedSize();
+		*thawed = true;
+
+		if (log->chilledRecords > 0)
+			log->chilledRecords--;
 		
-	if (log->chilledBytes > uint64(bytesReallocated))
-		log->chilledBytes -= bytesReallocated;
-	else
-		log->chilledBytes = 0;
-	
-	*thawed = true;
-	
+		if (log->chilledBytes > uint64(bytesReallocated))
+			log->chilledBytes -= bytesReallocated;
+		else
+			log->chilledBytes = 0;
+		}
+
 	return bytesReallocated;
 }
 

=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp	2008-08-22 12:55:22 +0000
+++ b/storage/falcon/ha_falcon.cpp	2008-08-27 12:55:46 +0000
@@ -670,7 +670,6 @@ int StorageInterface::info(uint what)
 	DBUG_RETURN(0);
 }
 
-
 void StorageInterface::getDemographics(void)
 {
 	DBUG_ENTER("StorageInterface::getDemographics");
@@ -693,7 +692,7 @@ void StorageInterface::getDemographics(v
 			{
 			ha_rows rows = 1 << indexDesc->numberSegments;
 
-			for (uint segment = 0; segment < key->key_parts; ++segment, rows >>= 1)
+			for (uint segment = 0; segment < indexDesc->numberSegments /*key->key_parts*/; ++segment, rows >>= 1)
 				{
 				ha_rows recordsPerSegment = (ha_rows)indexDesc->segmentRecordCounts[segment];
 				key->rec_per_key[segment] = (ulong) MAX(recordsPerSegment, rows);

Thread
bzr push into mysql-6.0-falcon branch (cpowers:2804) Christopher Powers27 Aug