1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-11 08:50:45 +03:00
Files
mariadb-columnstore-engine/dbcon/mysql/ha_mcs_sysvars.h
Roman Nozdrin 3fabf01e93 MCOL-3593 Disabled full optimizer run and enabled copy-pasted simplify_joins.
Disabled 4th if block in buildOuterJoin to handle non-optimized MDB query
    structures.

    Broke getSelectPlan into pieces: processFrom, processWhere.

MCOL-3593 UNION processing depends on two flags isUnion that comes as
arg of getSelectPlan and unionSel that is a local variable in
getSelectPlan. Modularization of getSelectPlan broke the mechanizm.
This patch is supposed to partially fix it.

MCOL-3593 Removed unused if condition from buildOuterJoin that allows
unsupported construct subquery in ON expression.
Fixed an improper if condition that ignors tableMap entries w/o condition
in external_lock thus external_lock doesn't clean up when the query
finishes.
Fixed wrong logging for queries processed in tableMode. Now rnd_init
properly sends queryText down to ExeMgr to be logged.

MCOL-3593 Unused attribute FromSubQuery::fFromSub was removed.
 getSelectPlan has been modularized into: setExecutionParams,
 processFrom, processWhere. SELECT, HAVING, GROUP BY, ORDER BY
 still lives in getSelectPlan.
Copied optimization function simplify_joins_ into our pushdown
 code to provide the plugin code with some rewrites from MDB it
 expects.
The columnstore_processing_handlers_fallback session variable
 has been removed thus CS can't fallback from SH to partial
 execution paths, e.g. DH, GBH or plugin API.

MCOL-3602 Moved MDB optimizer rewrites into a separate file.

Add SELECT_LEX::optimize_unflattened_subqueries() call to fix IN
 into EXISTS rewrite for semi-JOINs with subqueries.

disable_indices_for_CEJ() add index related hints to disable
 index access methods in Cross Engine Joins.

create_SH() now flattens JOIN that has both physical tables and
 views. This fixes most of views related tests in the regression.
2019-11-25 10:03:32 -06:00

110 lines
3.4 KiB
C

/* Copyright (C) 2014 InfiniDB, Inc.
Copyright (C) 2016 MariaDB Corporation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
#ifndef MCS_SYSVARS_H__
#define MCS_SYSVARS_H__
#include <my_config.h>
#include "idb_mysql.h"
extern st_mysql_sys_var* mcs_system_variables[];
extern st_mysql_show_var mcs_status_variables[];
extern char cs_version[];
extern char cs_commit_hash[];
// compression_type
enum mcs_compression_type_t {
NO_COMPRESSION = 0,
SNAPPY = 2
};
// simple setters/getters
const char* get_original_query(THD* thd);
void set_original_query(THD* thd, char* query);
mcs_compression_type_t get_compression_type(THD* thd);
void set_compression_type(THD* thd, ulong value);
void* get_fe_conn_info_ptr(THD* thd = NULL);
void set_fe_conn_info_ptr(void* ptr, THD* thd = NULL);
ulonglong get_original_optimizer_flags(THD* thd = NULL);
void set_original_optimizer_flags(ulonglong ptr, THD* thd = NULL);
bool get_select_handler(THD* thd);
void set_select_handler(THD* thd, bool value);
bool get_derived_handler(THD* thd);
void set_derived_handler(THD* thd, bool value);
bool get_group_by_handler(THD* thd);
void set_group_by_handler(THD* thd, bool value);
uint get_orderby_threads(THD* thd);
void set_orderby_threads(THD* thd, uint value);
bool get_use_decimal_scale(THD* thd);
void set_use_decimal_scale(THD* thd, bool value);
ulong get_decimal_scale(THD* thd);
void set_decimal_scale(THD* thd, ulong value);
bool get_ordered_only(THD* thd);
void set_ordered_only(THD* thd, bool value);
ulong get_string_scan_threshold(THD* thd);
void set_string_scan_threshold(THD* thd, ulong value);
ulong get_stringtable_threshold(THD* thd);
void set_stringtable_threshold(THD* thd, ulong value);
ulong get_diskjoin_smallsidelimit(THD* thd);
void set_diskjoin_smallsidelimit(THD* thd, ulong value);
ulong get_diskjoin_largesidelimit(THD* thd);
void set_diskjoin_largesidelimit(THD* thd, ulong value);
ulong get_diskjoin_bucketsize(THD* thd);
void set_diskjoin_bucketsize(THD* thd, ulong value);
ulong get_um_mem_limit(THD* thd);
void set_um_mem_limit(THD* thd, ulong value);
bool get_varbin_always_hex(THD* thd);
void set_varbin_always_hex(THD* thd, bool value);
bool get_double_for_decimal_math(THD* thd);
void set_double_for_decimal_math(THD* thd, bool value);
ulong get_local_query(THD* thd);
void set_local_query(THD* thd, ulong value);
bool get_use_import_for_batchinsert(THD* thd);
void set_use_import_for_batchinsert(THD* thd, bool value);
ulong get_import_for_batchinsert_delimiter(THD* thd);
void set_import_for_batchinsert_delimiter(THD* thd, ulong value);
ulong get_import_for_batchinsert_enclosed_by(THD* thd);
void set_import_for_batchinsert_enclosed_by(THD* thd, ulong value);
bool get_replication_slave(THD* thd);
void set_replication_slave(THD* thd, bool value);
#endif