summaryrefslogtreecommitdiff
path: root/client/mysqldump.c
diff options
context:
space:
mode:
authorunknown <jimw@rama.(none)>2006-08-31 21:02:17 -0700
committerunknown <jimw@rama.(none)>2006-08-31 21:02:17 -0700
commit6a20f7431abcffeaf88804c7dac27d62ba7148da (patch)
tree1f1f42098e5f2f6a11903638b91830f3713865a2 /client/mysqldump.c
parenta6e78c3571d792ce1a8693b262365f7eced4efb3 (diff)
parent55c61a6ea6a26ba736d2d85d76871ae40043deba (diff)
downloadmariadb-git-6a20f7431abcffeaf88804c7dac27d62ba7148da.tar.gz
Merge rama.(none):/home/jimw/my/mysql-5.0-clean
into rama.(none):/home/jimw/my/mysql-5.1-clean mysqldump.result is wrong, will need to be cleaned up. client/mysqldump.c: Auto merged mysql-test/r/mysqldump.result: Resolve conflict (probably wrong) mysql-test/t/mysqldump.test: Resolve conflicts, make sure all tests new to 5.1 come after 'End of 5.0 tests'
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r--client/mysqldump.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 5374074ccb2..a1e63db84db 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -863,8 +863,8 @@ static int get_options(int *argc, char ***argv)
static void DB_error(MYSQL *mysql, const char *when)
{
DBUG_ENTER("DB_error");
- my_printf_error(0,"Got error: %d: %s %s", MYF(0),
- mysql_errno(mysql), mysql_error(mysql), when);
+ fprintf(stderr, "%s: Got error: %d: %s %s\n", my_progname,
+ mysql_errno(mysql), mysql_error(mysql), when);
safe_exit(EX_MYSQLERR);
DBUG_VOID_RETURN;
} /* DB_error */
@@ -892,8 +892,9 @@ static int mysql_query_with_error_report(MYSQL *mysql_con, MYSQL_RES **res,
if (mysql_query(mysql_con, query) ||
(res && !((*res)= mysql_store_result(mysql_con))))
{
- my_printf_error(0, "Couldn't execute '%s': %s (%d)", MYF(0),
- query, mysql_error(mysql_con), mysql_errno(mysql_con));
+ fprintf(stderr, "%s: Couldn't execute '%s': %s (%d)\n",
+ my_progname, query,
+ mysql_error(mysql_con), mysql_errno(mysql_con));
safe_exit(EX_MYSQLERR);
return 1;
}
@@ -2380,7 +2381,10 @@ static void dump_table(char *table, char *db)
check_io(md_result_file);
}
if (mysql_query_with_error_report(mysql, 0, query))
+ {
DB_error(mysql, "when retrieving data from server");
+ goto err;
+ }
if (quick)
res=mysql_use_result(mysql);
else