~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/libdrizzle.c

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <drizzled/global.h>
 
20
#include "libdrizzle.h"
21
21
#include "libdrizzle_priv.h"
22
 
 
23
 
#include "libdrizzle.h"
24
22
#include "errmsg.h"
25
 
#include "pack.h"
26
 
 
27
23
#include <sys/stat.h>
28
24
#include <signal.h>
29
25
#include <time.h>
54
50
 
55
51
#include <stdlib.h>
56
52
#include <string.h>
57
 
#include <mystrings/utf8.h>
 
53
 
 
54
#include <sql_common.h>
 
55
#include <drizzled/version.h>
 
56
 
 
57
/* Borrowed from libicu header */
 
58
 
 
59
#define U8_IS_SINGLE(c) (((c)&0x80)==0)
 
60
#define U8_LENGTH(c) \
 
61
    ((uint32_t)(c)<=0x7f ? 1 : \
 
62
        ((uint32_t)(c)<=0x7ff ? 2 : \
 
63
            ((uint32_t)(c)<=0xd7ff ? 3 : \
 
64
                ((uint32_t)(c)<=0xdfff || (uint32_t)(c)>0x10ffff ? 0 : \
 
65
                    ((uint32_t)(c)<=0xffff ? 3 : 4)\
 
66
                ) \
 
67
            ) \
 
68
        ) \
 
69
    )
58
70
 
59
71
 
60
72
#undef net_buffer_length
66
78
unsigned int drizzle_port=0;
67
79
 
68
80
#include <errno.h>
 
81
#define SOCKET_ERROR -1
 
82
 
 
83
/*
 
84
  If allowed through some configuration, then this needs to
 
85
  be changed
 
86
*/
 
87
#define MAX_LONG_DATA_LENGTH 8192
 
88
#define unsigned_field(A) ((A)->flags & UNSIGNED_FLAG)
69
89
 
70
90
 
71
91
static DRIZZLE_PARAMETERS drizzle_internal_parameters=
72
92
{&max_allowed_packet, &net_buffer_length, 0};
73
93
 
74
 
const DRIZZLE_PARAMETERS * drizzleclient_get_parameters(void)
 
94
const DRIZZLE_PARAMETERS * drizzle_get_parameters(void)
75
95
{
76
96
  return &drizzle_internal_parameters;
77
97
}
78
98
 
79
 
unsigned int drizzleclient_get_default_port(void)
 
99
unsigned int drizzle_get_default_port(void)
80
100
{
81
101
  return drizzle_port;
82
102
}
83
103
 
84
 
void drizzleclient_set_default_port(unsigned int port)
 
104
void drizzle_set_default_port(unsigned int port)
85
105
{
86
106
  drizzle_port= port;
87
107
}
116
136
  Change user and database
117
137
**************************************************************************/
118
138
 
119
 
int drizzleclient_cli_read_change_user_result(DRIZZLE *drizzle)
 
139
int cli_read_change_user_result(DRIZZLE *drizzle)
120
140
{
121
141
  uint32_t pkt_length;
122
142
 
123
 
  pkt_length= drizzleclient_cli_safe_read(drizzle);
124
 
 
 
143
  pkt_length= cli_safe_read(drizzle);
 
144
  
125
145
  if (pkt_length == packet_error)
126
146
    return 1;
127
147
 
128
148
  return 0;
129
149
}
130
150
 
131
 
