~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

  • Committer: Brian Aker
  • Date: 2011-01-13 02:08:31 UTC
  • mto: (2079.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: brian@tangent.org-20110113020831-gionzccgg17efwn7
Basic DDL for catalog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1482
1482
    @param level the error level
1483
1483
    @return true if the error is handled
1484
1484
  */
1485
 
  virtual bool handle_error(drizzled::error_t sql_errno, const char *message,
 
1485
  virtual bool handle_error(uint32_t sql_errno, const char *message,
1486
1486
                            DRIZZLE_ERROR::enum_warning_level level);
1487
1487
 
1488
1488
  /**
1753
1753
  void close_old_data_files(bool morph_locks= false,
1754
1754
                            bool send_refresh= false);
1755
1755
  void close_open_tables();
1756
 
  void close_data_files_and_morph_locks(const identifier::Table &identifier);
 
1756
  void close_data_files_and_morph_locks(const TableIdentifier &identifier);
1757
1757
 
1758
1758
private:
1759
 
  bool free_cached_table(boost::mutex::scoped_lock &scopedLock);
1760
 
 
 
1759
  bool free_cached_table();
1761
1760
public:
1762
1761
 
1763
1762
  /**
1791
1790
  Table *openTable(TableList *table_list, bool *refresh, uint32_t flags= 0);
1792
1791
 
1793
1792
  void unlink_open_table(Table *find);
1794
 
  void drop_open_table(Table *table, const identifier::Table &identifier);
 
1793
  void drop_open_table(Table *table, const TableIdentifier &identifier);
1795
1794
  void close_cached_table(Table *table);
1796
1795
 
1797
1796
  /* Create a lock in the cache */
1798
 
  table::Placeholder *table_cache_insert_placeholder(const identifier::Table &identifier);
1799
 
  bool lock_table_name_if_not_cached(const identifier::Table &identifier, Table **table);
 
1797
  table::Placeholder *table_cache_insert_placeholder(const TableIdentifier &identifier);
 
1798
  bool lock_table_name_if_not_cached(const TableIdentifier &identifier, Table **table);
1800
1799
 
1801
1800
  typedef boost::unordered_map<std::string, message::Table, util::insensitive_hash, util::insensitive_equal_to> TableMessageCache;
1802
1801
 
1805
1804
    TableMessageCache table_message_cache;
1806
1805
 
1807
1806
  public:
1808
 
    bool storeTableMessage(const identifier::Table &identifier, message::Table &table_message);
1809
 
    bool removeTableMessage(const identifier::Table &identifier);
1810
 
    bool getTableMessage(const identifier::Table &identifier, message::Table &table_message);
1811
 
    bool doesTableMessageExist(const identifier::Table &identifier);
1812
 
    bool renameTableMessage(const identifier::Table &from, const identifier::Table &to);
 
1807
    bool storeTableMessage(const TableIdentifier &identifier, message::Table &table_message);
 
1808
    bool removeTableMessage(const TableIdentifier &identifier);
 
1809
    bool getTableMessage(const TableIdentifier &identifier, message::Table &table_message);
 
1810
    bool doesTableMessageExist(const TableIdentifier &identifier);
 
1811
    bool renameTableMessage(const TableIdentifier &from, const TableIdentifier &to);
 
1812
 
1813
1813
  };
1814
 
 
1815
1814
private:
1816
1815
  TableMessages _table_message_cache;
1817
1816
 
1822
1821
  }
1823
1822
 
1824
1823
  /* Reopen operations */
1825
 
  bool reopen_tables();
 
1824
  bool reopen_tables(bool get_locks, bool mark_share_as_old);
1826
1825
  bool close_cached_tables(TableList *tables, bool wait_for_refresh, bool wait_for_placeholders);
1827
1826
 
1828
1827
  void wait_for_condition(boost::mutex &mutex, boost::condition_variable_any &cond);
1859
1858
 
1860
1859
  void get_xid(DRIZZLE_XID *xid); // Innodb only
1861
1860
 
1862
 
  table::Singular *getInstanceTable();
1863
 
  table::Singular *getInstanceTable(List<CreateField> &field_list);
 
1861
  table::Instance *getInstanceTable();
 
1862
  table::Instance *getInstanceTable(List<CreateField> &field_list);
1864
1863
 
1865
1864
private:
1866
1865
  bool resetUsage()
1900
1899
  // This lives throughout the life of Session
1901
1900
  bool use_usage;
1902
1901
  PropertyMap life_properties;
1903
 
  std::vector<table::Singular *> temporary_shares;
 
1902
  std::vector<table::Instance *> temporary_shares;
1904
1903
  struct rusage usage;
1905
1904
};
1906
1905