~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Monty Taylor
  • Date: 2009-05-09 22:26:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1009.
  • Revision ID: mordred@inaugust.com-20090509222607-wjjid9t0x0dbgagp
Removed is_stored - was only used for VCOL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1127
1127
            null_fields--;
1128
1128
          sql_field->flags=             dup_field->flags;
1129
1129
          sql_field->interval=          dup_field->interval;
1130
 
          sql_field->is_stored=      dup_field->is_stored;
1131
1130
          it2.remove();                 // Remove first (create) definition
1132
1131
          select_field_pos--;
1133
1132
          break;
1157
1156
    if (sql_field->sql_type == DRIZZLE_TYPE_VARCHAR)
1158
1157
      create_info->varchar= true;
1159
1158
    sql_field->offset= record_offset;
 
1159
    record_offset+= sql_field->pack_length;
 
1160
 
1160
1161
    if (MTYP_TYPENR(sql_field->unireg_check) == Field::NEXT_NUMBER)
1161
1162
      auto_increment++;
1162
 
    /*
1163
 
          For now skip fields that are not physically stored in the database
1164
 
          (virtual fields) and update their offset later
1165
 
          (see the next loop).
1166
 
        */
1167
 
    if (sql_field->is_stored)
1168
 
      record_offset+= sql_field->pack_length;
1169
 
  }
1170
 
  /* Update virtual fields' offset */
1171
 
  it.rewind();
1172
 
  while ((sql_field=it++))
1173
 
  {
1174
 
    if (not sql_field->is_stored)
1175
 
    {
1176
 
      sql_field->offset= record_offset;
1177
 
      record_offset+= sql_field->pack_length;
1178
 
    }
1179
1163
  }
1180
1164
  if (timestamps_with_niladic > 1)
1181
1165
  {
1413
1397
            return(true);
1414
1398
          }
1415
1399
        }
1416
 
        if (not sql_field->is_stored)
1417
 
        {
1418
 
          /* Key fields must always be physically stored. */
1419
 
          my_error(ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN, MYF(0));
1420
 
          return(true);
1421
 
        }
1422
1400
        if (!(sql_field->flags & NOT_NULL_FLAG))
1423
1401
        {
1424
1402
          if (key->type == Key::PRIMARY)
3433
3411
    if (def)
3434
3412
    {                                           // Field is changed
3435
3413
      def->field=field;
3436
 
      if (field->is_stored != def->is_stored)
3437
 
      {
3438
 
        my_error(ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN,
3439
 
                 MYF(0),
3440
 
                 "Changing the STORED status");
3441
 
        goto err;
3442
 
      }
3443
3414
      if (!def->after)
3444
3415
      {
3445
3416
        new_create_list.push_back(def);