~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2008-10-08 02:28:58 UTC
  • mfrom: (489.1.13 codestyle)
  • Revision ID: brian@tangent.org-20081008022858-ea8esagkxmn0dupc
Merge of Monty's work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1844
1844
    }
1845
1845
  }
1846
1846
 
1847
 
  thd_proc_info(thd, "creating table");
 
1847
  thd->set_proc_info("creating table");
1848
1848
  create_info->table_existed= 0;                // Mark that table is created
1849
1849
 
1850
1850
#ifdef HAVE_READLINK
1906
1906
  pthread_mutex_unlock(&LOCK_open);
1907
1907
 
1908
1908
err:
1909
 
  thd_proc_info(thd, "After create");
 
1909
  thd->set_proc_info("After create");
1910
1910
  delete file;
1911
1911
  return(error);
1912
1912
 
3141
3141
    ALTER Table
3142
3142
  */
3143
3143
 
3144
 
  thd_proc_info(thd, "discard_or_import_tablespace");
 
3144
  thd->set_proc_info("discard_or_import_tablespace");
3145
3145
 
3146
3146
  discard= test(tablespace_op == DISCARD_TABLESPACE);
3147
3147
 
3158
3158
 
3159
3159
  error= table->file->ha_discard_or_import_tablespace(discard);
3160
3160
 
3161
 
  thd_proc_info(thd, "end");
 
3161
  thd->set_proc_info("end");
3162
3162
 
3163
3163
  if (error)
3164
3164
    goto err;
4383
4383
    to simplify further comparisons: we want to see if it's a RENAME
4384
4384
    later just by comparing the pointers, avoiding the need for strcmp.
4385
4385
  */
4386
 
  thd_proc_info(thd, "init");
 
4386
  thd->set_proc_info("init");
4387
4387
  table_name=table_list->table_name;
4388
4388
  alias= (lower_case_table_names == 2) ? table_list->alias : table_name;
4389
4389
  db=table_list->db;
4508
4508
    goto err;
4509
4509
  }
4510
4510
 
4511
 
  thd_proc_info(thd, "setup");
 
4511
  thd->set_proc_info("setup");
4512
4512
  if (!(alter_info->flags & ~(ALTER_RENAME | ALTER_KEYS_ONOFF)) &&
4513
4513
      !table->s->tmp_table) // no need to touch frm
4514
4514
  {
4563
4563
 
4564
4564
    if (!error && (new_name != table_name || new_db != db))
4565
4565
    {
4566
 
      thd_proc_info(thd, "rename");
 
4566
      thd->set_proc_info("rename");
4567
4567
      /*
4568
4568
        Then do a 'simple' rename of the table. First we need to close all
4569
4569
        instances of 'source' table.
4812
4812
  /* Copy the data if necessary. */
4813
4813
  thd->count_cuted_fields= CHECK_FIELD_WARN;    // calc cuted fields
4814
4814
  thd->cuted_fields=0L;
4815
 
  thd_proc_info(thd, "copy to tmp table");
 
4815
  thd->set_proc_info("copy to tmp table");
4816
4816
  copied=deleted=0;
4817
4817
  /*
4818
4818
    We do not copy data for MERGE tables. Only the children have data.
4897
4897
       call to remove name-locks from table cache and list of open table.
4898
4898
  */
4899
4899
 
4900
 
  thd_proc_info(thd, "rename result table");
 
4900
  thd->set_proc_info("rename result table");
4901
4901
  snprintf(old_name, sizeof(old_name), "%s2-%lx-%lx", tmp_file_prefix,
4902
4902
           current_pid, thd->thread_id);
4903
4903
  if (lower_case_table_names)
4958
4958
  }
4959
4959
  pthread_mutex_unlock(&LOCK_open);
4960
4960
 
4961
 
  thd_proc_info(thd, "end");
 
4961
  thd->set_proc_info("end");
4962
4962
 
4963
4963
  assert(!(mysql_bin_log.is_open() &&
4964
4964
                thd->current_stmt_binlog_row_based &&