diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-01-25 11:24:42 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-01-25 11:24:42 +0100 |
commit | 672b293860318b290374757f9b6a7f90b8942570 (patch) | |
tree | 6e1b4784e1d01890a1f9c5e3b88fe54ee773ba6b /client | |
parent | 32151409c13ddc09ebda7cd02fdfe40db290503e (diff) | |
parent | de10e214115ecc89087386ecad8bddee2a1e1608 (diff) | |
download | mariadb-git-672b293860318b290374757f9b6a7f90b8942570.tar.gz |
5.3 merge
client/mysqltest.cc:
make --error to work for --change_user errors
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqldump.c | 4 | ||||
-rw-r--r-- | client/mysqltest.cc | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index a2f6087f09b..c4dda927c68 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -2551,7 +2551,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, verbose_msg("-- Retrieving table structure for table %s...\n", table); len= my_snprintf(query_buff, sizeof(query_buff), - "SET OPTION SQL_QUOTE_SHOW_CREATE=%d", + "SET SQL_QUOTE_SHOW_CREATE=%d", (opt_quoted || opt_keywords)); if (!create_options) strmov(query_buff+len, @@ -5292,7 +5292,7 @@ static my_bool get_view_structure(char *table, char* db) verbose_msg("-- Retrieving view structure for table %s...\n", table); #ifdef NOT_REALLY_USED_YET - sprintf(insert_pat,"SET OPTION SQL_QUOTE_SHOW_CREATE=%d", + sprintf(insert_pat,"SET SQL_QUOTE_SHOW_CREATE=%d", (opt_quoted || opt_keywords)); #endif diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 7bc52941700..8c6c1cb3408 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -4393,7 +4393,10 @@ void do_change_user(struct st_command *command) cur_con->name, ds_user.str, ds_passwd.str, ds_db.str)); if (mysql_change_user(mysql, ds_user.str, ds_passwd.str, ds_db.str)) - die("change user failed: %s", mysql_error(mysql)); + handle_error(command, mysql_errno(mysql), mysql_error(mysql), + mysql_sqlstate(mysql), &ds_res); + else + handle_no_error(command); dynstr_free(&ds_user); dynstr_free(&ds_passwd); |