~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/pipe_query.c

  • Committer: Andrew Hutchings
  • Date: 2011-02-01 10:23:22 UTC
  • mto: (2136.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2137.
  • Revision ID: andrew@linuxjedi.co.uk-20110201102322-oxztcyrjzg3c7yta
Fix counters cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 */
36
36
 
37
37
 
38
 
#include <config.h>
 
38
#include "config.h"
39
39
 
40
40
#include <errno.h>
41
41
#include <stdio.h>
56
56
  char *password= NULL;
57
57
  char *buffer= NULL;
58
58
  size_t buffer_size= 0;
 
59
  size_t buffer_total= 0;
59
60
  ssize_t read_size= 0;
60
61
  drizzle_st drizzle;
61
62
  drizzle_con_st *con= (drizzle_con_st*)malloc(sizeof(drizzle_con_st));
147
148
      return 1;
148
149
    }
149
150
 
 
151
    buffer_total= buffer_size + BUFFER_CHUNK;
150
152
  } while ((read_size= read(0, buffer + buffer_size, BUFFER_CHUNK)) != 0);
151
153
 
152
154
  (void)drizzle_query(con, &result, buffer, buffer_size, &ret);