~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

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>
26
25
 
27
 
namespace drizzled {
 
26
namespace drizzled
 
27
{
28
28
 
29
29
String *Item_func_insert::val_str(String *str)
30
30
{
74
74
  return 0;
75
75
}
76
76
 
 
77
 
77
78
void Item_func_insert::fix_length_and_dec()
78
79
{
79
 
    // Handle character set for args[0] and args[3].
 
80
  uint64_t max_result_length;
 
81
 
 
82
  // Handle character set for args[0] and args[3].
80
83
  if (agg_arg_charsets(collation, &args[0], 2, MY_COLL_ALLOW_CONV, 3))
81
84
    return;
82
 
  uint64_t max_result_length= ((uint64_t) args[0]->max_length + (uint64_t) args[3]->max_length);
 
85
  max_result_length= ((uint64_t) args[0]->max_length+
 
86
                      (uint64_t) args[3]->max_length);
83
87
  if (max_result_length >= MAX_BLOB_WIDTH)
84
88
  {
85
89
    max_result_length= MAX_BLOB_WIDTH;