~drizzle-developers/ubuntu/natty/drizzle/natty

« back to all changes in this revision

Viewing changes to drizzled/create_field.cc

  • Committer: Monty Taylor
  • Date: 2010-03-03 19:27:30 UTC
  • mto: (1308.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1278.
  • Revision ID: mordred@inaugust.com-20100303192730-o2o3nmp0lzhuatbe
Tags: upstream-2010.03.1317
ImportĀ upstreamĀ versionĀ 2010.03.1317

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
#include <algorithm>
49
49
 
50
 
using namespace drizzled;
51
50
using namespace std;
52
51
 
 
52
namespace drizzled
 
53
{
53
54
 
54
55
/** Create a field suitable for create of table. */
55
56
CreateField::CreateField(Field *old_field, Field *orig_field)
297
298
    case DRIZZLE_TYPE_TIMESTAMP:
298
299
      if (!fld_length)
299
300
      {
300
 
        length= drizzled::DateTime::MAX_STRING_LENGTH;
 
301
        length= DateTime::MAX_STRING_LENGTH;
301
302
      }
302
303
 
303
304
      /* This assert() should be correct due to absence of length
304
305
         specifiers for timestamp. Previous manipulation also wasn't
305
306
         ever called (from examining lcov)
306
307
      */
307
 
      assert(length == (uint32_t)drizzled::DateTime::MAX_STRING_LENGTH);
 
308
      assert(length == (uint32_t)DateTime::MAX_STRING_LENGTH);
308
309
 
309
310
      flags|= UNSIGNED_FLAG;
310
311
      if (fld_default_value)
346
347
      }
347
348
      break;
348
349
    case DRIZZLE_TYPE_DATE:
349
 
      length= drizzled::Date::MAX_STRING_LENGTH;
 
350
      length= Date::MAX_STRING_LENGTH;
350
351
      break;
351
352
    case DRIZZLE_TYPE_DATETIME:
352
 
      length= drizzled::DateTime::MAX_STRING_LENGTH;
 
353
      length= DateTime::MAX_STRING_LENGTH;
353
354
      break;
354
355
    case DRIZZLE_TYPE_ENUM:
355
356
      {
387
388
 
388
389
  return false; /* success */
389
390
}
 
391
 
 
392
} /* namespace drizzled */