~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to sql/ha_partition.cc

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
#include <mysql/plugin.h>
60
60
 
 
61
#include "debug_sync.h"
 
62
 
61
63
static const char *ha_par_ext= ".par";
62
64
#ifdef NOT_USED
63
65
static int free_share(PARTITION_SHARE * share);
86
88
  partition_hton->create= partition_create_handler;
87
89
  partition_hton->partition_flags= partition_flags;
88
90
  partition_hton->alter_table_flags= alter_table_flags;
89
 
  partition_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN;
 
91
  partition_hton->flags= HTON_NOT_USER_SELECTABLE |
 
92
                         HTON_HIDDEN |
 
93
                         HTON_TEMPORARY_NOT_SUPPORTED;
90
94
 
91
95
  return 0;
92
96
}
355
359
  }
356
360
  else if (get_from_handler_file(table_share->normalized_path.str, mem_root))
357
361
  {
358
 
    mem_alloc_error(2);
 
362
    my_message(ER_UNKNOWN_ERROR, "Failed to read from the .par file", MYF(0));
359
363
    DBUG_RETURN(1);
360
364
  }
361
365
  /*
690
694
  DBUG_ASSERT(!strcmp(path, get_canonical_filename(m_file[0], path,
691
695
                                                   norm_name_buff)));
692
696
 
 
697
  DEBUG_SYNC(ha_thd(), "before_rename_partitions");
693
698
  if (temp_partitions)
694
699
  {
695
700
    /*
1834
1839
  handler **file, **abort_file;
1835
1840
  DBUG_ENTER("del_ren_cre_table()");
1836
1841
 
 
1842
  /* Not allowed to create temporary partitioned tables */
 
1843
  if (create_info && create_info->options & HA_LEX_CREATE_TMP_TABLE)
 
1844
  {
 
1845
    my_error(ER_PARTITION_NO_TEMPORARY, MYF(0));
 
1846
    DBUG_RETURN(TRUE);
 
1847
  }
 
1848
 
1837
1849
  if (get_from_handler_file(from, ha_thd()->mem_root))
1838
1850
    DBUG_RETURN(TRUE);
1839
1851
  DBUG_ASSERT(m_file_buffer);
2607
2619
  DBUG_RETURN(0);
2608
2620
 
2609
2621
err_handler:
 
2622
  DEBUG_SYNC(ha_thd(), "partition_open_error");
2610
2623
  while (file-- != m_file)
2611
2624
    (*file)->close();
2612
2625
  bitmap_free(&m_bulk_insert_started);