~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2009-07-11 08:51:36 UTC
  • mfrom: (1089.3.11 merge)
  • Revision ID: brian@gaz-20090711085136-qj01nwm3qynghwtc
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
2619
2619
  local_create_info.db_type= schema_table->table->s->db_type();
2620
2620
  local_create_info.row_type= schema_table->table->s->row_type;
2621
2621
  local_create_info.default_table_charset=default_charset_info;
2622
 
  alter_info.flags= (ALTER_CHANGE_COLUMN | ALTER_RECREATE);
 
2622
  alter_info.flags.set(ALTER_CHANGE_COLUMN);
 
2623
  alter_info.flags.set(ALTER_RECREATE);
2623
2624
  schema_table->table->use_all_columns();
2624
2625
  if (mysql_prepare_alter_table(session, schema_table->table,
2625
2626
                                &local_create_info, &alter_info))
3533
3534
  char path[FN_REFLEN];
3534
3535
  ha_rows copied= 0,deleted= 0;
3535
3536
  StorageEngine *old_db_type, *new_db_type, *save_old_db_type;
 
3537
  bitset<32> tmp;
3536
3538
 
3537
3539
  new_name_buff[0]= '\0';
3538
3540
 
3671
3673
  }
3672
3674
 
3673
3675
  session->set_proc_info("setup");
3674
 
  if (!(alter_info->flags & ~(ALTER_RENAME | ALTER_KEYS_ONOFF)) &&
3675
 
      !table->s->tmp_table) // no need to touch frm
 
3676
  /*
 
3677
   * test if no other bits except ALTER_RENAME and ALTER_KEYS_ONOFF are set
 
3678
   */
 
3679
  tmp.set();
 
3680
  tmp.reset(ALTER_RENAME);
 
3681
  tmp.reset(ALTER_KEYS_ONOFF);
 
3682
  tmp&= alter_info->flags;
 
3683
  if (! (tmp.any()) &&
 
3684
      ! table->s->tmp_table) // no need to touch frm
3676
3685
  {
3677
3686
    switch (alter_info->keys_onoff) {
3678
3687
    case LEAVE_AS_IS:
4314
4323
  create_info.row_type=ROW_TYPE_NOT_USED;
4315
4324
  create_info.default_table_charset=default_charset_info;
4316
4325
  /* Force alter table to recreate table */
4317
 
  alter_info.flags= (ALTER_CHANGE_COLUMN | ALTER_RECREATE);
 
4326
  alter_info.flags.set(ALTER_CHANGE_COLUMN);
 
4327
  alter_info.flags.set(ALTER_RECREATE);
4318
4328
  return(mysql_alter_table(session, NULL, NULL, &create_info,
4319
4329
                                table_list, &alter_info, 0,
4320
4330
                                (order_st *) 0, 0));