~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/oldlibdrizzle/oldlibdrizzle.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-04-09 23:30:44 UTC
  • mfrom: (988 drizzle)
  • mto: (971.1.63 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: osullivan.padraig@gmail.com-20090409233044-ktwjqhe1qowzv63v
Added a new helper function for testing and setting a bit in a bitset. Also,
merged from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
537
537
    the client, the connection is closed or "net_wait_timeout"
538
538
    number of seconds has passed
539
539
  */
 
540
#ifdef NEVER
 
541
  /* We can do this much more efficiently with poll timeouts or watcher thread,
 
542
     disabling for now, which means net_wait_timeout == read_timeout. */
540
543
  drizzleclient_net_set_read_timeout(&net,
541
544
                                     session->variables.net_wait_timeout);
 
545
#endif
542
546
 
543
547
  session->clear_error();
544
548
  session->main_da.reset_diagnostics_area();
585
589
  /* Do not rely on drizzleclient_net_read, extra safety against programming errors. */
586
590
  (*l_packet)[*packet_length]= '\0';                  /* safety */
587
591
 
 
592
#ifdef NEVER
 
593
  /* See comment above. */
588
594
  /* Restore read timeout value */
589
595
  drizzleclient_net_set_read_timeout(&net,
590
596
                                     session->variables.net_read_timeout);
 
597
#endif
591
598
 
592
599
  return true;
593
600
}
601
608
  }
602
609
}
603
610
 
 
611
void ProtocolOldLibdrizzle::forceClose(void)
 
612
{
 
613
  if (net.vio)
 
614
    drizzleclient_vio_close(net.vio);
 
615
}
 
616
 
604
617
void ProtocolOldLibdrizzle::prepareForResend()
605
618
{
606
619
  packet->length(0);