Only print cur_file->filename if cur_file->file is set

MOve DBUG_ASSERT(result_file_name) to after DBUG_ENTER
Change type of "reconnect" variable from int to my_bool, reconnect didn't work on Solaris without that
parent d534a6b9
...@@ -668,9 +668,11 @@ void close_files() ...@@ -668,9 +668,11 @@ void close_files()
DBUG_ENTER("close_files"); DBUG_ENTER("close_files");
for (; cur_file >= file_stack; cur_file--) for (; cur_file >= file_stack; cur_file--)
{ {
DBUG_PRINT("info", ("file_name: %s", cur_file->file_name));
if (cur_file->file && cur_file->file != stdin) if (cur_file->file && cur_file->file != stdin)
{
DBUG_PRINT("info", ("closing file: %s", cur_file->file_name));
my_fclose(cur_file->file, MYF(0)); my_fclose(cur_file->file, MYF(0));
}
my_free((gptr)cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR)); my_free((gptr)cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
cur_file->file_name= 0; cur_file->file_name= 0;
} }
...@@ -950,8 +952,8 @@ err: ...@@ -950,8 +952,8 @@ err:
void check_result(DYNAMIC_STRING* ds) void check_result(DYNAMIC_STRING* ds)
{ {
DBUG_ASSERT(result_file_name);
DBUG_ENTER("check_result"); DBUG_ENTER("check_result");
DBUG_ASSERT(result_file_name);
switch (dyn_string_cmp(ds, result_file_name)) switch (dyn_string_cmp(ds, result_file_name))
{ {
...@@ -2707,12 +2709,15 @@ char *get_string(char **to_ptr, char **from_ptr, ...@@ -2707,12 +2709,15 @@ char *get_string(char **to_ptr, char **from_ptr,
void set_reconnect(MYSQL* mysql, int val) void set_reconnect(MYSQL* mysql, int val)
{ {
DBUG_ENTER("set_reconnect");
DBUG_PRINT("info", ("val: %d", val));
#if MYSQL_VERSION_ID < 50000 #if MYSQL_VERSION_ID < 50000
mysql->reconnect= val; mysql->reconnect= val;
#else #else
int reconnect= val; my_bool reconnect= val;
mysql_options(mysql, MYSQL_OPT_RECONNECT, (char *)&reconnect); mysql_options(mysql, MYSQL_OPT_RECONNECT, (char *)&reconnect);
#endif #endif
DBUG_VOID_RETURN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment