---
 drizzled/table.cc             |   15 ++++++++++++++-
 drizzled/table_proto_write.cc |    1 +
 2 files changed, 15 insertions(+), 1 deletion(-)

Index: pandora-build/drizzled/table.cc
===================================================================
--- pandora-build.orig/drizzled/table.cc        2009-11-04 20:12:43.691659909 
+1100
+++ pandora-build/drizzled/table.cc     2009-11-05 12:03:56.011746961 +1100
@@ -38,6 +38,7 @@
 #include <drizzled/item/decimal.h>
 #include <drizzled/item/float.h>
 #include <drizzled/item/null.h>
+#include <drizzled/temporal.h>
 
 #include "drizzled/table_proto.h"
 
@@ -850,10 +851,22 @@ int drizzled::parse_table_proto(Session 
     temp_table.s->db_low_byte_first= 1; //Cursor->low_byte_first();
     temp_table.s->blob_ptr_size= portable_sizeof_char_ptr;
 
+    uint32_t field_length;
+
+    switch (field_type)
+    {
+    case DRIZZLE_TYPE_TIMESTAMP:
+      field_length= drizzled::DateTime::MAX_STRING_LENGTH;
+      break;
+    default:
+      field_length= pfield.options().length();
+      break;
+    }
+
     Field* f= make_field(share,
                          &share->mem_root,
                          record + field_offsets[fieldnr] + data_offset,
-                         pfield.options().length(),
+                         field_length,
                          pfield.constraints().is_nullable(),
                          null_pos,
                          null_bit_pos,
Index: pandora-build/drizzled/table_proto_write.cc
===================================================================
--- pandora-build.orig/drizzled/table_proto_write.cc    2009-11-04 
20:12:47.371662069 +1100
+++ pandora-build/drizzled/table_proto_write.cc 2009-11-05 13:20:01.871656457 
+1100
@@ -311,6 +311,7 @@ int fill_table_proto(message::Table *tab
       }
     }
 
+    if (attribute->type() != message::Table::Field::TIMESTAMP)
     {
       message::Table::Field::FieldOptions *field_options;
       field_options= attribute->mutable_options();

-- 
Stewart Smith

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to