~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_show.cc

Merged vcol stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
712
712
    else
713
713
      type.set_charset(system_charset_info);
714
714
 
 
715
    if (field->vcol_info)
 
716
    {
 
717
      packet->append(STRING_WITH_LEN("VIRTUAL "));
 
718
    }
 
719
 
715
720
    field->sql_type(type);
716
721
    packet->append(type.ptr(), type.length(), system_charset_info);
717
722
 
 
723
    if (field->vcol_info)
 
724
    {
 
725
      packet->append(STRING_WITH_LEN(" AS ("));
 
726
      packet->append(field->vcol_info->expr_str.str,
 
727
                     field->vcol_info->expr_str.length,
 
728
                     system_charset_info);
 
729
      packet->append(STRING_WITH_LEN(")"));
 
730
      if (field->is_stored)
 
731
        packet->append(STRING_WITH_LEN(" STORED"));
 
732
    }
 
733
    
718
734
    if (field->has_charset())
719
735
    {
720
736
      if (field->charset() != share->table_charset)
761
777
          packet->append(STRING_WITH_LEN(" DYNAMIC */"));
762
778
      }
763
779
    }
764
 
    if (get_field_default_value(thd, table->timestamp_field,
 
780
    if (!field->vcol_info &&
 
781
        get_field_default_value(thd, table->timestamp_field,
765
782
                                field, &def_value, 1))
766
783
    {
767
784
      packet->append(STRING_WITH_LEN(" DEFAULT "));
3175
3192
        field->unireg_check != Field::TIMESTAMP_DN_FIELD)
3176
3193
      table->field[16]->store(STRING_WITH_LEN("on update CURRENT_TIMESTAMP"),
3177
3194
                              cs);
3178
 
 
 
3195
    if (field->vcol_info)
 
3196
          table->field[16]->store(STRING_WITH_LEN("VIRTUAL"), cs);
3179
3197
    table->field[18]->store(field->comment.str, field->comment.length, cs);
3180
3198
    {
3181
3199
      enum column_format_type column_format= (enum column_format_type)