~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/string_functions/quote.cc

  • Committer: Mark Atwood
  • Date: 2011-10-27 05:08:12 UTC
  • mfrom: (2445.1.11 rf)
  • Revision ID: me@mark.atwood.name-20111027050812-1icvs72lb0u4xdc4
mergeĀ lp:~olafvdspek/drizzle/refactor8

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <config.h>
21
21
 
22
22
#include "quote.h"
23
23
 
 
24
#include <drizzled/lex_string.h>
 
25
 
24
26
namespace drizzled
25
27
{
26
28
 
80
82
  for (from= (char*) arg->ptr(), end= from + arg_length; from < end; from++)
81
83
    new_length+= get_esc_bit(escmask, (unsigned char) *from);
82
84
 
83
 
  if (tmp_value.alloc(new_length))
84
 
    goto null;
 
85
  tmp_value.alloc(new_length);
85
86
 
86
87
  /*
87
88
    We replace characters from the end to the beginning
118
119
  tmp_value.set_charset(collation.collation);
119
120
  null_value= 0;
120
121
  return &tmp_value;
121
 
 
122
 
null:
123
 
  null_value= 1;
124
 
  return 0;
125
122
}
126
123
 
127
124
} /* namespace drizzled */