~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-04-28 00:17:10 UTC
  • mto: This revision was merged to the branch mainline in revision 999.
  • Revision ID: brian@gaz-20090428001710-gb4v06c9q6j096pk
First pass on removing virt columns

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <drizzled/item/return_int.h>
34
34
#include <drizzled/item/empty_string.h>
35
35
#include <drizzled/item/return_date_time.h>
36
 
#include <drizzled/virtual_column_info.h>
37
36
#include <drizzled/sql_base.h>
38
37
#include <drizzled/db.h>
39
38
#include <drizzled/field/timestamp.h>
663
662
    else
664
663
      type.set_charset(system_charset_info);
665
664
 
666
 
    if (field->vcol_info)
667
 
    {
668
 
      packet->append(STRING_WITH_LEN("VIRTUAL "));
669
 
    }
670
 
 
671
665
    field->sql_type(type);
672
666
    packet->append(type.ptr(), type.length(), system_charset_info);
673
667
 
674
 
    if (field->vcol_info)
675
 
    {
676
 
      packet->append(STRING_WITH_LEN(" AS ("));
677
 
      packet->append(field->vcol_info->expr_str.str,
678
 
                     field->vcol_info->expr_str.length,
679
 
                     system_charset_info);
680
 
      packet->append(STRING_WITH_LEN(")"));
681
 
      if (field->is_stored)
682
 
        packet->append(STRING_WITH_LEN(" STORED"));
683
 
    }
684
 
 
685
668
    if (field->has_charset())
686
669
    {
687
670
      if (field->charset() != share->table_charset)
729
712
          packet->append(STRING_WITH_LEN(" DYNAMIC */"));
730
713
      }
731
714
    }
732
 
    if (!field->vcol_info &&
733
 
        get_field_default_value(session, table->timestamp_field,
 
715
    if (get_field_default_value(session, table->timestamp_field,
734
716
                                field, &def_value, 1))
735
717
    {
736
718
      packet->append(STRING_WITH_LEN(" DEFAULT "));
3092
3074
        field->unireg_check != Field::TIMESTAMP_DN_FIELD)
3093
3075
      table->field[16]->store(STRING_WITH_LEN("on update CURRENT_TIMESTAMP"),
3094
3076
                              cs);
3095
 
    if (field->vcol_info)
3096
 
          table->field[16]->store(STRING_WITH_LEN("VIRTUAL"), cs);
3097
3077
    table->field[18]->store(field->comment.str, field->comment.length, cs);
3098
3078
    {
3099
3079
      enum column_format_type column_format= (enum column_format_type)