~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

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"
 
20
#include <config.h>
21
21
 
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;