summaryrefslogtreecommitdiff
path: root/storage/xtradb/handler/ha_innodb.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/handler/ha_innodb.h')
-rw-r--r--storage/xtradb/handler/ha_innodb.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/storage/xtradb/handler/ha_innodb.h b/storage/xtradb/handler/ha_innodb.h
index 867b1e7cc90..ea4be1fb2e0 100644
--- a/storage/xtradb/handler/ha_innodb.h
+++ b/storage/xtradb/handler/ha_innodb.h
@@ -58,6 +58,23 @@ typedef struct st_innobase_share {
/** Prebuilt structures in an InnoDB table handle used within MySQL */
struct row_prebuilt_t;
+/** Engine specific table options are defined using this struct */
+struct ha_table_option_struct
+{
+ bool page_compressed; /*!< Table is using page compression
+ if this option is true. */
+ ulonglong page_compression_level; /*!< Table page compression level
+ 0-9. */
+ uint atomic_writes; /*!< Use atomic writes for this
+ table if this options is ON or
+ in DEFAULT if
+ srv_use_atomic_writes=1.
+ Atomic writes are not used if
+ value OFF.*/
+ uint encryption; /*!< DEFAULT, ON, OFF */
+ ulonglong encryption_key_id; /*!< encryption key id */
+};
+
/** The class defining a handle to an Innodb table */
class ha_innobase: public handler
{
@@ -83,6 +100,8 @@ class ha_innobase: public handler
or undefined */
uint num_write_row; /*!< number of write_row() calls */
+ ha_statistics* ha_partition_stats; /*!< stats of the partition owner
+ handler (if there is one) */
uint store_key_val_for_row(uint keynr, char* buff, uint buff_len,
const uchar* record);
inline void update_thd(THD* thd);
@@ -97,6 +116,10 @@ class ha_innobase: public handler
void innobase_initialize_autoinc();
dict_index_t* innobase_get_index(uint keynr);
+#ifdef WITH_WSREP
+ int wsrep_append_keys(THD *thd, bool shared,
+ const uchar* record0, const uchar* record1);
+#endif
/* Init values for the class: */
public:
ha_innobase(handlerton *hton, TABLE_SHARE *table_arg);
@@ -177,11 +200,15 @@ class ha_innobase: public handler
char* norm_name,
char* temp_path,
char* remote_path);
+ const char* check_table_options(THD *thd, TABLE* table,
+ HA_CREATE_INFO* create_info, const bool use_tablespace, const ulint file_format);
int create(const char *name, register TABLE *form,
HA_CREATE_INFO *create_info);
int truncate();
int delete_table(const char *name);
int rename_table(const char* from, const char* to);
+ int defragment_table(const char* name, const char* index_name,
+ bool async);
int check(THD* thd, HA_CHECK_OPT* check_opt);
char* update_table_comment(const char* comment);
char* get_foreign_key_create_info();
@@ -285,6 +312,7 @@ class ha_innobase: public handler
Alter_inplace_info* ha_alter_info,
bool commit);
/** @} */
+ void set_partition_owner_stats(ha_statistics *stats);
bool check_if_incompatible_data(HA_CREATE_INFO *info,
uint table_changes);
bool check_if_supported_virtual_columns(void) { return TRUE; }
@@ -447,6 +475,25 @@ __attribute__((nonnull));
extern void mysql_bin_log_commit_pos(THD *thd, ulonglong *out_pos, const char **out_file);
struct trx_t;
+#ifdef WITH_WSREP
+#include <wsrep_mysqld.h>
+//extern "C" int wsrep_trx_order_before(void *thd1, void *thd2);
+
+extern "C" bool wsrep_thd_is_wsrep_on(THD *thd);
+
+
+extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode);
+extern "C" void wsrep_thd_set_query_state(
+ THD *thd, enum wsrep_query_state state);
+
+extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id);
+
+extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd);
+extern "C" time_t wsrep_thd_query_start(THD *thd);
+extern "C" query_id_t wsrep_thd_query_id(THD *thd);
+extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd);
+extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id);
+#endif
extern const struct _ft_vft ft_vft_result;
@@ -484,6 +531,9 @@ innobase_index_name_is_reserved(
__attribute__((nonnull, warn_unused_result));
/*****************************************************************//**
+#ifdef WITH_WSREP
+extern "C" int wsrep_trx_is_aborting(void *thd_ptr);
+#endif
Determines InnoDB table flags.
@retval true if successful, false if error */
UNIV_INTERN