~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Eric Day
  • Date: 2009-03-26 09:22:55 UTC
  • mto: (968.1.1 lib-merge)
  • mto: This revision was merged to the branch mainline in revision 969.
  • Revision ID: eday@oddments.org-20090326092255-m51lu07ve4trwynq
Tools mostly converted, still fixing bugs from test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
943
943
 
944
944
static int drizzleclient_query_with_error_report(drizzle_con_st *con,
945
945
                                                 drizzle_result_st *result,
946
 
                                                 const char *query, bool quick)
 
946
                                                 const char *query_str,
 
947
                                                 bool no_buffer)
947
948
{
948
949
  drizzle_return_t ret;
949
950
 
950
 
  if (drizzle_query_str(con, result, query, &ret) == NULL ||
 
951
  if (drizzle_query_str(con, result, query_str, &ret) == NULL ||
951
952
      ret != DRIZZLE_RETURN_OK)
952
953
  {
953
954
    if (ret == DRIZZLE_RETURN_ERROR_CODE)
954
955
    {
955
956
      maybe_die(EX_DRIZZLEERR, _("Couldn't execute '%s': %s (%d)"),
956
 
                query, drizzle_result_error(result),
 
957
                query_str, drizzle_result_error(result),
957
958
                drizzle_result_error_code(result));
958
959
      drizzle_result_free(result);
959
960
    }
960
961
    else
961
962
    {
962
963
      maybe_die(EX_DRIZZLEERR, _("Couldn't execute '%s': %s (%d)"),
963
 
                query, drizzle_con_error(con), ret);
 
964
                query_str, drizzle_con_error(con), ret);
964
965
    }
965
966
    return 1;
966
967
  }
967
968
 
968
 
  if (quick)
 
969
  if (no_buffer)
969
970
    ret= drizzle_column_buffer(result);
970
971
  else
971
972
    ret= drizzle_result_buffer(result);
973
974
  {
974
975
    drizzle_result_free(result);
975
976
    maybe_die(EX_DRIZZLEERR, _("Couldn't execute '%s': %s (%d)"),
976
 
              query, drizzle_con_error(con), ret);
 
977
              query_str, drizzle_con_error(con), ret);
977
978
    return 1;
978
979
  }
979
980