~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/microtime.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>
 
21
#include "config.h"
22
22
#include <boost/lexical_cast.hpp>
23
23
#include <drizzled/field/microtime.h>
24
24
#include <drizzled/error.h>
25
25
#include <drizzled/tztime.h>
26
26
#include <drizzled/table.h>
27
27
#include <drizzled/session.h>
28
 
#include <drizzled/current_session.h>
29
28
 
30
29
#include <math.h>
31
30
 
33
32
 
34
33
#include <boost/date_time/posix_time/posix_time.hpp>
35
34
 
36
 
#include <drizzled/temporal.h>
 
35
#include "drizzled/temporal.h"
37
36
 
38
37
namespace drizzled
39
38
{
158
157
  return 0;
159
158
}
160
159
 
161
 
double Microtime::val_real(void) const
 
160
double Microtime::val_real(void)
162
161
{
163
162
  uint64_t temp;
164
163
  type::Time::usec_t micro_temp;
180
179
  return result;
181
180
}
182
181
 
183
 
type::Decimal *Microtime::val_decimal(type::Decimal *decimal_value) const
 
182
type::Decimal *Microtime::val_decimal(type::Decimal *decimal_value)
184
183
{
185
184
  type::Time ltime;
186
185
 
189
188
  return date2_class_decimal(&ltime, decimal_value);
190
189
}
191
190
 
192
 
int64_t Microtime::val_int(void) const
 
191
int64_t Microtime::val_int(void)
193
192
{
194
193
  uint64_t temp;
195
194
 
207
206
  return result;
208
207
}
209
208
 
210
 
String *Microtime::val_str(String *val_buffer, String *) const
 
209
String *Microtime::val_str(String *val_buffer, String *)
211
210
{
212
211
  uint64_t temp= 0;
213
212
  type::Time::usec_t micro_temp= 0;
224
223
  return val_buffer;
225
224
}
226
225
 
227
 
bool Microtime::get_date(type::Time &ltime, uint32_t) const
 
226
bool Microtime::get_date(type::Time &ltime, uint32_t)
228
227
{
229
228
  uint64_t temp;
230
229
  uint32_t micro_temp= 0;
239
238
  return false;
240
239
}
241
240
 
242
 
bool Microtime::get_time(type::Time &ltime) const
 
241
bool Microtime::get_time(type::Time &ltime)
243
242
{
244
243
  return Microtime::get_date(ltime, 0);
245
244
}
294
293
  pack_num(fractional_seconds, ptr +8);
295
294
}
296
295
 
297
 
long Microtime::get_timestamp(bool *null_value) const
 
296
long Microtime::get_timestamp(bool *null_value)
298
297
{
299
298
  if ((*null_value= is_null()))
300
299
    return 0;