~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: David Axmark
  • Date: 2008-11-05 05:50:56 UTC
  • mto: (584.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 586.
  • Revision ID: davida@davids-laptop-20081105055056-bt8ajhvihu0j28kp
Changed NEWDATE to DATE. One failing test but I think its somewhere else in the code 
(func_math).

Show diffs side-by-side

added added

removed removed

Lines of Context:
805
805
                                     sql_field->charset, &dup_val_count))
806
806
      return(1);
807
807
    break;
808
 
  case DRIZZLE_TYPE_NEWDATE:  // Rest of string types
 
808
  case DRIZZLE_TYPE_DATE:  // Rest of string types
809
809
  case DRIZZLE_TYPE_TIME:
810
810
  case DRIZZLE_TYPE_DATETIME:
811
811
  case DRIZZLE_TYPE_NULL:
4111
4111
      If the '0000-00-00' value isn't allowed then raise the error_if_not_empty
4112
4112
      flag to allow ALTER Table only if the table to be altered is empty.
4113
4113
      */
4114
 
    if ((def->sql_type == DRIZZLE_TYPE_NEWDATE ||
 
4114
    if ((def->sql_type == DRIZZLE_TYPE_DATE ||
4115
4115
         def->sql_type == DRIZZLE_TYPE_DATETIME) &&
4116
4116
         !alter_info->datetime_field &&
4117
4117
         !(~def->flags & (NO_DEFAULT_VALUE_FLAG | NOT_NULL_FLAG)) &&
5059
5059
    enum enum_drizzle_timestamp_type t_type= DRIZZLE_TIMESTAMP_DATE;
5060
5060
    switch (alter_info->datetime_field->sql_type)
5061
5061
    {
5062
 
      case DRIZZLE_TYPE_NEWDATE:
 
5062
      case DRIZZLE_TYPE_DATE:
5063
5063
        f_val= "0000-00-00";
5064
5064
        t_type= DRIZZLE_TIMESTAMP_DATE;
5065
5065
        break;