mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
#17 support mariadb clustering option
This commit is contained in:
parent
2df023d3dd
commit
4c988a01bc
2 changed files with 24 additions and 0 deletions
|
@ -784,9 +784,21 @@ private:
|
|||
#endif
|
||||
};
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
struct ha_index_option_struct {
|
||||
bool clustering;
|
||||
};
|
||||
|
||||
static inline bool key_is_clustering(const KEY *key) {
|
||||
return (key->flags & HA_CLUSTERING) || (key->option_struct && key->option_struct->clustering);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline bool key_is_clustering(const KEY *key) {
|
||||
return key->flags & HA_CLUSTERING;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -126,6 +126,13 @@ typedef struct savepoint_info {
|
|||
bool in_sub_stmt;
|
||||
} *SP_INFO, SP_INFO_T;
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
ha_create_table_option tokudb_index_options[] = {
|
||||
HA_IOPTION_BOOL("clustering", clustering, 0),
|
||||
HA_IOPTION_END
|
||||
};
|
||||
#endif
|
||||
|
||||
static uchar *tokudb_get_key(TOKUDB_SHARE * share, size_t * length, my_bool not_used __attribute__ ((unused))) {
|
||||
*length = share->table_name_length;
|
||||
return (uchar *) share->table_name;
|
||||
|
@ -363,6 +370,11 @@ static int tokudb_init_func(void *p) {
|
|||
#if TOKU_INCLUDE_HANDLERTON_HANDLE_FATAL_SIGNAL
|
||||
tokudb_hton->handle_fatal_signal = tokudb_handle_fatal_signal;
|
||||
#endif
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION)
|
||||
tokudb_hton->index_options = tokudb_index_options;
|
||||
#endif
|
||||
|
||||
if (!tokudb_home)
|
||||
tokudb_home = mysql_real_data_home;
|
||||
DBUG_PRINT("info", ("tokudb_home: %s", tokudb_home));
|
||||
|
|
Loading…
Reference in a new issue