List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekyilmaz Date:September 10 2008 5:00pm
Subject:bzr commit into mysql-6.0-falcon branch (hky:2818)
View as plain text  
#At file:///home/hakan/work/mysql/mysql-6.0-falcon-team/

 2818 Hakan Kuecuekyilmaz	2008-09-10 [merge]
      Merge.
modified:
  storage/falcon/ha_falcon.cpp

=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp	2008-09-10 11:33:37 +0000
+++ b/storage/falcon/ha_falcon.cpp	2008-09-10 13:42:36 +0000
@@ -157,12 +157,34 @@ void flushFalconLogFile()
 		fflush(falcon_log_file);
 }
 
+bool checkExceptionSupport()
+{
+    // Validate that the code has been compiled with support for exceptions
+    // by throwing and catching an exception. If the executable does not
+    // support exceptions we will reach the return false statement
+	try
+		{
+		throw 1;
+		}
+	catch (int) 
+		{
+		return true;
+		}
+	return false;
+}
+
 int StorageInterface::falcon_init(void *p)
 {
 	DBUG_ENTER("falcon_init");
 	falcon_hton = (handlerton *)p;
 	my_bool error = false;
 
+	if (!checkExceptionSupport()) 
+		{
+		sql_print_error("Falcon must be compiled with C++ exceptions enabled to work");
+		DBUG_RETURN(1);
+		}
+
 	StorageHandler::setDataDirectory(mysql_real_data_home);
 
 	storageHandler = getFalconStorageHandler(sizeof(THR_LOCK));

Thread
bzr commit into mysql-6.0-falcon branch (hky:2818) Hakan Kuecuekyilmaz10 Sep