Thanks for fixing this problem, Lars-Erik,
The patch looks fine and I have verified that Falcon no longer starts if
the serial log directory does not exists:
Installing MySQL system tables...
Falcon: The specified serial log
directory,"/export/home2/tmp/mysql-log/falcon", does not exist.
Falcon: The directory must be created by the user before initializing
Falcon.
080819 8:06:52 [ERROR] Falcon: Exception 'Invalid serial log directory
path "/export/home2/tmp/mysql-log/falcon"' during initialization
080819 8:06:52 [ERROR] Plugin 'Falcon' init function returned error.
080819 8:06:52 [ERROR] Plugin 'Falcon' registration as a STORAGE ENGINE
failed.
OK
OK to push.
Olav
Lars-Erik.Bjork@stripped wrote:
> #At file:///home/lb200670/devel/mysql/team-push/
>
> 2787 lars-erik.bjork@stripped 2008-08-18
> A fix for bug#38377 - Options falcon_serial_log_dir does not have any effect
> modified:
> storage/falcon/Configuration.cpp
> storage/falcon/ha_falcon.cpp
>
> per-file messages:
> storage/falcon/Configuration.cpp
> Added a print-out to the error log
> Uncommented the throw of the SQLEXCEPTION
> Changed error to FILE_ACCESS_ERROR to prevent recreating the database
> storage/falcon/ha_falcon.cpp
> Fixed some minor layout issues regarding printing out exceptions
> === modified file 'storage/falcon/Configuration.cpp'
> --- a/storage/falcon/Configuration.cpp 2008-07-17 13:52:17 +0000
> +++ b/storage/falcon/Configuration.cpp 2008-08-18 17:16:30 +0000
> @@ -151,8 +151,14 @@ Configuration::Configuration(const char
>
> if (!scanDir.isDirectory())
> {
> - //throw SQLEXCEPTION (RUNTIME_ERROR, "Invalid serial log directory path \"%s\"",
> falcon_serial_log_dir);
> - serialLogDir = "";
> + fprintf(stderr,
> + "Falcon: The specified serial log directory,\"%s\", "
> + "does not exist.\n"
> + "Falcon: The directory must be created by "
> + "the user before initializing Falcon.\n",
> + falcon_serial_log_dir
> + );
> + throw SQLEXCEPTION (FILE_ACCESS_ERROR, "Invalid serial log directory path
> \"%s\"", falcon_serial_log_dir);
> }
> }
> #else
>
> === modified file 'storage/falcon/ha_falcon.cpp'
> --- a/storage/falcon/ha_falcon.cpp 2008-08-14 11:24:18 +0000
> +++ b/storage/falcon/ha_falcon.cpp 2008-08-18 17:16:30 +0000
> @@ -216,13 +216,13 @@ int StorageInterface::falcon_init(void *
> }
> catch(SQLException &e)
> {
> - sql_print_error("Falcon : exception '%s'during initialization",
> + sql_print_error("Falcon: Exception '%s' during initialization",
> e.getText());
> error = true;
> }
> catch(...)
> {
> - sql_print_error(" Falcon : general exception in initialization");
> + sql_print_error(" Falcon: General exception in initialization");
> error = true;
> }
>
>
>
>