~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/epoch.cc

  • Committer: Andrew Hutchings
  • Date: 2011-02-02 12:51:57 UTC
  • mto: (2157.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2158.
  • Revision ID: andrew@linuxjedi.co.uk-20110202125157-r6thh7ox4g9l90ec
Make transaction_message_threshold a read-only global variable instead of a per-session variable
Make replication_dictionary column lengths use transation_message_threshold

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <config.h>
22
 
 
 
21
#include "config.h"
23
22
#include <boost/lexical_cast.hpp>
24
23
#include <drizzled/field/epoch.h>
25
24
#include <drizzled/error.h>
26
25
#include <drizzled/tztime.h>
27
26
#include <drizzled/table.h>
28
27
#include <drizzled/session.h>
29
 
#include <drizzled/current_session.h>
30
28
 
31
29
#include <math.h>
32
30
 
33
31
#include <sstream>
34
32
 
35
 
#include <drizzled/temporal.h>
 
33
#include "drizzled/temporal.h"
36
34
 
37
35
namespace drizzled
38
36
{
236
234
  return 0;
237
235
}
238
236
 
239
 
double Epoch::val_real(void) const
 
237
double Epoch::val_real(void)
240
238
{
241
239
  return (double) Epoch::val_int();
242
240
}
243
241
 
244
 
int64_t Epoch::val_int(void) const
 
242
int64_t Epoch::val_int(void)
245
243
{
246
244
  uint64_t temp;
247
245
 
258
256
  return result;
259
257
}
260
258
 
261
 
String *Epoch::val_str(String *val_buffer, String *) const
 
259
String *Epoch::val_str(String *val_buffer, String *)
262
260
{
263
261
  uint64_t temp= 0;
264
262
  char *to;
282
280
  return val_buffer;
283
281
}
284
282
 
285
 
bool Epoch::get_date(type::Time &ltime, uint32_t) const
 
283
bool Epoch::get_date(type::Time &ltime, uint32_t)
286
284
{
287
285
  uint64_t temp;
288
286
  type::Time::epoch_t time_temp;
297
295
  return 0;
298
296
}
299
297
 
300
 
bool Epoch::get_time(type::Time &ltime) const
 
298
bool Epoch::get_time(type::Time &ltime)
301
299
{
302
300
  return Epoch::get_date(ltime, 0);
303
301
}
368
366
  }
369
367
}
370
368
 
371
 
long Epoch::get_timestamp(bool *null_value) const
 
369
long Epoch::get_timestamp(bool *null_value)
372
370
{
373
371
  if ((*null_value= is_null()))
374
372
    return 0;