summaryrefslogtreecommitdiff
path: root/client/mysqlcheck.c
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2006-08-14 16:30:57 +0400
committerunknown <kostja@bodhi.local>2006-08-14 16:30:57 +0400
commit021cea21fdbfe50db647fe2ab3606f1e075c0654 (patch)
tree213e7c7f15ac23c498fb6ddc5dd3d27425757f43 /client/mysqlcheck.c
parent2f48a59124c776c36ea6609f31543bf6c5f8ed86 (diff)
parent675a5b776d693b64d72227dea86f51cb9ca31781 (diff)
downloadmariadb-git-021cea21fdbfe50db647fe2ab3606f1e075c0654.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_view.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql/sql_db.cc: Manual merge. sql/sql_show.cc: Manual merge. sql/sql_table.cc: Manual merge.
Diffstat (limited to 'client/mysqlcheck.c')
-rw-r--r--client/mysqlcheck.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index db7ae062203..fdfd9fc36fb 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -475,7 +475,7 @@ static int process_all_tables_in_db(char *database)
LINT_INIT(res);
if (use_db(database))
return 1;
- if (mysql_query(sock, "SHOW TABLES") ||
+ if (mysql_query(sock, "SHOW TABLE STATUS") ||
!((res= mysql_store_result(sock))))
return 1;
@@ -501,8 +501,12 @@ static int process_all_tables_in_db(char *database)
}
for (end = tables + 1; (row = mysql_fetch_row(res)) ;)
{
- end= fix_table_name(end, row[0]);
- *end++= ',';
+ /* Skip tables with an engine of NULL (probably a view). */
+ if (row[1])
+ {
+ end= fix_table_name(end, row[0]);
+ *end++= ',';
+ }
}
*--end = 0;
if (tot_length)
@@ -512,7 +516,11 @@ static int process_all_tables_in_db(char *database)
else
{
while ((row = mysql_fetch_row(res)))
- handle_request_for_tables(row[0], strlen(row[0]));
+ /* Skip tables with an engine of NULL (probably a view). */
+ if (row[1])
+ {
+ handle_request_for_tables(row[0], strlen(row[0]));
+ }
}
mysql_free_result(res);
return 0;