~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/simple_multi.c

  • Committer: Brian Aker
  • Date: 2010-11-29 04:42:53 UTC
  • mto: (2017.3.1 catalogs)
  • mto: This revision was merged to the branch mainline in revision 1962.
  • Revision ID: brian@tangent.org-20101129044253-e46xw0y04xv7nx3a
Remove dead code in wait, pass session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
#include <stdio.h>
12
12
#include <string.h>
 
13
#include <stdlib.h>
13
14
 
14
15
#include <libdrizzle/drizzle_client.h>
15
16
 
19
20
{
20
21
  const char *query= "SELECT table_schema,table_name FROM tables";
21
22
  drizzle_st drizzle;
22
 
  drizzle_con_st con[SIMPLE_MULTI_COUNT];
23
 
  drizzle_result_st result[SIMPLE_MULTI_COUNT];
24
 
  drizzle_query_st ql[SIMPLE_MULTI_COUNT];
 
23
  drizzle_con_st *con;
 
24
  drizzle_result_st *result;
 
25
  drizzle_query_st *ql;
25
26
  drizzle_return_t ret;
26
27
  drizzle_row_t row;
27
28
  int x;
28
29
 
 
30
  con= (drizzle_con_st*)malloc(sizeof(drizzle_con_st) * SIMPLE_MULTI_COUNT);
 
31
  result= (drizzle_result_st*)malloc(sizeof(drizzle_result_st) * SIMPLE_MULTI_COUNT);
 
32
  ql= (drizzle_query_st*)malloc(sizeof(drizzle_query_st) * SIMPLE_MULTI_COUNT);
 
33
 
29
34
  if (drizzle_create(&drizzle) == NULL)
30
35
  {
31
36
    printf("drizzle_create:NULL\n");
92
97
 
93
98
  drizzle_free(&drizzle);
94
99
 
 
100
  free(con);
 
101
  free(result);
 
102
  free(ql);
95
103
  return 0;
96
104
}