~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_show.cc

  • Committer: Mark Atwood
  • Date: 2008-10-16 11:16:12 UTC
  • mfrom: (520.1.2 drizzle)
  • mto: (520.1.13 drizzle)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: mark@fallenpegasus.com-20081016111612-5nei7m5subslx912
mergeĀ fromĀ head

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 "));
3018
3035
  case DRIZZLE_TYPE_NEWDECIMAL:
3019
3036
    field_length= ((Field_new_decimal*) field)->precision;
3020
3037
    break;
3021
 
  case DRIZZLE_TYPE_TINY:
3022
3038
  case DRIZZLE_TYPE_LONG:
3023
3039
  case DRIZZLE_TYPE_LONGLONG:
3024
3040
    field_length= field->max_display_length() - 1;
3170
3186
        field->unireg_check != Field::TIMESTAMP_DN_FIELD)
3171
3187
      table->field[16]->store(STRING_WITH_LEN("on update CURRENT_TIMESTAMP"),
3172
3188
                              cs);
3173
 
 
 
3189
    if (field->vcol_info)
 
3190
          table->field[16]->store(STRING_WITH_LEN("VIRTUAL"), cs);
3174
3191
    table->field[18]->store(field->comment.str, field->comment.length, cs);
3175
3192
    {
3176
3193
      enum column_format_type column_format= (enum column_format_type)
3842
3859
  for (; fields_info->field_name; fields_info++)
3843
3860
  {
3844
3861
    switch (fields_info->field_type) {
3845
 
    case DRIZZLE_TYPE_TINY:
3846
3862
    case DRIZZLE_TYPE_LONG:
3847
3863
    case DRIZZLE_TYPE_LONGLONG:
3848
3864
      if (!(item= new Item_return_int(fields_info->field_name,