~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2008-12-19 07:02:38 UTC
  • Revision ID: brian@tangent.org-20081219070238-569uxp3vsr6r37v1
Updated/fix to foreign key test.

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/insert.h>
23
23
#include <drizzled/error.h>
24
24
#include <drizzled/session.h>
25
25
 
26
 
namespace drizzled
27
 
{
28
 
 
29
26
String *Item_func_insert::val_str(String *str)
30
27
{
31
28
  assert(fixed == 1);
40
37
 
41
38
  if (args[0]->null_value || args[1]->null_value || args[2]->null_value ||
42
39
      args[3]->null_value)
43
 
    goto null;
 
40
    goto null; /* purecov: inspected */
44
41
 
45
42
  if ((start < 0) || (start > res->length()))
46
43
    return res;                                 // Wrong param; skip insert
53
50
 
54
51
  /* Re-testing with corrected params */
55
52
  if (start > res->length())
56
 
    return res;
 
53
    return res; /* purecov: inspected */        // Wrong param; skip insert
57
54
  if (length > res->length() - start)
58
55
    length= res->length() - start;
59
56
 
91
88
  }
92
89
  max_length= (ulong) max_result_length;
93
90
}
94
 
 
95
 
} /* namespace drizzled */