~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/param.cc

Picked up a few more stragglers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <drizzled/item/param.h>
26
26
#include <drizzled/sql_string.h>
27
27
#include <mystrings/utf8.h>
 
28
#include <libdrizzle/drizzle_client.h>
28
29
 
29
30
Item *Item_param::safe_charset_converter(const CHARSET_INFO * const tocs)
30
31
{
527
528
  {
528
529
    *to++= '0';
529
530
    *to++= 'x';
530
 
    to= drizzleclient_drizzleclient_octet2hex(to, from, len);
 
531
    to+= (size_t) drizzle_hex_string(to, from, len);
531
532
  }
532
533
  else
533
534
    to= strcpy(to, "\"\"")+2;
542
543
  Returns the length of the to string
543
544
*/
544
545
 
545
 
uint32_t
546
 
drizzleclient_escape_string(char *to,const char *from, uint32_t length)
 
546
static uint32_t
 
547
_escape_string(char *to,const char *from, uint32_t length)
547
548
{
548
549
  const char *to_start= to;
549
550
  const char *end, *to_end=to_start + 2*length;
634
635
  else
635
636
  {
636
637
    *ptr++= '\'';
637
 
    ptr+= drizzleclient_escape_string(ptr, from->ptr(), from->length());
 
638
    ptr+= _escape_string(ptr, from->ptr(), from->length());
638
639
    *ptr++='\'';
639
640
  }
640
641
  to->length(orig_len + ptr - beg);