~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/int64_t.h

  • Committer: Brian Aker
  • Date: 2008-11-25 02:31:14 UTC
  • Revision ID: brian@tangent.org-20081125023114-2f7sx8fye2jytgyw
Removed dead event structure pieces from replication.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
  bool can_be_compared_as_int64_t() const { return true; }
64
64
  uint32_t max_display_length() { return 20; }
65
65
  virtual unsigned char *pack(unsigned char* to, const unsigned char *from,
66
 
                      uint32_t max_length __attribute__((unused)),
67
 
                      bool low_byte_first __attribute__((unused)))
68
 
  {
69
 
    int64_t val;
70
 
#ifdef WORDS_BIGENDIAN
71
 
    if (table->s->db_low_byte_first)
72
 
      val = sint8korr(from);
73
 
    else
74
 
#endif
75
 
      int64_tget(val, from);
76
 
 
77
 
#ifdef WORDS_BIGENDIAN
78
 
    if (low_byte_first)
79
 
      int8store(to, val);
80
 
    else
81
 
#endif
82
 
      int64_tstore(to, val);
83
 
    return to + sizeof(val);
84
 
  }
 
66
                              uint32_t max_length,
 
67
                              bool low_byte_first);
85
68
 
86
69
  virtual const unsigned char *unpack(unsigned char* to, const unsigned char *from,
87
 
                              uint32_t param_data __attribute__((unused)),
88
 
                              bool low_byte_first __attribute__((unused)))
89
 
  {
90
 
    int64_t val;
91
 
#ifdef WORDS_BIGENDIAN
92
 
    if (low_byte_first)
93
 
      val = sint8korr(from);
94
 
    else
95
 
#endif
96
 
      int64_tget(val, from);
 
70
                              uint32_t param_data,
 
71
                              bool low_byte_first);
97
72
 
98
 
#ifdef WORDS_BIGENDIAN
99
 
    if (table->s->db_low_byte_first)
100
 
      int8store(to, val);
101
 
    else
102
 
#endif
103
 
      int64_tstore(to, val);
104
 
    return from + sizeof(val);
105
 
  }
106
73
};
107
74
 
108
 
#endif
 
75
#endif