~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/libdrizzle.c

  • Committer: Brian Aker
  • Date: 2008-09-16 09:41:23 UTC
  • Revision ID: brian@gir.lan-20080916094123-2ws792vn896n2g53
Fixed uint/ushort issue in libdrizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
  /* Add character set number. */
182
182
  if (drizzle->server_capabilities & CLIENT_SECURE_CONNECTION)
183
183
  {
184
 
    int2store(end, (ushort) 45); // utf8mb4 number from mystrings/ctype-utf8.c
 
184
    int2store(end, (uint16_t) 45); // utf8mb4 number from mystrings/ctype-utf8.c
185
185
    end+= 2;
186
186
  }
187
187
 
222
222
int
223
223
drizzle_query(DRIZZLE *drizzle, const char *query)
224
224
{
225
 
  return drizzle_real_query(drizzle,query, (uint) strlen(query));
 
225
  return drizzle_real_query(drizzle,query, (uint32_t) strlen(query));
226
226
}
227
227
 
228
228
 
304
304
  if (!(query= cli_read_rows(drizzle,(DRIZZLE_FIELD*) 0, 8)))
305
305
    return NULL;
306
306
 
307
 
  drizzle->field_count= (uint) query->rows;
 
307
  drizzle->field_count= (uint32_t) query->rows;
308
308
  return unpack_fields(query, drizzle->field_count, 1);
309
309
}
310
310
 
351
351
drizzle_list_processes(DRIZZLE *drizzle)
352
352
{
353
353
  DRIZZLE_DATA *fields;
354
 
  uint field_count;
 
354
  uint32_t field_count;
355
355
  unsigned char *pos;
356
356
 
357
357
  if (simple_command(drizzle,COM_PROCESS_INFO,0,0,0))
358
358
    return(0);
359
359
  free_old_query(drizzle);
360
360
  pos=(unsigned char*) drizzle->net.read_pos;
361
 
  field_count=(uint) net_field_length(&pos);
 
361
  field_count=(uint32_t) net_field_length(&pos);
362
362
  if (!(fields = (*drizzle->methods->read_rows)(drizzle,(DRIZZLE_FIELD*) 0, 7)))
363
363
    return(NULL);
364
364
  if (!(drizzle->fields=unpack_fields(fields, field_count, 0)))
379
379
 
380
380
 
381
381
int
382
 
drizzle_refresh(DRIZZLE *drizzle,uint options)
 
382
drizzle_refresh(DRIZZLE *drizzle,uint32_t options)
383
383
{
384
384
  unsigned char bits[1];
385
385
  bits[0]= (unsigned char) options;
400
400
drizzle_set_server_option(DRIZZLE *drizzle, enum enum_drizzle_set_option option)
401
401
{
402
402
  unsigned char buff[2];
403
 
  int2store(buff, (uint) option);
 
403
  int2store(buff, (uint32_t) option);
404
404
  return(simple_command(drizzle, COM_SET_OPTION, buff, sizeof(buff), 0));
405
405
}
406
406
 
442
442
}
443
443
 
444
444
 
445
 
uint
 
445
uint32_t
446
446
drizzle_get_proto_info(const DRIZZLE *drizzle)
447
447
{
448
448
  return (drizzle->protocol_version);
531
531
 
532
532
void my_net_local_init(NET *net)
533
533
{
534
 
  net->max_packet=   (uint) net_buffer_length;
 
534
  net->max_packet=   (uint32_t) net_buffer_length;
535
535
  my_net_set_read_timeout(net, CLIENT_NET_READ_TIMEOUT);
536
536
  my_net_set_write_timeout(net, CLIENT_NET_WRITE_TIMEOUT);
537
537
  net->retry_count=  1;