~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/param.cc

  • Committer: Brian Aker
  • Date: 2009-04-05 19:53:29 UTC
  • mfrom: (971.3.11 eday-dev)
  • Revision ID: brian@tangent.org-20090405195329-k2vpiwhlri9oaedq
MergeĀ fromĀ Eric.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/item/float.h>
25
25
#include <drizzled/item/param.h>
26
26
#include <drizzled/sql_string.h>
 
27
#include <drizzled/util/convert.h>
27
28
#include <mystrings/utf8.h>
28
29
 
29
30
Item *Item_param::safe_charset_converter(const CHARSET_INFO * const tocs)
527
528
  {
528
529
    *to++= '0';
529
530
    *to++= 'x';
530
 
    to= drizzleclient_drizzleclient_octet2hex(to, from, len);
 
531
    to+= (size_t) drizzled_string_to_hex(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);