~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Monty Taylor
  • Date: 2008-10-13 09:29:43 UTC
  • mfrom: (509 drizzle)
  • mto: (509.1.4 codestyle)
  • mto: This revision was merged to the branch mainline in revision 511.
  • Revision ID: monty@inaugust.com-20081013092943-rwvx4a6d85b5l2dh
MergedĀ inĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
  disk_buff= NULL;
309
309
 
310
310
  strxmov(path, share->normalized_path.str, reg_ext, NULL);
311
 
  if ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0)
 
311
  if ((file= my_open(path, O_RDONLY, MYF(0))) < 0)
312
312
  {
313
313
    /*
314
314
      We don't try to open 5.0 unencoded name, if
345
345
      so no need to check the old file name.
346
346
    */
347
347
    if (length == share->normalized_path.length ||
348
 
        ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0))
 
348
        ((file= my_open(path, O_RDONLY, MYF(0))) < 0))
349
349
      goto err_not_open;
350
350
 
351
351
    /* Unencoded 5.0 table name found */
2347
2347
                   create_info->default_table_charset->number : 0);
2348
2348
    fileinfo[39]= (unsigned char) create_info->page_checksum;
2349
2349
    fileinfo[40]= (unsigned char) create_info->row_type;
2350
 
    /* Next few bytes where for RAID support */
 
2350
    /* Next few bytes were for RAID support */
2351
2351
    fileinfo[41]= 0;
2352
2352
    fileinfo[42]= 0;
2353
2353
    int4store(fileinfo+43,create_info->block_size);
3556
3556
 
3557
3557
  *dbt= DB_TYPE_UNKNOWN;
3558
3558
 
3559
 
  if ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0)
 
3559
  if ((file= my_open(path, O_RDONLY, MYF(0))) < 0)
3560
3560
    return false;
3561
3561
  error= my_read(file, (unsigned char*) header, sizeof(header), MYF(MY_NABP));
3562
3562
  my_close(file, MYF(MY_WME));
4929
4929
  const char *save_proc_info;
4930
4930
 
4931
4931
  save_proc_info=thd->get_proc_info();
4932
 
  thd_proc_info(thd, "removing tmp table");
 
4932
  thd->set_proc_info("removing tmp table");
4933
4933
 
4934
4934
  if (file)
4935
4935
  {
4951
4951
  plugin_unlock(0, s->db_plugin);
4952
4952
 
4953
4953
  free_root(&own_root, MYF(0)); /* the table is allocated in its own root */
4954
 
  thd_proc_info(thd, save_proc_info);
 
4954
  thd->set_proc_info(save_proc_info);
4955
4955
 
4956
4956
  return;
4957
4957
}
4986
4986
    return(1);                          // End of memory
4987
4987
 
4988
4988
  save_proc_info=thd->get_proc_info();
4989
 
  thd_proc_info(thd, "converting HEAP to MyISAM");
 
4989
  thd->set_proc_info("converting HEAP to MyISAM");
4990
4990
 
4991
4991
  if (new_table.create_myisam_tmp_table(table->key_info, start_recinfo,
4992
4992
                                        recinfo, thd->lex->select_lex.options | 
5053
5053
    const char *new_proc_info=
5054
5054
      (!strcmp(save_proc_info,"Copying to tmp table") ?
5055
5055
      "Copying to tmp table on disk" : save_proc_info);
5056
 
    thd_proc_info(thd, new_proc_info);
 
5056
    thd->set_proc_info(new_proc_info);
5057
5057
  }
5058
5058
  return(0);
5059
5059
 
5065
5065
  new_table.file->ha_delete_table(new_table.s->table_name.str);
5066
5066
 err2:
5067
5067
  delete new_table.file;
5068
 
  thd_proc_info(thd, save_proc_info);
 
5068
  thd->set_proc_info(save_proc_info);
5069
5069
  table->mem_root= new_table.mem_root;
5070
5070
  return(1);
5071
5071
}