You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
feat(plugin): unconditional innodb into MCS pushdown
This commit is contained in:
@@ -1826,6 +1826,13 @@ static int columnstore_init_func(void* p)
|
|||||||
fprintf(stderr, "Columnstore: Started; Version: %s-%s\n", columnstore_version.c_str(),
|
fprintf(stderr, "Columnstore: Started; Version: %s-%s\n", columnstore_version.c_str(),
|
||||||
columnstore_release.c_str());
|
columnstore_release.c_str());
|
||||||
|
|
||||||
|
LEX_CSTRING name = {STRING_WITH_LEN("INNODB")};
|
||||||
|
auto* plugin_innodb = ha_resolve_by_name(0, &name, 0);
|
||||||
|
if (!plugin_innodb || (*plugin_innodb)->state != PLUGIN_IS_READY)
|
||||||
|
{
|
||||||
|
DBUG_RETURN(HA_ERR_RETRY_INIT);
|
||||||
|
}
|
||||||
|
|
||||||
strncpy(cs_version, columnstore_version.c_str(), sizeof(cs_version) - 1);
|
strncpy(cs_version, columnstore_version.c_str(), sizeof(cs_version) - 1);
|
||||||
cs_version[sizeof(cs_version) - 1] = 0;
|
cs_version[sizeof(cs_version) - 1] = 0;
|
||||||
|
|
||||||
@@ -1851,6 +1858,17 @@ static int columnstore_init_func(void* p)
|
|||||||
mcs_hton->create_unit = create_columnstore_unit_handler;
|
mcs_hton->create_unit = create_columnstore_unit_handler;
|
||||||
mcs_hton->db_type = DB_TYPE_AUTOASSIGN;
|
mcs_hton->db_type = DB_TYPE_AUTOASSIGN;
|
||||||
|
|
||||||
|
{
|
||||||
|
auto* innodb_hton = plugin_hton(plugin_innodb);
|
||||||
|
int error = innodb_hton == nullptr; // Engine must exists!
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
my_error(HA_ERR_INITIALIZATION, MYF(0), "Could not find storage engine %s", name.str);
|
||||||
|
}
|
||||||
|
innodb_hton->create_select = create_columnstore_select_handler;
|
||||||
|
innodb_hton->create_unit = create_columnstore_unit_handler;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PSI_INTERFACE
|
#ifdef HAVE_PSI_INTERFACE
|
||||||
uint count = sizeof(all_mutexes) / sizeof(all_mutexes[0]);
|
uint count = sizeof(all_mutexes) / sizeof(all_mutexes[0]);
|
||||||
mysql_mutex_register("ha_mcs_cache", all_mutexes, count);
|
mysql_mutex_register("ha_mcs_cache", all_mutexes, count);
|
||||||
|
Reference in New Issue
Block a user