~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/charset.c

Merged from Andrey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
675
675
  Escape string with backslashes (\)
676
676
 
677
677
  SYNOPSIS
678
 
    escape_string_for_mysql()
 
678
    escape_string_for_drizzle()
679
679
    charset_info        Charset of the strings
680
680
    to                  Buffer for escaped string
681
681
    to_length           Length of destination buffer, or 0
696
696
    #           The length of the escaped string
697
697
*/
698
698
 
699
 
size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
700
 
                               char *to, size_t to_length,
701
 
                               const char *from, size_t length)
 
699
size_t escape_string_for_drizzle(CHARSET_INFO *charset_info,
 
700
                                 char *to, size_t to_length,
 
701
                                 const char *from, size_t length)
702
702
{
703
703
  const char *to_start= to;
704
704
  const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
815
815
  Escape apostrophes by doubling them up
816
816
 
817
817
  SYNOPSIS
818
 
    escape_quotes_for_mysql()
 
818
    escape_quotes_for_drizzle()
819
819
    charset_info        Charset of the strings
820
820
    to                  Buffer for escaped string
821
821
    to_length           Length of destination buffer, or 0
836
836
    >=0         The length of the escaped string
837
837
*/
838
838
 
839
 
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
840
 
                               char *to, size_t to_length,
841
 
                               const char *from, size_t length)
 
839
size_t escape_quotes_for_drizzle(CHARSET_INFO *charset_info,
 
840
                                 char *to, size_t to_length,
 
841
                                 const char *from, size_t length)
842
842
{
843
843
  const char *to_start= to;
844
844
  const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);