This commit is contained in:
Geir Hauge 2007-02-27 11:38:07 +00:00
parent d5c3a593d6
commit bcb560b925
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* @(#) $Header: /tmp/cvs/mysql-admutils/mysql-dbadm.c,v 1.17 2006-11-17 14:32:46 geirha Exp $
* @(#) $Header: /tmp/cvs/mysql-admutils/mysql-dbadm.c,v 1.18 2007-02-27 11:38:07 geirha Exp $
*
* mysql-dbadm.c
*
@ -272,16 +272,18 @@ writeperm(FILE *f, MYSQL *pmysql, const char *db)
res = mysql_store_result(pmysql);
rows = mysql_num_rows(res);
fprintf(f, "# User "
"Select Insert Update Delete Create Drop Alter Index Create temporary tables Lock tables\n");
"Select Insert Update Delete Create Drop Alter Index "
" Temp Lock\n");
fprintf(f, "# ---------------- "
"------ ------ ------ ------ ------ ---- ----- ----- ----------------------- -----------\n");
"------ ------ ------ ------ ------ ---- ----- ----- "
" ---- ----\n");
if (rows == 0)
fprintf(f, "# (no permissions currently granted to any users)\n");
else {
for (i = 0; i < rows; i++) {
row = mysql_fetch_row(res);
fprintf(f, " %-16s %-7s %-7s %-7s %-7s %-6s %-6s %-6s %-15s %-18s %s\n",
fprintf(f, " %-16s %-7s %-7s %-7s %-7s %-7s %-7s %-7s %-7s %-7s %s\n",
row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10]);
}
}