You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-2178 Merging with 10.4
SELECT_LEX had been moved in THD so changed all references. Avoid writing CS decimal scales into MDB decimal fields d-only dec attribute. WIP Replaced infinidb_vtable with a singleton MIGR. Merged with MCOL-2121. Added new wsrep include paths needed by UDaF code. Removed .vcxproj from Connector code.
This commit is contained in:
committed by
Gagan Goel
parent
2071716ebd
commit
6fd5b2f22d
@ -129,9 +129,10 @@ create_calpont_group_by_handler(THD* thd, Query* query)
|
||||
SELECT_LEX *select_lex = query->from->select_lex;
|
||||
|
||||
// Create a handler if query is valid. See comments for details.
|
||||
if ( thd->infinidb_vtable.vtable_state == THD::INFINIDB_DISABLE_VTABLE
|
||||
&& ( thd->variables.infinidb_vtable_mode == 0
|
||||
|| thd->variables.infinidb_vtable_mode == 2 )
|
||||
if ( MIGR::infinidb_vtable.vtable_state == MIGR::INFINIDB_DISABLE_VTABLE
|
||||
// WIP MCOL-2178
|
||||
//&& ( MIGR::infinidb_vtable_mode == 0
|
||||
// || MIGR::infinidb_vtable_mode == 2 )
|
||||
&& ( query->group_by || select_lex->with_sum_func ) )
|
||||
{
|
||||
bool unsupported_feature = false;
|
||||
@ -213,8 +214,9 @@ create_columnstore_derived_handler(THD* thd, TABLE_LIST *derived)
|
||||
|
||||
SELECT_LEX_UNIT *unit= derived->derived;
|
||||
|
||||
if ( thd->infinidb_vtable.vtable_state != THD::INFINIDB_DISABLE_VTABLE
|
||||
&& thd->variables.infinidb_vtable_mode != 0 )
|
||||
if ( MIGR::infinidb_vtable.vtable_state != MIGR::INFINIDB_DISABLE_VTABLE )
|
||||
// WIP MCOL-2178
|
||||
// && MIGR::infinidb_vtable_mode != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -305,14 +307,14 @@ int ha_columnstore_derived_handler::init_scan()
|
||||
derived->derived->print(&derived_query, QT_ORDINARY);
|
||||
|
||||
// Save vtable_state to restore the after we inited.
|
||||
THD::infinidb_state oldState = thd->infinidb_vtable.vtable_state;
|
||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_CREATE_VTABLE;
|
||||
MIGR::infinidb_state oldState = MIGR::infinidb_vtable.vtable_state;
|
||||
MIGR::infinidb_vtable.vtable_state = MIGR::INFINIDB_CREATE_VTABLE;
|
||||
|
||||
mcs_handler_info mhi = mcs_handler_info(static_cast<void*>(this), DERIVED);
|
||||
// this::table is the place for the result set
|
||||
int rc = ha_cs_impl_pushdown_init(&mhi, table);
|
||||
|
||||
thd->infinidb_vtable.vtable_state = oldState;
|
||||
MIGR::infinidb_vtable.vtable_state = oldState;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
@ -334,13 +336,13 @@ int ha_columnstore_derived_handler::next_row()
|
||||
DBUG_ENTER("ha_columnstore_derived_handler::next_row");
|
||||
|
||||
// Save vtable_state to restore the after we inited.
|
||||
THD::infinidb_state oldState = thd->infinidb_vtable.vtable_state;
|
||||
MIGR::infinidb_state oldState = MIGR::infinidb_vtable.vtable_state;
|
||||
|
||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_CREATE_VTABLE;
|
||||
MIGR::infinidb_vtable.vtable_state = MIGR::INFINIDB_CREATE_VTABLE;
|
||||
|
||||
int rc = ha_calpont_impl_rnd_next(table->record[0], table);
|
||||
|
||||
thd->infinidb_vtable.vtable_state = oldState;
|
||||
MIGR::infinidb_vtable.vtable_state = oldState;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
@ -361,12 +363,12 @@ int ha_columnstore_derived_handler::end_scan()
|
||||
{
|
||||
DBUG_ENTER("ha_columnstore_derived_handler::end_scan");
|
||||
|
||||
THD::infinidb_state oldState = thd->infinidb_vtable.vtable_state;
|
||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_SELECT_VTABLE;
|
||||
MIGR::infinidb_state oldState = MIGR::infinidb_vtable.vtable_state;
|
||||
MIGR::infinidb_vtable.vtable_state = MIGR::INFINIDB_SELECT_VTABLE;
|
||||
|
||||
int rc = ha_calpont_impl_rnd_end(table, true);
|
||||
|
||||
thd->infinidb_vtable.vtable_state = oldState;
|
||||
MIGR::infinidb_vtable.vtable_state = oldState;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
@ -413,11 +415,11 @@ int ha_calpont_group_by_handler::init_scan()
|
||||
DBUG_ENTER("ha_calpont_group_by_handler::init_scan");
|
||||
|
||||
// Save vtable_state to restore the after we inited.
|
||||
THD::infinidb_state oldState = thd->infinidb_vtable.vtable_state;
|
||||
MIGR::infinidb_state oldState = MIGR::infinidb_vtable.vtable_state;
|
||||
// MCOL-1052 Should be removed after cleaning the code up.
|
||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_CREATE_VTABLE;
|
||||
MIGR::infinidb_vtable.vtable_state = MIGR::INFINIDB_CREATE_VTABLE;
|
||||
int rc = ha_calpont_impl_group_by_init(this, table);
|
||||
thd->infinidb_vtable.vtable_state = oldState;
|
||||
MIGR::infinidb_vtable.vtable_state = oldState;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
@ -471,8 +473,9 @@ create_columnstore_select_handler(THD* thd, SELECT_LEX* select_lex)
|
||||
handlerton *ht= 0;
|
||||
|
||||
// Return if vtable enabled.
|
||||
if ( thd->infinidb_vtable.vtable_state != THD::INFINIDB_DISABLE_VTABLE
|
||||
&& thd->variables.infinidb_vtable_mode != 0 )
|
||||
if ( MIGR::infinidb_vtable.vtable_state != MIGR::INFINIDB_DISABLE_VTABLE )
|
||||
// WIP MCOL-2178
|
||||
// && MIGR::infinidb_vtable_mode != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -591,14 +594,14 @@ int ha_columnstore_select_handler::init_scan()
|
||||
select->print(thd, &select_query, QT_ORDINARY);
|
||||
|
||||
// Save vtable_state to restore the after we inited.
|
||||
THD::infinidb_state oldState = thd->infinidb_vtable.vtable_state;
|
||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_CREATE_VTABLE;
|
||||
MIGR::infinidb_state oldState = MIGR::infinidb_vtable.vtable_state;
|
||||
MIGR::infinidb_vtable.vtable_state = MIGR::INFINIDB_CREATE_VTABLE;
|
||||
|
||||
mcs_handler_info mhi = mcs_handler_info(static_cast<void*>(this), SELECT);
|
||||
// this::table is the place for the result set
|
||||
int rc = ha_cs_impl_pushdown_init(&mhi, table);
|
||||
|
||||
thd->infinidb_vtable.vtable_state = oldState;
|
||||
MIGR::infinidb_vtable.vtable_state = oldState;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
@ -620,13 +623,13 @@ int ha_columnstore_select_handler::next_row()
|
||||
DBUG_ENTER("ha_columnstore_select_handler::next_row");
|
||||
|
||||
// Save vtable_state to restore the after we inited.
|
||||
THD::infinidb_state oldState = thd->infinidb_vtable.vtable_state;
|
||||
MIGR::infinidb_state oldState = MIGR::infinidb_vtable.vtable_state;
|
||||
|
||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_CREATE_VTABLE;
|
||||
MIGR::infinidb_vtable.vtable_state = MIGR::INFINIDB_CREATE_VTABLE;
|
||||
|
||||
int rc = ha_calpont_impl_rnd_next(table->record[0], table);
|
||||
|
||||
thd->infinidb_vtable.vtable_state = oldState;
|
||||
MIGR::infinidb_vtable.vtable_state = oldState;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
@ -647,12 +650,12 @@ int ha_columnstore_select_handler::end_scan()
|
||||
{
|
||||
DBUG_ENTER("ha_columnstore_select_handler::end_scan");
|
||||
|
||||
THD::infinidb_state oldState = thd->infinidb_vtable.vtable_state;
|
||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_SELECT_VTABLE;
|
||||
MIGR::infinidb_state oldState = MIGR::infinidb_vtable.vtable_state;
|
||||
MIGR::infinidb_vtable.vtable_state = MIGR::INFINIDB_SELECT_VTABLE;
|
||||
|
||||
int rc = ha_calpont_impl_rnd_end(table, true);
|
||||
|
||||
thd->infinidb_vtable.vtable_state = oldState;
|
||||
MIGR::infinidb_vtable.vtable_state = oldState;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user