~mordred/drizzle/codestyle

« back to all changes in this revision

Viewing changes to drizzled/sql_show.cc

  • Committer: Monty Taylor
  • Date: 2008-10-13 10:14:09 UTC
  • mfrom: (383.7.6 drizzle-virtual-columns)
  • mto: This revision was merged to the branch mainline in revision 511.
  • Revision ID: monty@inaugust.com-20081013101409-aszm0nonww0f07zd
Merged in Virtual Column work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
715
715
    else
716
716
      type.set_charset(system_charset_info);
717
717
 
 
718
    if (field->vcol_info)
 
719
    {
 
720
      packet->append(STRING_WITH_LEN("VIRTUAL "));
 
721
    }
 
722
 
718
723
    field->sql_type(type);
719
724
    packet->append(type.ptr(), type.length(), system_charset_info);
720
725
 
 
726
    if (field->vcol_info)
 
727
    {
 
728
      packet->append(STRING_WITH_LEN(" AS ("));
 
729
      packet->append(field->vcol_info->expr_str.str,
 
730
                     field->vcol_info->expr_str.length,
 
731
                     system_charset_info);
 
732
      packet->append(STRING_WITH_LEN(")"));
 
733
      if (field->is_stored)
 
734
        packet->append(STRING_WITH_LEN(" STORED"));
 
735
    }
 
736
    
721
737
    if (field->has_charset())
722
738
    {
723
739
      if (field->charset() != share->table_charset)
764
780
          packet->append(STRING_WITH_LEN(" DYNAMIC */"));
765
781
      }
766
782
    }
767
 
    if (get_field_default_value(thd, table->timestamp_field,
 
783
    if (!field->vcol_info &&
 
784
        get_field_default_value(thd, table->timestamp_field,
768
785
                                field, &def_value, 1))
769
786
    {
770
787
      packet->append(STRING_WITH_LEN(" DEFAULT "));
3170
3187
        field->unireg_check != Field::TIMESTAMP_DN_FIELD)
3171
3188
      table->field[16]->store(STRING_WITH_LEN("on update CURRENT_TIMESTAMP"),
3172
3189
                              cs);
3173
 
 
 
3190
    if (field->vcol_info)
 
3191
          table->field[16]->store(STRING_WITH_LEN("VIRTUAL"), cs);
3174
3192
    table->field[18]->store(field->comment.str, field->comment.length, cs);
3175
3193
    {
3176
3194
      enum column_format_type column_format= (enum column_format_type)