1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +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:
David Hall
2020-09-21 11:31:44 -05:00
parent 1c94e310ff
commit 35c4b66a67
32 changed files with 468 additions and 412 deletions

View File

@ -33,6 +33,7 @@
#include "calpontsystemcatalog.h"
#include "dataconvert.h"
#include "calpontselectexecutionplan.h"
#include <boost/algorithm/string/case_conv.hpp>
namespace messageqcpp
{
@ -66,12 +67,14 @@ public:
SimpleColumn(const std::string& schema,
const std::string& table,
const std::string& col,
const uint32_t sessionID = 0);
const uint32_t sessionID = 0,
const int lower_case_table_names = 0);
SimpleColumn(const std::string& schema,
const std::string& table,
const std::string& col,
const bool isColumnStore,
const uint32_t sessionID = 0);
const uint32_t sessionID = 0,
const int lower_case_table_names = 0);
SimpleColumn(const SimpleColumn& rhs, const uint32_t sessionID = 0);
/**
@ -87,9 +90,11 @@ public:
return fSchemaName;
}
inline void schemaName(const std::string& schemaName)
inline void schemaName(const std::string& schemaName, int lower_case_table_names = 0)
{
fSchemaName = schemaName;
if (lower_case_table_names)
boost::algorithm::to_lower(fSchemaName);
}
inline const std::string& tableName() const
@ -97,9 +102,11 @@ public:
return fTableName;
}
inline void tableName(const std::string& tableName)
inline void tableName(const std::string& tableName, int lower_case_table_names = 0)
{
fTableName = tableName;
if (lower_case_table_names)
boost::algorithm::to_lower(fTableName);
}
inline const std::string& columnName() const
@ -132,9 +139,11 @@ public:
{
return fTableAlias;
}
inline void tableAlias(const std::string& tableAlias)
inline void tableAlias(const std::string& tableAlias, int lower_case_table_names = 0)
{
fTableAlias = tableAlias;
if (lower_case_table_names)
boost::algorithm::to_lower(fTableAlias);
}
inline const std::string& indexName() const
{
@ -148,9 +157,11 @@ public:
{
return fViewName;
}
inline void viewName(const std::string& viewName)
inline void viewName(const std::string& viewName, int lower_case_table_names = 0)
{
fViewName = viewName;
if (lower_case_table_names)
boost::algorithm::to_lower(fViewName);
}
inline const std::string& timeZone() const
{