~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/insert.cc

  • Committer: Olaf van der Spek
  • Date: 2011-04-05 12:26:58 UTC
  • mto: (2278.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2272.
  • Revision ID: olafvdspek@gmail.com-20110405122658-xxrvmobwwwwf3oct
Refactor Open_tables_state

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <drizzled/function/str/insert.h>
23
23
#include <drizzled/error.h>
24
24
#include <drizzled/session.h>
 
25
#include <drizzled/system_variables.h>
25
26
 
26
 
namespace drizzled
27
 
{
 
27
namespace drizzled {
28
28
 
29
29
String *Item_func_insert::val_str(String *str)
30
30
{
74
74
  return 0;
75
75
}
76
76
 
77
 
 
78
77
void Item_func_insert::fix_length_and_dec()
79
78
{
80
 
  uint64_t max_result_length;
81
 
 
82
 
  // Handle character set for args[0] and args[3].
 
79
    // Handle character set for args[0] and args[3].
83
80
  if (agg_arg_charsets(collation, &args[0], 2, MY_COLL_ALLOW_CONV, 3))
84
81
    return;
85
 
  max_result_length= ((uint64_t) args[0]->max_length+
86
 
                      (uint64_t) args[3]->max_length);
 
82
  uint64_t max_result_length= ((uint64_t) args[0]->max_length + (uint64_t) args[3]->max_length);
87
83
  if (max_result_length >= MAX_BLOB_WIDTH)
88
84
  {
89
85
    max_result_length= MAX_BLOB_WIDTH;