~ubuntu-branches/ubuntu/hardy/mysql-dfsg-5.0/hardy-updates

« back to all changes in this revision

Viewing changes to client/mysqlcheck.c

  • Committer: Bazaar Package Importer
  • Author(s): sean finney
  • Date: 2007-05-13 12:32:45 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20070513123245-8c3l187dk34cz2ar
Tags: 5.0.41-2
the previous "translation changes" inadvertently introduced unrelated
changes in the package control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
453
453
{
454
454
  MYSQL_RES *res;
455
455
  MYSQL_ROW row;
 
456
  uint num_columns;
456
457
 
457
458
  LINT_INIT(res);
458
459
  if (use_db(database))
459
460
    return 1;
460
 
  if (mysql_query(sock, "SHOW TABLE STATUS") ||
 
461
  if (mysql_query(sock, "SHOW /*!50002 FULL*/ TABLES") ||
461
462
        !((res= mysql_store_result(sock))))
462
463
    return 1;
463
464
 
 
465
  num_columns= mysql_num_fields(res);
 
466
 
464
467
  if (opt_all_in_1)
465
468
  {
466
469
    /*
483
486
    }
484
487
    for (end = tables + 1; (row = mysql_fetch_row(res)) ;)
485
488
    {
486
 
      /* Skip tables with an engine of NULL (probably a view). */
487
 
      if (row[1])
488
 
      {
489
 
        end= fix_table_name(end, row[0]);
490
 
        *end++= ',';
491
 
      }
 
489
      if ((num_columns == 2) && (strcmp(row[1], "VIEW") == 0))
 
490
        continue;
 
491
 
 
492
      end= fix_table_name(end, row[0]);
 
493
      *end++= ',';
492
494
    }
493
495
    *--end = 0;
494
496
    if (tot_length)
498
500
  else
499
501
  {
500
502
    while ((row = mysql_fetch_row(res)))
501
 
      /* Skip tables with an engine of NULL (probably a view). */
502
 
      if (row[1])
503
 
      {
504
 
        handle_request_for_tables(row[0], strlen(row[0]));
505
 
      }
 
503
    {
 
504
      if ((num_columns == 2) && (strcmp(row[1], "VIEW") == 0))
 
505
        continue;
 
506
 
 
507
      handle_request_for_tables(row[0], strlen(row[0]));
 
508
    }
506
509
  }
507
510
  mysql_free_result(res);
508
511
  return 0;