summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-05-07 08:26:00 -0700
committerunknown <jimw@mysql.com>2005-05-07 08:26:00 -0700
commit14638483d55c88780e68f080ad6cbf6aa29aae64 (patch)
tree661bf7fef8329e97b491d8169e494909b829b7fb
parent4032b2e09b9a41315a8c8dd26b774bea27f3adf3 (diff)
parent4ed9fadd007bc154619d0ee8f1d55f44fc1cef26 (diff)
downloadmariadb-git-14638483d55c88780e68f080ad6cbf6aa29aae64.tar.gz
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/jimw/my/mysql-5.0-clean
-rw-r--r--mysys/default.c13
-rw-r--r--sql/sql_show.cc6
2 files changed, 12 insertions, 7 deletions
diff --git a/mysys/default.c b/mysys/default.c
index e3a0b8a20ad..5afefa5463d 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -152,10 +152,15 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
}
else if (defaults_extra_file)
{
- if (search_default_file(func, func_ctx, NullS,
- defaults_extra_file) < 0)
+ if (search_default_file_with_ext(func, func_ctx, "", "",
+ defaults_extra_file, 0) < 0)
goto err; /* Fatal error */
-
+ if (error > 0)
+ {
+ fprintf(stderr, "Could not open required defaults file: %s\n",
+ defaults_extra_file);
+ goto err;
+ }
}
}
}
@@ -526,7 +531,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
}
#endif
if (!(fp= my_fopen(name, O_RDONLY, MYF(0))))
- return 0; /* Ignore wrong files */
+ return 1; /* Ignore wrong files */
while (fgets(buff, sizeof(buff) - 1, fp))
{
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index a90756e38db..9e3f82f9fd6 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2317,9 +2317,6 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
end=strmov(end,grant_types.type_names[bitnr]);
}
}
-#else
- *end= 0;
-#endif
if (tables->schema_table) // any user has 'select' privilege on all
// I_S table columns
table->field[17]->store(grant_types.type_names[0],
@@ -2327,6 +2324,9 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
else
table->field[17]->store(tmp+1,end == tmp ? 0 : (uint) (end-tmp-1), cs);
+#else
+ *end= 0;
+#endif
table->field[1]->store(base_name, strlen(base_name), cs);
table->field[2]->store(file_name, strlen(file_name), cs);
table->field[3]->store(field->field_name, strlen(field->field_name),