2912 Sergey Vojtovich 2008-11-14 [merge]
Merge.
modified:
storage/falcon/Log.h
storage/falcon/StorageHandler.cpp
storage/falcon/ha_falcon.cpp
storage/falcon/ha_falcon.h
2911 Hakan Kuecuekyilmaz 2008-11-13
Fix for Bug#40636
falcon_bug_28095 test fails with "Server failed to restart" in valgrind runs.
modified:
mysql-test/include/restart_mysqld.inc
mysql-test/include/wait_until_connected_again.inc
mysql-test/suite/falcon/t/falcon_bug_28095.test
=== modified file 'storage/falcon/Log.h'
--- a/storage/falcon/Log.h 2007-11-29 22:51:08 +0000
+++ b/storage/falcon/Log.h 2008-11-13 13:27:13 +0000
@@ -38,6 +38,9 @@ static const int LogScrub = 128;
static const int LogException = 256;
static const int LogScavenge = 512;
static const int LogXARecovery = 1024;
+static const int LogMysqlInfo = 0x20000000;
+static const int LogMysqlWarning = 0x40000000;
+static const int LogMysqlError = 0x80000000;
typedef void (Listener) (int, const char*, void *arg);
=== modified file 'storage/falcon/StorageHandler.cpp'
--- a/storage/falcon/StorageHandler.cpp 2008-10-31 10:13:58 +0000
+++ b/storage/falcon/StorageHandler.cpp 2008-11-13 13:27:13 +0000
@@ -998,6 +998,8 @@ void StorageHandler::initialize(void)
try
{
+ Log::log(LogMysqlInfo, "Falcon: unable to open system data files.");
+ Log::log(LogMysqlInfo, "Falcon: creating new system data files.");
createDatabase();
}
catch(SQLException &e2)
=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp 2008-11-05 14:51:37 +0000
+++ b/storage/falcon/ha_falcon.cpp 2008-11-13 13:27:13 +0000
@@ -35,6 +35,7 @@
#include "InfoTable.h"
#include "Format.h"
#include "Error.h"
+#include "Log.h"
#ifdef _WIN32
#define I64FORMAT "%I64d"
@@ -227,7 +228,9 @@ int StorageInterface::falcon_init(void *
falcon_hton->fill_is_table = StorageInterface::fill_is_table;
//falcon_hton->show_status = StorageInterface::show_status;
falcon_hton->flags = HTON_NO_FLAGS;
+ falcon_debug_mask&= ~(LogMysqlInfo|LogMysqlWarning|LogMysqlError);
storageHandler->addNfsLogger(falcon_debug_mask, StorageInterface::logger, NULL);
+ storageHandler->addNfsLogger(LogMysqlInfo|LogMysqlWarning|LogMysqlError, StorageInterface::mysqlLogger, NULL);
if (falcon_debug_server)
storageHandler->startNfsServer();
@@ -536,6 +539,10 @@ int StorageInterface::open(const char *n
int ret = storageTable->open();
+ if (ret == StorageErrorTableNotFound)
+ sql_print_error("Server is attempting to access a table %s,\n"
+ "which doesn't exist in Falcon.", name);
+
if (ret)
DBUG_RETURN(error(ret));
@@ -1025,6 +1032,10 @@ int StorageInterface::delete_table(const
storageTable->deleteStorageTable();
storageTable = NULL;
+ if (res == StorageErrorTableNotFound)
+ sql_print_error("Server is attempting to drop a table %s,\n"
+ "which doesn't exist in Falcon.", tableName);
+
// (hk) Fix for Bug#31465 Running Falcon test suite leads
// to warnings about temp tables
// This fix could affect other DROP TABLE scenarios.
@@ -2401,6 +2412,16 @@ void StorageInterface::logger(int mask,
}
}
+void StorageInterface::mysqlLogger(int mask, const char* text, void* arg)
+{
+ if (mask & LogMysqlError)
+ sql_print_error("%s", text);
+ else if (mask & LogMysqlWarning)
+ sql_print_warning("%s", text);
+ else if (mask & LogMysqlInfo)
+ sql_print_information("%s", text);
+}
+
int StorageInterface::setIndex(TABLE *table, int indexId)
{
StorageIndexDesc indexDesc;
@@ -3520,6 +3541,7 @@ void StorageInterface::updateRecordScave
void StorageInterface::updateDebugMask(MYSQL_THD thd, struct st_mysql_sys_var* variable, void* var_ptr, const void* save)
{
falcon_debug_mask = *(uint*) save;
+ falcon_debug_mask&= ~(LogMysqlInfo|LogMysqlWarning|LogMysqlError);
storageHandler->deleteNfsLogger(StorageInterface::logger, NULL);
storageHandler->addNfsLogger(falcon_debug_mask, StorageInterface::logger, NULL);
}
=== modified file 'storage/falcon/ha_falcon.h'
--- a/storage/falcon/ha_falcon.h 2008-10-22 20:44:09 +0000
+++ b/storage/falcon/ha_falcon.h 2008-11-13 13:27:13 +0000
@@ -150,6 +150,7 @@ public:
static void shutdown(handlerton *);
static int closeConnection(handlerton *, THD *thd);
static void logger(int mask, const char *text, void *arg);
+ static void mysqlLogger(int mask, const char *text, void *arg);
static int panic(handlerton* hton, ha_panic_function flag);
//static bool show_status(handlerton* hton, THD* thd, stat_print_fn* print, enum ha_stat_type stat);
static int getMySqlError(int storageError);
| Thread |
|---|
| • bzr push into mysql-6.0-falcon-team branch (svoj:2911 to 2912) | Sergey Vojtovich | 14 Nov |