~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/last_day.cc

Updated pandora-build files to version 0.133

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
78
78
          return false;
79
79
        }
80
80
 
81
 
        if (res != &tmp)
82
 
        {
83
 
          tmp.copy(*res);
84
 
        }
85
 
 
86
 
        if (! temporal.from_string(tmp.c_ptr(), tmp.length()))
 
81
        if (! temporal.from_string(res->c_ptr(), res->length()))
87
82
        {
88
83
          /* 
89
84
          * Could not interpret the function argument as a temporal value, 
90
85
          * so throw an error and return 0
91
86
          */
92
 
          my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
 
87
          my_error(ER_INVALID_DATETIME_VALUE, MYF(0), res->c_ptr());
93
88
          return false;
94
89
        }
95
90
      }
121
116
          return false;
122
117
        }
123
118
 
124
 
        if (res != &tmp)
125
 
        {
126
 
          tmp.copy(*res);
127
 
        }
128
 
 
129
 
        my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
 
119
        my_error(ER_INVALID_DATETIME_VALUE, MYF(0), res->c_ptr());
130
120
        return false;
131
121
      }
132
122
  }