~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Stewart Smith
  • Date: 2009-07-02 17:18:18 UTC
  • mfrom: (1085 staging)
  • mto: This revision was merged to the branch mainline in revision 1089.
  • Revision ID: stewart@flamingspork.com-20090702171818-qrp4d403iw8tazlg
mergeĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include CSTDINT_H
22
22
#include <drizzled/function/str/export_set.h>
23
23
 
 
24
#include <algorithm>
 
25
 
 
26
using namespace std;
 
27
 
24
28
String* Item_func_export_set::val_str(String* str)
25
29
{
26
30
  assert(fixed == 1);
91
95
 
92
96
void Item_func_export_set::fix_length_and_dec()
93
97
{
94
 
  uint32_t length=cmax(args[1]->max_length,args[2]->max_length);
95
 
  uint32_t sep_length=(arg_count > 3 ? args[3]->max_length : 1);
96
 
  max_length=length*64+sep_length*63;
 
98
  uint32_t length= max(args[1]->max_length,args[2]->max_length);
 
99
  uint32_t sep_length= (arg_count > 3 ? args[3]->max_length : 1);
 
100
  max_length= length*64+sep_length*63;
97
101
 
98
 
  if (agg_arg_charsets(collation, args+1, cmin((uint)4,arg_count)-1,
 
102
  if (agg_arg_charsets(collation, args+1, min(4U,arg_count)-1,
99
103
                       MY_COLL_ALLOW_CONV, 1))
100
104
    return;
101
105
}