~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.cc

  • Committer: Brian Aker
  • Date: 2011-01-10 02:13:14 UTC
  • mto: This revision was merged to the branch mainline in revision 2069.
  • Revision ID: brian@tangent.org-20110110021314-dye0guuovwz4oi3j
Formattting, etc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/* This file is originally from the mysql distribution. Coded by monty */
17
17
 
18
 
#include <config.h>
 
18
#include "config.h"
19
19
 
20
 
#include <drizzled/internal/my_sys.h>
21
 
#include <drizzled/internal/m_string.h>
22
 
#include <drizzled/charset.h>
23
 
#include <drizzled/global_charset_info.h>
 
20
#include "drizzled/internal/my_sys.h"
 
21
#include "drizzled/internal/m_string.h"
 
22
#include "drizzled/charset.h"
 
23
#include "drizzled/global_charset_info.h"
24
24
 
25
25
#include <algorithm>
26
26
 
27
 
#include <drizzled/sql_string.h>
 
27
#include "drizzled/sql_string.h"
28
28
 
29
29
using namespace std;
30
30
 
219
219
  return false;
220
220
}
221
221
 
222
 
bool String::copy(const std::string& arg, const CHARSET_INFO * const cs)        // Allocate new string
223
 
{
224
 
  if (alloc(arg.size()))
225
 
    return true;
226
 
 
227
 
  if ((str_length= arg.size()))
228
 
    memcpy(Ptr, arg.c_str(), arg.size());
229
 
 
230
 
  Ptr[arg.size()]= 0;
231
 
  str_charset= cs;
232
 
 
233
 
  return false;
234
 
}
235
 
 
236
222
bool String::copy(const char *str,size_t arg_length, const CHARSET_INFO * const cs)
237
223
{
238
224
  if (alloc(arg_length))