~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2011-01-04 04:05:27 UTC
  • mto: (2057.2.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2064.
  • Revision ID: brian@tangent.org-20110104040527-w2xglgjmlet2hy1p
First pass on micro timestamp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
827
827
    */
828
828
    if (default_value->type() == Item::FUNC_ITEM &&
829
829
        !(((Item_func*)default_value)->functype() == Item_func::NOW_FUNC &&
830
 
         type == DRIZZLE_TYPE_TIMESTAMP))
 
830
         (type == DRIZZLE_TYPE_TIMESTAMP or type == DRIZZLE_TYPE_MICROTIME)))
831
831
    {
832
832
      my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str);
833
833
      return true;
849
849
    }
850
850
  }
851
851
 
852
 
  if (on_update_value && type != DRIZZLE_TYPE_TIMESTAMP)
 
852
  if (on_update_value && (type != DRIZZLE_TYPE_TIMESTAMP and type != DRIZZLE_TYPE_MICROTIME))
853
853
  {
854
854
    my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name->str);
855
855
    return true;