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-4144 Enable lower_case_table_names
Create tables and schemas with lower case name only if the flag is set. During operations, convert to lowercase in plugin. Byt the time a query gets to ExeMgr, DDLProc etc., everything must be lower case if the flag is set, and undisturbed if not.
This commit is contained in:
@ -16,7 +16,6 @@
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
//#define DEBUG_WALK_COND
|
||||
#include <strings.h>
|
||||
|
||||
#include <string>
|
||||
@ -129,15 +128,6 @@ public:
|
||||
gp_walk_info* fgwip;
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
string lower(string str)
|
||||
{
|
||||
boost::algorithm::to_lower(str);
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
#include "ha_view.h"
|
||||
|
||||
namespace cal_impl_if
|
||||
@ -1249,7 +1239,7 @@ void buildNestedTableOuterJoin(gp_walk_info& gwi, TABLE_LIST* table_ptr)
|
||||
(table->db.length ? table->db.str : ""),
|
||||
(table->table_name.length ? table->table_name.str : ""),
|
||||
(table->alias.length ? table->alias.str : ""),
|
||||
getViewName(table));
|
||||
getViewName(table), true, lower_case_table_names);
|
||||
gwi.innerTables.insert(ta);
|
||||
}
|
||||
|
||||
@ -1264,7 +1254,7 @@ void buildNestedTableOuterJoin(gp_walk_info& gwi, TABLE_LIST* table_ptr)
|
||||
(tab->db.length ? tab->db.str : ""),
|
||||
(tab->table_name.length ? tab->table_name.str : ""),
|
||||
(tab->alias.length ? tab->alias.str : ""),
|
||||
getViewName(tab));
|
||||
getViewName(tab), true, lower_case_table_names);
|
||||
gwi.innerTables.insert(ta);
|
||||
}
|
||||
}
|
||||
@ -1313,7 +1303,7 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex)
|
||||
(table_ptr->db.length ? table_ptr->db.str : ""),
|
||||
(table_ptr->table_name.length ? table_ptr->table_name.str : ""),
|
||||
(table_ptr->alias.length ? table_ptr->alias.str : ""),
|
||||
getViewName(table_ptr));
|
||||
getViewName(table_ptr), true, lower_case_table_names);
|
||||
|
||||
if (table_ptr->outer_join && table_ptr->on_expr)
|
||||
{
|
||||
@ -1332,7 +1322,7 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex)
|
||||
(table->db.length ? table->db.str : ""),
|
||||
(table->table_name.length ? table->table_name.str : ""),
|
||||
(table->alias.length ? table->alias.str : ""),
|
||||
getViewName(table));
|
||||
getViewName(table), true, lower_case_table_names);
|
||||
gwi_outer.innerTables.insert(ta);
|
||||
}
|
||||
}
|
||||
@ -1367,7 +1357,7 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex)
|
||||
(table->db.length ? table->db.str : ""),
|
||||
(table->table_name.length ? table->table_name.str : ""),
|
||||
(table->alias.length ? table->alias.str : ""),
|
||||
getViewName(table));
|
||||
getViewName(table), true, lower_case_table_names);
|
||||
gwi_outer.innerTables.insert(ta);
|
||||
}
|
||||
|
||||
@ -2387,8 +2377,8 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp)
|
||||
// @bug 3003. Keep column alias if it has.
|
||||
sc->alias(ifp->is_autogenerated_name() ? tcn.column : ifp->name.str);
|
||||
|
||||
sc->tableAlias(lower(gwi.tbList[i].alias));
|
||||
sc->viewName(lower(viewName));
|
||||
sc->tableAlias(gwi.tbList[i].alias);
|
||||
sc->viewName(viewName, lower_case_table_names);
|
||||
sc->resultType(ct);
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
break;
|
||||
@ -2446,17 +2436,15 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp)
|
||||
sc->alias(ifp->is_autogenerated_name() ? cols[j]->alias() : ifp->name.str);
|
||||
sc->tableName(csep->derivedTbAlias());
|
||||
sc->colPosition(j);
|
||||
string tableAlias(csep->derivedTbAlias());
|
||||
sc->tableAlias(lower(tableAlias));
|
||||
sc->tableAlias(csep->derivedTbAlias());
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
if (!viewName.empty())
|
||||
{
|
||||
// TODO: Remove lower when MCOL-4144 fixed
|
||||
sc->viewName(lower(viewName));
|
||||
sc->viewName(viewName, lower_case_table_names);
|
||||
}
|
||||
else
|
||||
{
|
||||
sc->viewName(lower(csep->derivedTbView()));
|
||||
sc->viewName(csep->derivedTbView());
|
||||
}
|
||||
sc->resultType(cols[j]->resultType());
|
||||
sc->hasAggregate(cols[j]->hasAggregate());
|
||||
@ -2570,15 +2558,14 @@ void collectAllCols(gp_walk_info& gwi, Item_field* ifp)
|
||||
SimpleColumn* sc = new SimpleColumn();
|
||||
sc->columnName(cols[j]->alias());
|
||||
sc->colPosition(j);
|
||||
string tableAlias(csep->derivedTbAlias());
|
||||
sc->tableAlias(lower(tableAlias));
|
||||
sc->viewName(lower(gwi.tbList[i].view));
|
||||
sc->tableAlias(csep->derivedTbAlias());
|
||||
sc->viewName(gwi.tbList[i].view);
|
||||
sc->resultType(cols[j]->resultType());
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
|
||||
// @bug5634 derived table optimization
|
||||
cols[j]->incRefCount();
|
||||
sc->derivedTable(tableAlias);
|
||||
sc->derivedTable(sc->tableAlias());
|
||||
sc->derivedRefCol(cols[j].get());
|
||||
srcp.reset(sc);
|
||||
gwi.returnedCols.push_back(srcp);
|
||||
@ -2590,10 +2577,23 @@ void collectAllCols(gp_walk_info& gwi, Item_field* ifp)
|
||||
{
|
||||
CalpontSystemCatalog::TableName tn(gwi.tbList[i].schema, gwi.tbList[i].table);
|
||||
|
||||
if (!tableName.empty() && (strcasecmp(tableName.c_str(), tn.table.c_str()) != 0 &&
|
||||
strcasecmp(tableName.c_str(), gwi.tbList[i].alias.c_str()) != 0 ))
|
||||
continue;
|
||||
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
if (!tableName.empty() && (strcasecmp(tableName.c_str(), tn.table.c_str()) != 0 &&
|
||||
strcasecmp(tableName.c_str(), gwi.tbList[i].alias.c_str()) != 0 ))
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!tableName.empty() && (strcmp(tableName.c_str(), tn.table.c_str()) != 0 &&
|
||||
strcmp(tableName.c_str(), gwi.tbList[i].alias.c_str()) != 0 ))
|
||||
continue;
|
||||
}
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
boost::algorithm::to_lower(tn.schema);
|
||||
boost::algorithm::to_lower(tn.table);
|
||||
}
|
||||
CalpontSystemCatalog::RIDList oidlist = gwi.csc->columnRIDs(tn, true);
|
||||
|
||||
for (unsigned int j = 0; j < oidlist.size(); j++)
|
||||
@ -2602,13 +2602,13 @@ void collectAllCols(gp_walk_info& gwi, Item_field* ifp)
|
||||
CalpontSystemCatalog::TableColName tcn = gwi.csc->colName(oidlist[j].objnum);
|
||||
CalpontSystemCatalog::ColType ct = gwi.csc->colType(oidlist[j].objnum);
|
||||
sc->columnName(tcn.column);
|
||||
sc->tableName(tcn.table);
|
||||
sc->schemaName(tcn.schema);
|
||||
sc->tableName(tcn.table, lower_case_table_names);
|
||||
sc->schemaName(tcn.schema, lower_case_table_names);
|
||||
sc->oid(oidlist[j].objnum);
|
||||
sc->alias(tcn.column);
|
||||
sc->resultType(ct);
|
||||
sc->tableAlias(lower(gwi.tbList[i].alias));
|
||||
sc->viewName(lower(viewName));
|
||||
sc->tableAlias(gwi.tbList[i].alias, lower_case_table_names);
|
||||
sc->viewName(viewName, lower_case_table_names);
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
srcp.reset(sc);
|
||||
gwi.returnedCols.push_back(srcp);
|
||||
@ -2887,6 +2887,15 @@ SimpleColumn* getSmallestColumn(boost::shared_ptr<CalpontSystemCatalog> csc,
|
||||
TABLE* table,
|
||||
gp_walk_info& gwi)
|
||||
{
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
boost::algorithm::to_lower(tn.schema);
|
||||
boost::algorithm::to_lower(tn.table);
|
||||
boost::algorithm::to_lower(tan.schema);
|
||||
boost::algorithm::to_lower(tan.table);
|
||||
boost::algorithm::to_lower(tan.alias);
|
||||
boost::algorithm::to_lower(tan.view);
|
||||
}
|
||||
// derived table
|
||||
if (tan.schema.empty())
|
||||
{
|
||||
@ -2901,7 +2910,7 @@ SimpleColumn* getSmallestColumn(boost::shared_ptr<CalpontSystemCatalog> csc,
|
||||
SimpleColumn* sc = new SimpleColumn();
|
||||
sc->columnName(rc->alias());
|
||||
sc->sequence(0);
|
||||
sc->tableAlias(lower(tan.alias));
|
||||
sc->tableAlias(tan.alias);
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
// @bug5634 derived table optimization.
|
||||
rc->incRefCount();
|
||||
@ -2919,9 +2928,8 @@ SimpleColumn* getSmallestColumn(boost::shared_ptr<CalpontSystemCatalog> csc,
|
||||
{
|
||||
// get the first column to project. @todo optimization to get the smallest one for foreign engine.
|
||||
Field* field = *(table->field);
|
||||
SimpleColumn* sc = new SimpleColumn(table->s->db.str, table->s->table_name.str, field->field_name.str, tan.fisColumnStore, gwi.sessionid);
|
||||
string alias(table->alias.ptr());
|
||||
sc->tableAlias(lower(alias));
|
||||
SimpleColumn* sc = new SimpleColumn(table->s->db.str, table->s->table_name.str, field->field_name.str, tan.fisColumnStore, gwi.sessionid, lower_case_table_names);
|
||||
sc->tableAlias(table->alias.ptr(), lower_case_table_names);
|
||||
sc->isColumnStore(false);
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
sc->resultType(fieldType_MysqlToIDB(field));
|
||||
@ -2950,8 +2958,8 @@ SimpleColumn* getSmallestColumn(boost::shared_ptr<CalpontSystemCatalog> csc,
|
||||
|
||||
tcn = csc->colName(oidlist[minWidthColOffset].objnum);
|
||||
SimpleColumn* sc = new SimpleColumn(tcn.schema, tcn.table, tcn.column, csc->sessionID());
|
||||
sc->tableAlias(lower(tan.alias));
|
||||
sc->viewName(lower(tan.view));
|
||||
sc->tableAlias(tan.alias);
|
||||
sc->viewName(tan.view);
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
sc->resultType(csc->colType(oidlist[minWidthColOffset].objnum));
|
||||
sc->charsetNumber(3000);
|
||||
@ -4499,15 +4507,15 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi)
|
||||
if (isInformationSchema)
|
||||
{
|
||||
sc->schemaName("information_schema");
|
||||
sc->tableName(tbname);
|
||||
sc->tableName(tbname, lower_case_table_names);
|
||||
}
|
||||
|
||||
sc->tableAlias(lower(tbname));
|
||||
sc->tableAlias(tbname, lower_case_table_names);
|
||||
|
||||
// view name
|
||||
sc->viewName(lower(getViewName(ifp->cached_table)));
|
||||
|
||||
sc->viewName(getViewName(ifp->cached_table), lower_case_table_names);
|
||||
sc->alias(ifp->name.str);
|
||||
|
||||
sc->isColumnStore(columnStore);
|
||||
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
|
||||
@ -5231,7 +5239,7 @@ void gp_walk(const Item* item, void* arg)
|
||||
break;
|
||||
|
||||
string aliasTableName(scp->tableAlias());
|
||||
scp->tableAlias(lower(aliasTableName));
|
||||
scp->tableAlias(aliasTableName);
|
||||
gwip->rcWorkStack.push(scp->clone());
|
||||
boost::shared_ptr<SimpleColumn> scsp(scp);
|
||||
gwip->scsp = scsp;
|
||||
@ -6214,6 +6222,10 @@ int processFrom(bool &isUnion,
|
||||
}
|
||||
|
||||
string viewName = getViewName(table_ptr);
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
boost::algorithm::to_lower(viewName);
|
||||
}
|
||||
|
||||
// @todo process from subquery
|
||||
if (table_ptr->derived)
|
||||
@ -6221,7 +6233,11 @@ int processFrom(bool &isUnion,
|
||||
SELECT_LEX* select_cursor = table_ptr->derived->first_select();
|
||||
FromSubQuery fromSub(gwi, select_cursor);
|
||||
string alias(table_ptr->alias.str);
|
||||
fromSub.alias(lower(alias));
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
boost::algorithm::to_lower(alias);
|
||||
}
|
||||
fromSub.alias(alias);
|
||||
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliasview("", "", alias, viewName);
|
||||
// @bug 3852. check return execplan
|
||||
@ -6244,7 +6260,7 @@ int processFrom(bool &isUnion,
|
||||
else if (table_ptr->view)
|
||||
{
|
||||
View* view = new View(*table_ptr->view->first_select_lex(), &gwi);
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliastable(table_ptr->db.str, table_ptr->table_name.str, table_ptr->alias.str);
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliastable(table_ptr->db.str, table_ptr->table_name.str, table_ptr->alias.str, true, lower_case_table_names);
|
||||
view->viewName(tn);
|
||||
gwi.viewList.push_back(view);
|
||||
view->transform();
|
||||
@ -6256,7 +6272,7 @@ int processFrom(bool &isUnion,
|
||||
|
||||
// trigger system catalog cache
|
||||
if (columnStore)
|
||||
gwi.csc->columnRIDs(make_table(table_ptr->db.str, table_ptr->table_name.str), true);
|
||||
gwi.csc->columnRIDs(make_table(table_ptr->db.str, table_ptr->table_name.str, lower_case_table_names), true);
|
||||
|
||||
string table_name = table_ptr->table_name.str;
|
||||
|
||||
@ -6264,9 +6280,9 @@ int processFrom(bool &isUnion,
|
||||
if (table_ptr->db.length && strcmp(table_ptr->db.str, "information_schema") == 0)
|
||||
table_name = (table_ptr->schema_table_name.length ? table_ptr->schema_table_name.str : table_ptr->alias.str);
|
||||
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, columnStore);
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, columnStore, lower_case_table_names);
|
||||
gwi.tbList.push_back(tn);
|
||||
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, columnStore);
|
||||
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, columnStore, lower_case_table_names);
|
||||
gwi.tableMap[tan] = make_pair(0, table_ptr);
|
||||
#ifdef DEBUG_WALK_COND
|
||||
cerr << tn << endl;
|
||||
@ -7205,8 +7221,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
|
||||
rc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
|
||||
if (sub->get_select_lex()->get_table_list())
|
||||
rc->viewName(lower(getViewName(sub->get_select_lex()->get_table_list())));
|
||||
|
||||
{
|
||||
rc->viewName(getViewName(sub->get_select_lex()->get_table_list()), lower_case_table_names);
|
||||
}
|
||||
if (sub->name.length)
|
||||
rc->alias(sub->name.str);
|
||||
|
||||
@ -7968,7 +7985,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
|
||||
sc1->columnName(sc->columnName());
|
||||
sc1->tableName(sc->tableName());
|
||||
sc1->tableAlias(sc->tableAlias());
|
||||
sc1->viewName(lower(sc->viewName()));
|
||||
sc1->viewName(sc->viewName());
|
||||
sc1->colPosition(0);
|
||||
sc1->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
minSc.reset(sc1);
|
||||
@ -8056,7 +8073,11 @@ int cp_get_table_plan(THD* thd, SCSEP& csep, cal_table_info& ti)
|
||||
{
|
||||
SimpleColumn* sc = new SimpleColumn(table->s->db.str, table->s->table_name.str, field->field_name.str, sessionID);
|
||||
string alias(table->alias.c_ptr());
|
||||
sc->tableAlias(lower(alias));
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
boost::algorithm::to_lower(alias);
|
||||
}
|
||||
sc->tableAlias(alias);
|
||||
sc->timeZone(gwi->thd->variables.time_zone->get_name()->ptr());
|
||||
assert (sc);
|
||||
boost::shared_ptr<SimpleColumn> spsc(sc);
|
||||
@ -8117,7 +8138,7 @@ int cp_get_table_plan(THD* thd, SCSEP& csep, cal_table_info& ti)
|
||||
csep->returnedCols(gwi->returnedCols);
|
||||
csep->columnMap(gwi->columnMap);
|
||||
CalpontSelectExecutionPlan::TableList tblist;
|
||||
tblist.push_back(make_aliastable(table->s->db.str, table->s->table_name.str, table->alias.c_ptr()));
|
||||
tblist.push_back(make_aliastable(table->s->db.str, table->s->table_name.str, table->alias.c_ptr(), true, lower_case_table_names));
|
||||
csep->tableList(tblist);
|
||||
|
||||
// @bug 3321. Set max number of blocks in a dictionary file to be scanned for filtering
|
||||
@ -8343,6 +8364,10 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
}
|
||||
|
||||
string viewName = getViewName(table_ptr);
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
boost::algorithm::to_lower(viewName);
|
||||
}
|
||||
|
||||
// @todo process from subquery
|
||||
if (table_ptr->derived)
|
||||
@ -8354,7 +8379,11 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
// Use Pushdown handler for subquery processing
|
||||
FromSubQuery fromSub(gwi, select_cursor);
|
||||
string alias(table_ptr->alias.str);
|
||||
fromSub.alias(lower(alias));
|
||||
if (lower_case_table_names)
|
||||
{
|
||||
boost::algorithm::to_lower(alias);
|
||||
}
|
||||
fromSub.alias(alias);
|
||||
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliasview("", "", alias, viewName);
|
||||
// @bug 3852. check return execplan
|
||||
@ -8377,7 +8406,7 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
else if (table_ptr->view)
|
||||
{
|
||||
View* view = new View(*table_ptr->view->first_select_lex(), &gwi);
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliastable(table_ptr->db.str, table_ptr->table_name.str, table_ptr->alias.str);
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliastable(table_ptr->db.str, table_ptr->table_name.str, table_ptr->alias.str, true, lower_case_table_names);
|
||||
view->viewName(tn);
|
||||
gwi.viewList.push_back(view);
|
||||
view->transform();
|
||||
@ -8389,7 +8418,7 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
|
||||
// trigger system catalog cache
|
||||
if (columnStore)
|
||||
csc->columnRIDs(make_table(table_ptr->db.str, table_ptr->table_name.str), true);
|
||||
csc->columnRIDs(make_table(table_ptr->db.str, table_ptr->table_name.str, lower_case_table_names), true);
|
||||
|
||||
string table_name = table_ptr->table_name.str;
|
||||
|
||||
@ -8397,9 +8426,9 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
if (table_ptr->db.length && strcmp(table_ptr->db.str, "information_schema") == 0)
|
||||
table_name = (table_ptr->schema_table_name.length ? table_ptr->schema_table_name.str : table_ptr->alias.str);
|
||||
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, columnStore);
|
||||
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, columnStore, lower_case_table_names);
|
||||
gwi.tbList.push_back(tn);
|
||||
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, columnStore);
|
||||
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, columnStore, lower_case_table_names);
|
||||
gwi.tableMap[tan] = make_pair(0, table_ptr);
|
||||
#ifdef DEBUG_WALK_COND
|
||||
cerr << tn << endl;
|
||||
@ -8959,8 +8988,9 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
rc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
|
||||
if (sub->get_select_lex()->get_table_list())
|
||||
rc->viewName(lower(getViewName(sub->get_select_lex()->get_table_list())));
|
||||
|
||||
{
|
||||
rc->viewName(getViewName(sub->get_select_lex()->get_table_list()), lower_case_table_names);
|
||||
}
|
||||
if (sub->name.length)
|
||||
rc->alias(sub->name.str);
|
||||
|
||||
@ -9123,7 +9153,7 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
funcFieldVec[i]->print(&str, QT_ORDINARY);
|
||||
sc->alias(string(str.c_ptr()));
|
||||
//sc->tableAlias(funcFieldVec[i]->table_name);
|
||||
sc->tableAlias(sc->tableAlias());
|
||||
sc->tableAlias(sc->alias());
|
||||
SRCP srcp(sc);
|
||||
uint32_t j = 0;
|
||||
|
||||
@ -9920,7 +9950,7 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
sc1->columnName(sc->columnName());
|
||||
sc1->tableName(sc->tableName());
|
||||
sc1->tableAlias(sc->tableAlias());
|
||||
sc1->viewName(lower(sc->viewName()));
|
||||
sc1->viewName(sc->viewName());
|
||||
sc1->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
|
||||
sc1->colPosition(0);
|
||||
minSc.reset(sc1);
|
||||
|
Reference in New Issue
Block a user