~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-06-03 22:55:32 UTC
  • mto: (1578.6.9 explain-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1591.
  • Revision ID: brian@gir-2.local-20100603225532-5yuc8um41i4owavf
Additional pass through to remove raw field access.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
          return false;
83
83
        }
84
84
 
85
 
        if (res != &tmp)
86
 
        {
87
 
          tmp.copy(*res);
88
 
        }
89
 
 
90
 
        if (! temporal.from_string(tmp.c_ptr(), tmp.length()))
 
85
        if (! temporal.from_string(res->c_ptr(), res->length()))
91
86
        {
92
87
          /* 
93
88
          * Could not interpret the function argument as a temporal value, 
94
89
          * so throw an error and return 0
95
90
          */
96
 
          my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
 
91
          my_error(ER_INVALID_DATETIME_VALUE, MYF(0), res->c_ptr());
97
92
          return 0;
98
93
        }
99
94
      }
125
120
          return false;
126
121
        }
127
122
 
128
 
        if (res != &tmp)
129
 
        {
130
 
          tmp.copy(*res);
131
 
        }
132
 
 
133
 
        my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
 
123
        my_error(ER_INVALID_DATETIME_VALUE, MYF(0), res->c_ptr());
134
124
        return 0;
135
125
      }
136
126
  }
184
174
          return 0;
185
175
        }
186
176
 
187
 
        if (res != &tmp)
188
 
        {
189
 
          tmp.copy(*res);
190
 
        }
191
 
 
192
 
        if (! temporal.from_string(tmp.c_ptr(), tmp.length()))
 
177
        if (! temporal.from_string(res->c_ptr(), res->length()))
193
178
        {
194
179
          /* 
195
180
          * Could not interpret the function argument as a temporal value, 
196
181
          * so throw an error and return 0
197
182
          */
198
 
          my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
 
183
          my_error(ER_INVALID_DATETIME_VALUE, MYF(0), res->c_ptr());
199
184
          return 0;
200
185
        }
201
186
      }
227
212
          return 0;
228
213
        }
229
214
 
230
 
        if (res != &tmp)
231
 
        {
232
 
          tmp.copy(*res);
233
 
        }
234
 
 
235
 
        my_error(ER_INVALID_DATETIME_VALUE, MYF(0), tmp.c_ptr());
 
215
        my_error(ER_INVALID_DATETIME_VALUE, MYF(0), res->c_ptr());
236
216
        return 0;
237
217
      }
238
218
  }