bool drizzleclient_change_user(DRIZZLE *drizzle, const char *user,
 
151
bool drizzle_change_user(DRIZZLE *drizzle, const char *user,
132
152
                                 const char *passwd, const char *db)
133
153
{
134
154
  char buff[USERNAME_LENGTH+SCRAMBLED_PASSWORD_CHAR_LENGTH+NAME_LEN+2];
196
216
 
197
217
/**************************************************************************
198
218
  Do a query. If query returned rows, free old rows.
199
 
  Read data by drizzleclient_store_result or by repeat call of drizzleclient_fetch_row
 
219
  Read data by drizzle_store_result or by repeat call of drizzle_fetch_row
200
220
**************************************************************************/
201
221
 
202
222
int
203
 
drizzleclient_query(DRIZZLE *drizzle, const char *query)
 
223
drizzle_query(DRIZZLE *drizzle, const char *query)
204
224
{
205
 
  return drizzleclient_real_query(drizzle,query, (uint32_t) strlen(query));
 
225
  return drizzle_real_query(drizzle,query, (uint32_t) strlen(query));
206
226
}
207
227
 
208
228
 
211
231
**************************************************************************/
212
232
 
213
233
DRIZZLE_FIELD *
214
 
drizzleclient_fetch_field(DRIZZLE_RES *result)
 
234
drizzle_fetch_field(DRIZZLE_RES *result)
215
235
{
216
236
  if (result->current_field >= result->field_count)
217
237
    return(NULL);
224
244
**************************************************************************/
225
245
 
226
246
void
227
 
drizzleclient_data_seek(DRIZZLE_RES *result, uint64_t row)
 
247
drizzle_data_seek(DRIZZLE_RES *result, uint64_t row)
228
248
{
229
249
  DRIZZLE_ROWS  *tmp=0;
230
250
  if (result->data)
236
256
 
237
257
/*************************************************************************
238
258
  put the row or field cursor one a position one got from DRIZZLE_ROW_tell()
239
 
  This doesn't restore any data. The next drizzleclient_fetch_row or
240
 
  drizzleclient_fetch_field will return the next row or field after the last used
 
259
  This doesn't restore any data. The next drizzle_fetch_row or
 
260
  drizzle_fetch_field will return the next row or field after the last used
241
261
*************************************************************************/
242
262
 
243
263
DRIZZLE_ROW_OFFSET
244
 
drizzleclient_row_seek(DRIZZLE_RES *result, DRIZZLE_ROW_OFFSET row)
 
264
drizzle_row_seek(DRIZZLE_RES *result, DRIZZLE_ROW_OFFSET row)
245
265
{
246
266
  DRIZZLE_ROW_OFFSET return_value=result->data_cursor;
247
267
  result->current_row= 0;
251
271
 
252
272
 
253
273
DRIZZLE_FIELD_OFFSET
254
 
drizzleclient_field_seek(DRIZZLE_RES *result, DRIZZLE_FIELD_OFFSET field_offset)
 
274
drizzle_field_seek(DRIZZLE_RES *result, DRIZZLE_FIELD_OFFSET field_offset)
255
275
{
256
276
  DRIZZLE_FIELD_OFFSET return_value=result->current_field;
257
277
  result->current_field=field_offset;
265
285
*****************************************************************************/
266
286
 
267
287
DRIZZLE_RES *
268
 
drizzleclient_list_tables(DRIZZLE *drizzle, const char *wild)
 
288
drizzle_list_tables(DRIZZLE *drizzle, const char *wild)
269
289
{
270
290
  char buff[255];
271
291
  char *ptr= strcpy(buff, "show tables");
272
292
  ptr+= 11; /* strlen("show tables"); */
273
293
 
274
294
  append_wild(ptr,buff+sizeof(buff),wild);
275
 
  if (drizzleclient_query(drizzle,buff))
 
295
  if (drizzle_query(drizzle,buff))
276
296
    return(0);
277
 
  return (drizzleclient_store_result(drizzle));
 
297
  return (drizzle_store_result(drizzle));
278
298
}
279
299
 
280
300
 
281
 
DRIZZLE_FIELD *drizzleclient_cli_list_fields(DRIZZLE *drizzle)
 
301
DRIZZLE_FIELD *cli_list_fields(DRIZZLE *drizzle)
282
302
{
283
303
  DRIZZLE_DATA *query;
284
 
  if (!(query= drizzleclient_cli_read_rows(drizzle,(DRIZZLE_FIELD*) 0, 8)))
 
304
  if (!(query= cli_read_rows(drizzle,(DRIZZLE_FIELD*) 0, 8)))
285
305
    return NULL;
286
306
 
287
307
  drizzle->field_count= (uint32_t) query->rows;
288
 
  return drizzleclient_unpack_fields(query, drizzle->field_count, 1);
 
308
  return unpack_fields(query, drizzle->field_count, 1);
289
309
}
290
310
 
291
311
 
297
317
**************************************************************************/
298
318
 
299
319
DRIZZLE_RES *
300
 
drizzleclient_list_fields(DRIZZLE *drizzle, const char *table, const char *wild)
 
320
drizzle_list_fields(DRIZZLE *drizzle, const char *table, const char *wild)
301
321
{
302
322
  DRIZZLE_RES   *result;
303
323
  DRIZZLE_FIELD *fields;
306
326
  end= strncpy(buff, table, 128) + 128;
307
327
  end= strncpy(end+1, wild ? wild : "", 128) + 128;
308
328
 
309
 
  drizzleclient_free_old_query(drizzle);
 
329
  free_old_query(drizzle);
310
330
  if (simple_command(drizzle, COM_FIELD_LIST, (unsigned char*) buff,
311
331
                     (uint32_t) (end-buff), 1) ||
312
332
      !(fields= (*drizzle->methods->list_fields)(drizzle)))
328
348
/* List all running processes (threads) in server */
329
349
 
330
350
DRIZZLE_RES *
331
 
drizzleclient_list_processes(DRIZZLE *drizzle)
 
351
drizzle_list_processes(DRIZZLE *drizzle)
332
352
{
333
353
  DRIZZLE_DATA *fields;
334
354
  uint32_t field_count;
336
356
 
337
357
  if (simple_command(drizzle,COM_PROCESS_INFO,0,0,0))
338
358
    return(0);
339
 
  drizzleclient_free_old_query(drizzle);
 
359
  free_old_query(drizzle);
340
360
  pos=(unsigned char*) drizzle->net.read_pos;
341
 
  field_count=(uint32_t) drizzleclient_net_field_length(&pos);
 
361
  field_count=(uint32_t) net_field_length(&pos);
342
362
  if (!(fields = (*drizzle->methods->read_rows)(drizzle,(DRIZZLE_FIELD*) 0, 7)))
343
363
    return(NULL);
344
 
  if (!(drizzle->fields=drizzleclient_unpack_fields(fields, field_count, 0)))
 
364
  if (!(drizzle->fields=unpack_fields(fields, field_count, 0)))
345
365
    return(0);
346
366
  drizzle->status=DRIZZLE_STATUS_GET_RESULT;
347
367
  drizzle->field_count=field_count;
348
 
  return(drizzleclient_store_result(drizzle));
 
368
  return(drizzle_store_result(drizzle));
349
369
}
350
370
 
351
371
 
352
372
int
353
 
drizzleclient_shutdown(DRIZZLE *drizzle)
 
373
drizzle_shutdown(DRIZZLE *drizzle)
354
374
{
355
375
  return(simple_command(drizzle, COM_SHUTDOWN, 0, 0, 0));
356
376
}
357
377
 
358
378
 
359
379
int
360
 
drizzleclient_refresh(DRIZZLE *drizzle, uint32_t options)
 
380
drizzle_refresh(DRIZZLE *drizzle, uint32_t options)
361
381
{
362
382
  unsigned char bits[1];
363
383
  bits[0]= (unsigned char) options;
366
386
 
367
387
 
368
388
int32_t
369
 
drizzleclient_kill(DRIZZLE *drizzle, uint32_t pid)
 
389
drizzle_kill(DRIZZLE *drizzle, uint32_t pid)
370
390
{
371
391
  unsigned char buff[4];
372
392
  int4store(buff,pid);
375
395
 
376
396
 
377
397
int
378
 
drizzleclient_set_server_option(DRIZZLE *drizzle, enum enum_drizzle_set_option option)
 
398
drizzle_set_server_option(DRIZZLE *drizzle, enum enum_drizzle_set_option option)
379
399
{
380
400
  unsigned char buff[2];
381
401
  int2store(buff, (uint32_t) option);
383
403
}
384
404
 
385
405
 
386
 
const char *drizzleclient_cli_read_statistics(DRIZZLE *drizzle)
 
406
const char *cli_read_statistics(DRIZZLE *drizzle)
387
407
{
388
408
  drizzle->net.read_pos[drizzle->packet_length]=0;  /* End of stat string */
389
409
  if (!drizzle->net.read_pos[0])
390
410
  {
391
 
    drizzleclient_set_error(drizzle, CR_WRONG_HOST_INFO, drizzleclient_sqlstate_get_unknown());
 
411
    drizzle_set_error(drizzle, CR_WRONG_HOST_INFO, sqlstate_get_unknown());
392
412
    return drizzle->net.last_error;
393
413
  }
394
414
  return (char*) drizzle->net.read_pos;
396
416
 
397
417
 
398
418
int
399
 
drizzleclient_ping(DRIZZLE *drizzle)
 
419
drizzle_ping(DRIZZLE *drizzle)
400
420
{
401
421
  int res;
402
422
  res= simple_command(drizzle,COM_PING,0,0,0);
407
427
 
408
428
 
409
429
const char *
410
 
drizzleclient_get_server_info(const DRIZZLE *drizzle)
 
430
drizzle_get_server_info(const DRIZZLE *drizzle)
411
431
{
412
432
  return((char*) drizzle->server_version);
413
433
}
414
434
 
415
435
 
416
436
const char *
417
 
drizzleclient_get_host_info(const DRIZZLE *drizzle)
 
437
drizzle_get_host_info(const DRIZZLE *drizzle)
418
438
{
419
439
  return(drizzle->host_info);
420
440
}
421
441
 
422
442
 
423
443
uint32_t
424
 
drizzleclient_get_proto_info(const DRIZZLE *drizzle)
 
444
drizzle_get_proto_info(const DRIZZLE *drizzle)
425
445
{
426
446
  return (drizzle->protocol_version);
427
447
}
428
448
 
429
449
const char *
430
 
drizzleclient_get_client_info(void)
 
450
drizzle_get_client_info(void)
431
451
{
432
 
  return (char*) VERSION;
 
452
  return (char*) DRIZZLE_SERVER_VERSION;
433
453
}
434
454
 
435
 
uint32_t drizzleclient_get_client_version(void)
 
455
uint32_t drizzle_get_client_version(void)
436
456
{
437
457
  return DRIZZLE_VERSION_ID;
438
458
}
439
459
 
440
 
bool drizzleclient_eof(const DRIZZLE_RES *res)
 
460
bool drizzle_eof(const DRIZZLE_RES *res)
441
461
{
442
462
  return res->eof;
443
463
}
444
464
 
445
 
const DRIZZLE_FIELD * drizzleclient_fetch_field_direct(const DRIZZLE_RES *res, unsigned int fieldnr)
 
465
const DRIZZLE_FIELD * drizzle_fetch_field_direct(const DRIZZLE_RES *res, unsigned int fieldnr)
446
466
{
447
467
  return &(res)->fields[fieldnr];
448
468
}
449
469
 
450
 
const DRIZZLE_FIELD * drizzleclient_fetch_fields(const DRIZZLE_RES *res)
 
470
const DRIZZLE_FIELD * drizzle_fetch_fields(const DRIZZLE_RES *res)
451
471
{
452
472
  return res->fields;
453
473
}
454
474
 
455
 
DRIZZLE_ROW_OFFSET drizzleclient_row_tell(const DRIZZLE_RES *res)
 
475
DRIZZLE_ROW_OFFSET drizzle_row_tell(const DRIZZLE_RES *res)
456
476
{
457
477
  return res->data_cursor;
458
478
}
459
479
 
460
 
DRIZZLE_FIELD_OFFSET drizzleclient_field_tell(const DRIZZLE_RES *res)
 
480
DRIZZLE_FIELD_OFFSET drizzle_field_tell(const DRIZZLE_RES *res)
461
481
{
462
482
  return res->current_field;
463
483
}
464
484
 
465
485
/* DRIZZLE */
466
486
 
467
 
unsigned int drizzleclient_field_count(const DRIZZLE *drizzle)
 
487
unsigned int drizzle_field_count(const DRIZZLE *drizzle)
468
488
{
469
489
  return drizzle->field_count;
470
490
}
471
491
 
472
 
uint64_t drizzleclient_affected_rows(const DRIZZLE *drizzle)
 
492
uint64_t drizzle_affected_rows(const DRIZZLE *drizzle)
473
493
{
474
494
  return drizzle->affected_rows;
475
495
}
476
496
 
477
 
uint64_t drizzleclient_insert_id(const DRIZZLE *drizzle)
 
497
uint64_t drizzle_insert_id(const DRIZZLE *drizzle)
478
498
{
479
499
  return drizzle->insert_id;
480
500
}
481
501
 
482
 
const char * drizzleclient_sqlstate(const DRIZZLE *drizzle)
 
502
const char * drizzle_sqlstate(const DRIZZLE *drizzle)
483
503
{
484
 
  return drizzle ? drizzle->net.sqlstate : drizzleclient_sqlstate_get_cant_connect();
 
504
  return drizzle ? drizzle->net.sqlstate : sqlstate_get_cant_connect();
485
505
}
486
506
 
487
 
uint32_t drizzleclient_warning_count(const DRIZZLE *drizzle)
 
507
uint32_t drizzle_warning_count(const DRIZZLE *drizzle)
488
508
{
489
509
  return drizzle->warning_count;
490
510
}
491
511
 
492
 
const char * drizzleclient_info(const DRIZZLE *drizzle)
 
512
const char * drizzle_info(const DRIZZLE *drizzle)
493
513
{
494
514
  return drizzle->info;
495
515
}
496
516
 
497
 
uint32_t drizzleclient_thread_id(const DRIZZLE *drizzle)
 
517
uint32_t drizzle_thread_id(const DRIZZLE *drizzle)
498
518
{
499
519
  return drizzle->thread_id;
500
520
}
504
524
****************************************************************************/
505
525
 
506
526
/*
507
 
  Functions called my drizzleclient_net_init() to set some application specific variables
 
527
  Functions called my my_net_init() to set some application specific variables
508
528
*/
509
529
 
510
 
void drizzleclient_net_local_init(NET *net)
 
530
void my_net_local_init(NET *net)
511
531
{
512
532
  net->max_packet=   (uint32_t) net_buffer_length;
513
 
  drizzleclient_net_set_read_timeout(net, CLIENT_NET_READ_TIMEOUT);
514
 
  drizzleclient_net_set_write_timeout(net, CLIENT_NET_WRITE_TIMEOUT);
 
533
  my_net_set_read_timeout(net, CLIENT_NET_READ_TIMEOUT);
 
534
  my_net_set_write_timeout(net, CLIENT_NET_WRITE_TIMEOUT);
515
535
  net->retry_count=  1;
516
536
  net->max_packet_size= (net_buffer_length > max_allowed_packet) ?
517
537
    net_buffer_length : max_allowed_packet;
518
538
}
519
539
 
520
540
/*
 
541
  This function is used to create HEX string that you
 
542
  can use in a SQL statement in of the either ways:
 
543
    INSERT INTO blob_column VALUES (0xAABBCC);  (any DRIZZLE version)
 
544
    INSERT INTO blob_column VALUES (X'AABBCC'); 
 
545
  
 
546
  The string in "from" is encoded to a HEX string.
 
547
  The result is placed in "to" and a terminating null byte is appended.
 
548
  
 
549
  The string pointed to by "from" must be "length" bytes long.
 
550
  You must allocate the "to" buffer to be at least length*2+1 bytes long.
 
551
  Each character needs two bytes, and you need room for the terminating
 
552
  null byte. When drizzle_hex_string() returns, the contents of "to" will
 
553
  be a null-terminated string. The return value is the length of the
 
554
  encoded string, not including the terminating null character.  The return value does not contain any leading 0x or a leading X' and
 
555
  trailing '. The caller must supply whichever of those is desired.
 
556
*/
 
557
 
 
558
uint32_t
 
559
drizzle_hex_string(char *to, const char *from, uint32_t length)
 
560
{
 
561
  char *to0= to;
 
562
  const char *end;
 
563
            
 
564
  for (end= from + length; from < end; from++)
 
565
  {
 
566
    *to++= _dig_vec_upper[((unsigned char) *from) >> 4];
 
567
    *to++= _dig_vec_upper[((unsigned char) *from) & 0x0F];
 
568
  }
 
569
  *to= '\0';
 
570
  return (uint32_t) (to-to0);
 
571
}
 
572
 
 
573
/*
521
574
  Add escape characters to a string (blob?) to make it suitable for a insert
522
575
  to should at least have place for length*2+1 chars
523
576
  Returns the length of the to string
524
577
*/
525
578
 
526
579
uint32_t
527
 
drizzleclient_escape_string(char *to,const char *from, uint32_t length)
 
580
drizzle_escape_string(char *to,const char *from, uint32_t length)
528
581
{
529
582
  const char *to_start= to;
530
583
  const char *end, *to_end=to_start + 2*length;
535
588
    char escape= 0;
536
589
    if (!U8_IS_SINGLE(*from))
537
590
    {
538
 
      tmp_length= U8_LENGTH(*(uint32_t*)from);
 
591
      tmp_length= U8_LENGTH(*from);
539
592
      if (to + tmp_length > to_end)
540
593
      {
541
594
        overflow= true;
593
646
  return overflow ? (size_t) -1 : (size_t) (to - to_start);
594
647
}
595
648
 
596
 
int drizzleclient_cli_unbuffered_fetch(DRIZZLE *drizzle, char **row)
 
649
int cli_unbuffered_fetch(DRIZZLE *drizzle, char **row)
597
650
{
598
 
  if (packet_error == drizzleclient_cli_safe_read(drizzle))
 
651
  if (packet_error == cli_safe_read(drizzle))
599
652
    return 1;
600
653
 
601
654
  *row= ((drizzle->net.read_pos[0] == DRIZZLE_PROTOCOL_NO_MORE_DATA) ? NULL :
611
664
  Commit the current transaction
612
665
*/
613
666
 
614
 
bool drizzleclient_commit(DRIZZLE *drizzle)
 
667
bool drizzle_commit(DRIZZLE *drizzle)
615
668
{
616
 
  return((bool) drizzleclient_real_query(drizzle, "commit", 6));
 
669
  return((bool) drizzle_real_query(drizzle, "commit", 6));
617
670
}
618
671
 
619
672
/*
620
673
  Rollback the current transaction
621
674
*/
622
675
 
623
 
bool drizzleclient_rollback(DRIZZLE *drizzle)
 
676
bool drizzle_rollback(DRIZZLE *drizzle)
624
677
{
625
 
  return((bool) drizzleclient_real_query(drizzle, "rollback", 8));
 
678
  return((bool) drizzle_real_query(drizzle, "rollback", 8));
626
679
}
627
680
 
628
681
 
630
683
  Set autocommit to either true or false
631
684
*/
632
685
 
633
 
bool drizzleclient_autocommit(DRIZZLE *drizzle, bool auto_mode)
 
686
bool drizzle_autocommit(DRIZZLE *drizzle, bool auto_mode)
634
687
{
635
 
  return((bool) drizzleclient_real_query(drizzle, auto_mode ?
 
688
  return((bool) drizzle_real_query(drizzle, auto_mode ?
636
689
                                         "set autocommit=1":"set autocommit=0",
637
690
                                         16));
638
691
}
644
697
 
645
698
/*
646
699
  Returns true/false to indicate whether any more query results exist
647
 
  to be read using drizzleclient_next_result()
 
700
  to be read using drizzle_next_result()
648
701
*/
649
702
 
650
 
bool drizzleclient_more_results(const DRIZZLE *drizzle)
 
703
bool drizzle_more_results(const DRIZZLE *drizzle)
651
704
{
652
705
  return (drizzle->server_status & SERVER_MORE_RESULTS_EXISTS) ? true:false;
653
706
}
656
709
/*
657
710
  Reads and returns the next query results
658
711
*/
659
 
int drizzleclient_next_result(DRIZZLE *drizzle)
 
712
int drizzle_next_result(DRIZZLE *drizzle)
660
713
{
661
714
  if (drizzle->status != DRIZZLE_STATUS_READY)
662
715
  {
663
 
    drizzleclient_set_error(drizzle, CR_COMMANDS_OUT_OF_SYNC, drizzleclient_sqlstate_get_unknown());
 
716
    drizzle_set_error(drizzle, CR_COMMANDS_OUT_OF_SYNC, sqlstate_get_unknown());
664
717
    return(1);
665
718
  }
666
719
 
667
 
  drizzleclient_drizzleclient_net_clear_error(&drizzle->net);
 
720
  net_clear_error(&drizzle->net);
668
721
  drizzle->affected_rows= ~(uint64_t) 0;
669
722
 
670
723
  if (drizzle->server_status & SERVER_MORE_RESULTS_EXISTS)
674
727
}
675
728
 
676
729
 
677
 
DRIZZLE_RES * drizzleclient_use_result(DRIZZLE *drizzle)
 
730
DRIZZLE_RES * drizzle_use_result(DRIZZLE *drizzle)
678
731
{
679
732
  return (*drizzle->methods->use_result)(drizzle);
680
733
}
681
734
 
682
 
bool drizzleclient_read_query_result(DRIZZLE *drizzle)
 
735
bool drizzle_read_query_result(DRIZZLE *drizzle)
683
736
{
684
737
  return (*drizzle->methods->read_query_result)(drizzle);
685
738
}