1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

MCOL-2178 Cleanup of MIGR:: singleton from the plugin code.

Disable SP execution by the smart handlers for now.

    Add session variables to Enable/Disable select/derived/group_by
    handlers. Defaulted to Enable.
This commit is contained in:
Gagan Goel
2019-08-04 21:50:50 -04:00
parent d62b66ecf7
commit 1c460f3ba5
11 changed files with 284 additions and 726 deletions

View File

@@ -111,70 +111,6 @@ inline char* idb_mysql_query_str(THD* thd)
}
}
class MIGR
{
public:
enum infinidb_state
{
INFINIDB_INIT_CONNECT = 0, // intend to use to drop leftover vtable when logon. not being used now.
INFINIDB_INIT,
INFINIDB_CREATE_VTABLE,
INFINIDB_ALTER_VTABLE,
INFINIDB_SELECT_VTABLE,
INFINIDB_DROP_VTABLE,
INFINIDB_DISABLE_VTABLE,
INFINIDB_REDO_PHASE1, // post process requires to re-create vtable
INFINIDB_ORDER_BY, // for InfiniDB handler to ignore the 2nd scan for order by
INFINIDB_REDO_QUERY, // redo query with the normal mysql path
INFINIDB_ERROR_REDO_PHASE1,
INFINIDB_ERROR = 32,
};
struct INFINIDB_VTABLE
{
String original_query;
String create_vtable_query;
String alter_vtable_query;
String select_vtable_query;
String drop_vtable_query;
String insert_vtable_query;
infinidb_state vtable_state; // flag for InfiniDB MySQL virtual table structure
bool autoswitch;
bool has_order_by;
bool duplicate_field_name; // @bug 1928. duplicate field name in create_phase will be ingored.
bool call_sp;
bool override_largeside_estimate;
void* cal_conn_info;
bool isUnion;
bool impossibleWhereOnUnion;
bool isInsertSelect;
bool isUpdateWithDerive;
bool isInfiniDBDML; // default false
bool hasInfiniDBTable; // default false
bool isNewQuery;
INFINIDB_VTABLE() : cal_conn_info(NULL) {init();}
void init()
{
//vtable_state = INFINIDB_INIT_CONNECT;
vtable_state = INFINIDB_DISABLE_VTABLE;
autoswitch = false;
has_order_by = false;
duplicate_field_name = false;
call_sp = false;
override_largeside_estimate = false;
isUnion = false;
impossibleWhereOnUnion = false;
isUpdateWithDerive = false;
isInfiniDBDML = false;
hasInfiniDBTable = false;
isNewQuery = true;
}
};
static INFINIDB_VTABLE infinidb_vtable; // InfiniDB custom structure
};
#endif
// vim:ts=4 sw=4: