summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <geert@kriem.kemuri.org>2005-04-08 16:54:50 +0200
committerunknown <geert@kriem.kemuri.org>2005-04-08 16:54:50 +0200
commit93da32acbb05cfb18e6062494825af0807dd8be0 (patch)
tree39d89a96d8dd9c7d38fac37e07d5d284e810bbf2 /client
parentffc3c5c9fabbe9026e0ba33a470c794815440d4d (diff)
downloadmariadb-git-93da32acbb05cfb18e6062494825af0807dd8be0.tar.gz
Removing for-loop in print_warnings()
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 869194e75b6..9a07be07911 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2243,19 +2243,8 @@ print_warnings()
while ((cur= mysql_fetch_row(result)))
{
mysql_field_seek(result, 0);
- /* Format as: <level> <code>: <message> */
- for (uint off= 0; off < mysql_num_fields(result); off++)
- {
- const char *str= cur[off] ? cur[off] : "NULL";
- field = mysql_fetch_field(result);
- tee_fputs(str, PAGER);
- tee_fputs(" ", PAGER);
- if( off == 1 )
- (void) tee_fputs(": ", PAGER);
- }
- (void) tee_fputs("\n", PAGER);
+ tee_fprintf(PAGER, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]);
}
- tee_fputs("\n", PAGER);
mysql_free_result(result);
}