~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/str/concat.cc

  • Committer: Monty Taylor
  • Date: 2008-11-16 23:47:43 UTC
  • mto: (584.1.10 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081116234743-c38gmv0pa2kdefaj
Broke out cached_item.

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"
21
 
 
22
 
#include <drizzled/function/str/concat.h>
 
20
#include <drizzled/server_includes.h>
 
21
#include CSTDINT_H
 
22
#include <drizzled/functions/str/concat.h>
23
23
#include <drizzled/error.h>
24
 
#include <drizzled/session.h>
25
 
 
26
 
#include <algorithm>
27
 
 
28
 
using namespace std;
29
 
 
30
 
namespace drizzled
31
 
{
32
24
 
33
25
String *Item_func_concat::val_str(String *str)
34
26
{
132
124
          }
133
125
          else
134
126
          {
135
 
            uint32_t new_len= max(tmp_value.alloced_length() * 2, concat_len);
 
127
            uint32_t new_len = cmax(tmp_value.alloced_length() * 2, concat_len);
136
128
 
137
129
            if (tmp_value.realloc(new_len))
138
130
              goto null;
302
294
        }
303
295
        else
304
296
        {
305
 
          uint32_t new_len= max(tmp_value.alloced_length() * 2, concat_len);
 
297
          uint32_t new_len = cmax(tmp_value.alloced_length() * 2, concat_len);
306
298
 
307
299
          if (tmp_value.realloc(new_len))
308
300
            goto null;
350
342
  max_length= (ulong) max_result_length;
351
343
}
352
344
 
353
 
} /* namespace drizzled */