~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2011-01-08 10:35:13 UTC
  • mfrom: (2057.2.9 timestamp)
  • Revision ID: brian@tangent.org-20110108103513-3wuo8tsyajjcxjrg
Merge in fractional seconds to timestamp.

Show diffs side-by-side

added added

removed removed

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