~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

  • Committer: lbieber
  • Date: 2010-09-22 17:19:07 UTC
  • mfrom: (1782.4.1 refactor)
  • mto: This revision was merged to the branch mainline in revision 1786.
  • Revision ID: lbieber@orisndriz08-20100922171907-b0gsni6pkeg254v6
Merge Brian - Fix for 64bit issue around timestamp so we don't run into problems in 2027!

Show diffs side-by-side

added added

removed removed

Lines of Context:
889
889
  switch (type) {
890
890
  case DRIZZLE_TYPE_VARCHAR: return (length + (length < 256 ? 1: 2));
891
891
  case DRIZZLE_TYPE_DATE: return 3;
892
 
  case DRIZZLE_TYPE_TIMESTAMP:
893
892
  case DRIZZLE_TYPE_LONG: return 4;
894
893
  case DRIZZLE_TYPE_DOUBLE: return sizeof(double);
895
894
  case DRIZZLE_TYPE_DATETIME:
 
895
  case DRIZZLE_TYPE_TIMESTAMP:
896
896
  case DRIZZLE_TYPE_LONGLONG: return 8; /* Don't crash if no int64_t */
897
897
  case DRIZZLE_TYPE_NULL: return 0;
898
898
  case DRIZZLE_TYPE_BLOB: return 4 + portable_sizeof_char_ptr;