~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/sql_table.cc

  • Committer: Brian Aker
  • Date: 2008-07-05 19:24:24 UTC
  • mfrom: (53.2.8 codestyle)
  • Revision ID: brian@tangent.org-20080705192424-3uslywtteymm7xqy
First pass of removing BIT_TYPE

Show diffs side-by-side

added added

removed removed

Lines of Context:
1809
1809
  case MYSQL_TYPE_NULL:
1810
1810
    sql_field->pack_flag=f_settype((uint) sql_field->sql_type);
1811
1811
    break;
1812
 
  case MYSQL_TYPE_BIT:
1813
 
    /* 
1814
 
      We have sql_field->pack_flag already set here, see
1815
 
      mysql_prepare_create_table().
1816
 
    */
1817
 
    break;
1818
1812
  case MYSQL_TYPE_NEWDECIMAL:
1819
1813
    sql_field->pack_flag=(FIELDFLAG_NUMBER |
1820
1814
                          (sql_field->flags & UNSIGNED_FLAG ? 0 :
2103
2097
      set_if_smaller(sql_field->length, MAX_FIELD_WIDTH-1);
2104
2098
    }
2105
2099
 
2106
 
    if (sql_field->sql_type == MYSQL_TYPE_BIT)
2107
 
    { 
2108
 
      sql_field->pack_flag= FIELDFLAG_NUMBER;
2109
 
      if (file->ha_table_flags() & HA_CAN_BIT_FIELD)
2110
 
        total_uneven_bit_length+= sql_field->length & 7;
2111
 
      else
2112
 
        sql_field->pack_flag|= FIELDFLAG_TREAT_BIT_AS_CHAR;
2113
 
    }
2114
 
 
2115
2100
    sql_field->create_length_to_internal_length();
2116
2101
    if (prepare_blob_field(thd, sql_field))
2117
2102
      DBUG_RETURN(true);
2750
2735
    set_if_smaller(sql_field->length, MAX_FIELD_WIDTH-1);
2751
2736
  }
2752
2737
 
2753
 
  if (sql_field->sql_type == MYSQL_TYPE_BIT)
2754
 
  {
2755
 
    sql_field->pack_flag= FIELDFLAG_NUMBER |
2756
 
                          FIELDFLAG_TREAT_BIT_AS_CHAR;
2757
 
  }
2758
2738
  sql_field->create_length_to_internal_length();
2759
2739
  DBUG_ASSERT(sql_field->def == 0);
2760
2740
  /* Can't go wrong as sql_field->def is not defined */