~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2009-01-24 09:43:35 UTC
  • Revision ID: brian@gir-3.local-20090124094335-6qdtvc35gl5fvivz
Adding in an example singe thread scheduler

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