~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

Merge Hartmut

Show diffs side-by-side

added added

removed removed

Lines of Context:
3446
3446
  drizzle_row_t cur;
3447
3447
  uint64_t num_rows;
3448
3448
  uint32_t new_code= 0;
 
3449
  FILE *out;
3449
3450
 
3450
3451
  /* Get the warnings */
3451
3452
  query= "show warnings";
3471
3472
  }
3472
3473
 
3473
3474
  /* Print the warnings */
3474
 
  init_pager();
 
3475
  if (status.getBatch()) 
 
3476
  {
 
3477
    out= stderr;
 
3478
  } 
 
3479
  else 
 
3480
  {
 
3481
    init_pager();
 
3482
    out= PAGER;
 
3483
  }
3475
3484
  do
3476
3485
  {
3477
 
    tee_fprintf(PAGER, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]);
 
3486
    tee_fprintf(out, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]);
3478
3487
  } while ((cur= drizzle_row_next(&result)));
3479
 
  end_pager();
 
3488
 
 
3489
  if (not status.getBatch())
 
3490
    end_pager();
3480
3491
 
3481
3492
end:
3482
3493
  drizzle_result_free(&result);