You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-2 Update engine name to columnstore
This commit is contained in:
12
config.h
12
config.h
@ -286,22 +286,22 @@
|
|||||||
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
|
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
|
||||||
|
|
||||||
/* Name of package */
|
/* Name of package */
|
||||||
#define PACKAGE "infinidb"
|
#define PACKAGE "columnstore"
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
#define PACKAGE_BUGREPORT "support@infinidb.co"
|
#define PACKAGE_BUGREPORT "jira.mariadb.org"
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
/* Define to the full name of this package. */
|
||||||
#define PACKAGE_NAME "infinidb"
|
#define PACKAGE_NAME "columnstore"
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
/* Define to the full name and version of this package. */
|
||||||
#define PACKAGE_STRING "infinidb 4.6.1"
|
#define PACKAGE_STRING "columnstore 1.0.1"
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#define PACKAGE_TARNAME "infinidb"
|
#define PACKAGE_TARNAME "columnstore"
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "4.6.1"
|
#define PACKAGE_VERSION "1.0.1"
|
||||||
|
|
||||||
/* Define to 1 if the C compiler supports function prototypes. */
|
/* Define to 1 if the C compiler supports function prototypes. */
|
||||||
#define PROTOTYPES 1
|
#define PROTOTYPES 1
|
||||||
|
@ -201,7 +201,7 @@ static int calpont_init_func(void *p)
|
|||||||
tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
|
tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
|
||||||
tm.tm_hour, tm.tm_min, tm.tm_sec);
|
tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||||
|
|
||||||
fprintf(stderr, "InfiniDB: Started; Version: %s-%s\n", idb_version.c_str(), idb_release.c_str());
|
fprintf(stderr, "Columnstore: Started; Version: %s-%s\n", idb_version.c_str(), idb_release.c_str());
|
||||||
|
|
||||||
calpont_hton= (handlerton *)p;
|
calpont_hton= (handlerton *)p;
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
@ -1048,6 +1048,9 @@ const COND *ha_calpont::cond_push(const COND *cond)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct st_mysql_storage_engine columnstore_storage_engine=
|
||||||
|
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
|
||||||
|
|
||||||
struct st_mysql_storage_engine infinidb_storage_engine=
|
struct st_mysql_storage_engine infinidb_storage_engine=
|
||||||
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
|
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
|
||||||
|
|
||||||
@ -1095,19 +1098,53 @@ static struct st_mysql_sys_var* calpont_system_variables[]= {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
mysql_declare_plugin(calpont)
|
mysql_declare_plugin(columnstore)
|
||||||
|
{
|
||||||
|
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||||
|
&columnstore_storage_engine,
|
||||||
|
"Columnstore",
|
||||||
|
"MariaDB",
|
||||||
|
"Columnstore storage engine",
|
||||||
|
PLUGIN_LICENSE_GPL,
|
||||||
|
calpont_init_func, /* Plugin Init */
|
||||||
|
calpont_done_func, /* Plugin Deinit */
|
||||||
|
0x0100 /* 1.0 */,
|
||||||
|
NULL, /* status variables */
|
||||||
|
calpont_system_variables, /* system variables */
|
||||||
|
NULL, /* reserved */
|
||||||
|
0 /* config flags */
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MYSQL_STORAGE_ENGINE_PLUGIN,
|
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||||
&infinidb_storage_engine,
|
&infinidb_storage_engine,
|
||||||
"InfiniDB",
|
"InfiniDB",
|
||||||
"InfiniDB, Inc.",
|
"MariaDB",
|
||||||
"InfiniDB storage engine",
|
"Columnstore storage engine (deprecated: use columnstore)",
|
||||||
PLUGIN_LICENSE_GPL,
|
PLUGIN_LICENSE_GPL,
|
||||||
calpont_init_func, /* Plugin Init */
|
calpont_init_func, /* Plugin Init */
|
||||||
calpont_done_func, /* Plugin Deinit */
|
calpont_done_func, /* Plugin Deinit */
|
||||||
0x0001 /* 0.1 */,
|
0x0100 /* 1.0 */,
|
||||||
NULL, /* status variables */
|
NULL, /* status variables */
|
||||||
calpont_system_variables, /* system variables */
|
calpont_system_variables, /* system variables */
|
||||||
NULL /* config options */
|
NULL, /* reserved */
|
||||||
|
0 /* config flags */
|
||||||
}
|
}
|
||||||
mysql_declare_plugin_end;
|
mysql_declare_plugin_end;
|
||||||
|
#if 0
|
||||||
|
{
|
||||||
|
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||||
|
&columnstore_storage_engine,
|
||||||
|
"columnstore",
|
||||||
|
"MariaDB",
|
||||||
|
"Columnstore storage engine",
|
||||||
|
PLUGIN_LICENSE_GPL,
|
||||||
|
calpont_init_func, /* Plugin Init */
|
||||||
|
calpont_done_func, /* Plugin Deinit */
|
||||||
|
0x0100 /* 1.0 */,
|
||||||
|
NULL, /* status variables */
|
||||||
|
calpont_system_variables, /* system variables */
|
||||||
|
NULL, /* reserved */
|
||||||
|
0 /* config flags */
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@ -684,7 +684,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
rc = 1;
|
rc = 1;
|
||||||
thd->get_stmt_da()->set_overwrite_status(true);
|
thd->get_stmt_da()->set_overwrite_status(true);
|
||||||
|
|
||||||
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by InfiniDB.");
|
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by Columnstore.");
|
||||||
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
||||||
ci->isAlter = false;
|
ci->isAlter = false;
|
||||||
return rc;
|
return rc;
|
||||||
@ -901,7 +901,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
if ((compressionType ==0) && (useHdfs))
|
if ((compressionType ==0) && (useHdfs))
|
||||||
{
|
{
|
||||||
compressionType = 2;
|
compressionType = 2;
|
||||||
string errmsg ("The table is created with infinidb compression type 2 under HDFS." );
|
string errmsg ("The table is created with Columnstore compression type 2 under HDFS." );
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -950,7 +950,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
rc = 1;
|
rc = 1;
|
||||||
thd->get_stmt_da()->set_overwrite_status(true);
|
thd->get_stmt_da()->set_overwrite_status(true);
|
||||||
|
|
||||||
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Multiple actions in alter table statement is currently not supported by InfiniDB.");
|
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Multiple actions in alter table statement is currently not supported by Columnstore.");
|
||||||
|
|
||||||
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
||||||
ci->isAlter = false;
|
ci->isAlter = false;
|
||||||
@ -966,7 +966,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
{
|
{
|
||||||
rc = 1;
|
rc = 1;
|
||||||
thd->get_stmt_da()->set_overwrite_status(true);
|
thd->get_stmt_da()->set_overwrite_status(true);
|
||||||
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by InfiniDB.");
|
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by Columnstore.");
|
||||||
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
||||||
ci->isAlter = false;
|
ci->isAlter = false;
|
||||||
return rc;
|
return rc;
|
||||||
@ -1149,7 +1149,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
if ((compressionType ==0) && (useHdfs))
|
if ((compressionType ==0) && (useHdfs))
|
||||||
{
|
{
|
||||||
compressionType = 2;
|
compressionType = 2;
|
||||||
string errmsg ("The column is created with infinidb compression type 2 under HDFS." );
|
string errmsg ("The column is created with Columnstore compression type 2 under HDFS." );
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1285,7 +1285,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
{
|
{
|
||||||
rc = 1;
|
rc = 1;
|
||||||
thd->get_stmt_da()->set_overwrite_status(true);
|
thd->get_stmt_da()->set_overwrite_status(true);
|
||||||
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Multiple actions in alter table statement is currently not supported by InfiniDB.");
|
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Multiple actions in alter table statement is currently not supported by Columnstore.");
|
||||||
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
||||||
ci->isAlter = false;
|
ci->isAlter = false;
|
||||||
return rc;
|
return rc;
|
||||||
@ -1296,7 +1296,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
{
|
{
|
||||||
rc = 1;
|
rc = 1;
|
||||||
thd->get_stmt_da()->set_overwrite_status(true);
|
thd->get_stmt_da()->set_overwrite_status(true);
|
||||||
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by InfiniDB.");
|
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by Columnstore.");
|
||||||
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
||||||
ci->isAlter = false;
|
ci->isAlter = false;
|
||||||
return rc;
|
return rc;
|
||||||
@ -1473,7 +1473,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
if ((compressionType ==0) && (useHdfs))
|
if ((compressionType ==0) && (useHdfs))
|
||||||
{
|
{
|
||||||
compressionType = 2;
|
compressionType = 2;
|
||||||
string errmsg ("The column is created with infinidb compression type 2 under HDFS." );
|
string errmsg ("The column is created with Columnstore compression type 2 under HDFS." );
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1614,7 +1614,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
if ((compressionType ==0) && (useHdfs))
|
if ((compressionType ==0) && (useHdfs))
|
||||||
{
|
{
|
||||||
compressionType = 2;
|
compressionType = 2;
|
||||||
string errmsg ("The column is created with infinidb compression type 2 under HDFS." );
|
string errmsg ("The column is created with Columnstore compression type 2 under HDFS." );
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1853,14 +1853,14 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
|
|||||||
algorithm::to_upper(ddlStatement);
|
algorithm::to_upper(ddlStatement);
|
||||||
if (ddlStatement.find("AUTO_INCREMENT") != string::npos)
|
if (ddlStatement.find("AUTO_INCREMENT") != string::npos)
|
||||||
{
|
{
|
||||||
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Use of the MySQL auto_increment syntax is not supported in InfiniDB. If you wish to create an auto increment column in InfiniDB, please consult the InfiniDB SQL Syntax Guide for the correct usage.");
|
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Use of the MySQL auto_increment syntax is not supported in Columnstore. If you wish to create an auto increment column in Columnstore, please consult the Columnstore SQL Syntax Guide for the correct usage.");
|
||||||
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
||||||
ci->isAlter = false;
|
ci->isAlter = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//@Bug 1888,1885. update error message
|
//@Bug 1888,1885. update error message
|
||||||
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The syntax or the data type(s) is not supported by InfiniDB. Please check the InfiniDB syntax guide for supported syntax or data types.");
|
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.");
|
||||||
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
ci->alterTableState = cal_connection_info::NOT_ALTER;
|
||||||
ci->isAlter = false;
|
ci->isAlter = false;
|
||||||
}
|
}
|
||||||
@ -2057,7 +2057,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
|
|||||||
if ((compressiontype ==0) && (useHdfs))
|
if ((compressiontype ==0) && (useHdfs))
|
||||||
{
|
{
|
||||||
compressiontype = 2;
|
compressiontype = 2;
|
||||||
string errmsg ("The table is created with infinidb compression type 2 under HDFS." );
|
string errmsg ("The table is created with Columnstore compression type 2 under HDFS." );
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, errmsg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4469,7 +4469,7 @@ bool isInfiniDB(TABLE* table_ptr)
|
|||||||
string engineName = table_ptr->s->db_plugin->name.str;
|
string engineName = table_ptr->s->db_plugin->name.str;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (engineName == "InfiniDB")
|
if (engineName == "Columnstore" || engineName == "InfiniDB")
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -782,7 +782,7 @@ uint32_t doUpdateDelete(THD *thd)
|
|||||||
ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser);
|
ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser);
|
||||||
} catch (std::exception& e)
|
} catch (std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB User Priority - ") + e.what();
|
string msg = string("Columnstore User Priority - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
ci->stats.fSessionID = tid2sid(thd->thread_id);
|
ci->stats.fSessionID = tid2sid(thd->thread_id);
|
||||||
@ -1259,7 +1259,7 @@ uint32_t doUpdateDelete(THD *thd)
|
|||||||
updateCP->priority( ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser));
|
updateCP->priority( ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser));
|
||||||
}catch(std::exception& e)
|
}catch(std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB User Priority - ") + e.what();
|
string msg = string("Columnstore User Priority - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1688,7 +1688,7 @@ uint32_t doUpdateDelete(THD *thd)
|
|||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB Query Stats - ") + e.what();
|
string msg = string("Columnstore Query Stats - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
delete ci->dmlProc;
|
delete ci->dmlProc;
|
||||||
@ -2388,7 +2388,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
|
|||||||
// @bug 3939. Only error out for sp with select. Let pass for alter table in sp.
|
// @bug 3939. Only error out for sp with select. Let pass for alter table in sp.
|
||||||
if (thd->infinidb_vtable.call_sp && (thd->lex)->sql_command != SQLCOM_ALTER_TABLE)
|
if (thd->infinidb_vtable.call_sp && (thd->lex)->sql_command != SQLCOM_ALTER_TABLE)
|
||||||
{
|
{
|
||||||
setError(thd, ER_CHECK_NOT_IMPLEMENTED, "This stored procedure syntax is not supported by InfiniDB in this version");
|
setError(thd, ER_CHECK_NOT_IMPLEMENTED, "This stored procedure syntax is not supported by Columnstore in this version");
|
||||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
|
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
|
||||||
return ER_INTERNAL_ERROR;
|
return ER_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
@ -2552,7 +2552,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
|
|||||||
ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser);
|
ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser);
|
||||||
} catch (std::exception& e)
|
} catch (std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB User Priority - ") + e.what();
|
string msg = string("Columnstore User Priority - ") + e.what();
|
||||||
ci->warningMsg = msg;
|
ci->warningMsg = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2622,7 +2622,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
|
|||||||
csep->priority( ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser));
|
csep->priority( ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser));
|
||||||
}catch (std::exception& e)
|
}catch (std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB User Priority - ") + e.what();
|
string msg = string("Columnstore User Priority - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2701,7 +2701,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
|
|||||||
ci->stats.insert();
|
ci->stats.insert();
|
||||||
} catch (std::exception& e)
|
} catch (std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB Query Stats - ") + e.what();
|
string msg = string("Columnstore Query Stats - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2878,7 +2878,7 @@ int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
|
|||||||
// @bug 3939. Only error out for sp with select. Let pass for alter table in sp.
|
// @bug 3939. Only error out for sp with select. Let pass for alter table in sp.
|
||||||
if (thd->infinidb_vtable.call_sp && (thd->lex)->sql_command != SQLCOM_ALTER_TABLE)
|
if (thd->infinidb_vtable.call_sp && (thd->lex)->sql_command != SQLCOM_ALTER_TABLE)
|
||||||
{
|
{
|
||||||
setError(thd, ER_CHECK_NOT_IMPLEMENTED, "This stored procedure syntax is not supported by InfiniDB in this version");
|
setError(thd, ER_CHECK_NOT_IMPLEMENTED, "This stored procedure syntax is not supported by Columnstore in this version");
|
||||||
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
|
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
|
||||||
return ER_INTERNAL_ERROR;
|
return ER_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
@ -3081,7 +3081,7 @@ int ha_calpont_impl_rnd_end(TABLE* table)
|
|||||||
{
|
{
|
||||||
if (e.errorCode() == ERR_CROSS_ENGINE_CONNECT || e.errorCode() == ERR_CROSS_ENGINE_CONFIG)
|
if (e.errorCode() == ERR_CROSS_ENGINE_CONNECT || e.errorCode() == ERR_CROSS_ENGINE_CONFIG)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB Query Stats - ") + e.what();
|
string msg = string("Columnstore Query Stats - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3305,7 +3305,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
//@bug 4771. reject REPLACE key word
|
//@bug 4771. reject REPLACE key word
|
||||||
if ((thd->lex)->sql_command == SQLCOM_REPLACE_SELECT)
|
if ((thd->lex)->sql_command == SQLCOM_REPLACE_SELECT)
|
||||||
{
|
{
|
||||||
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, "REPLACE statement is not supported in infinidb.");
|
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, "REPLACE statement is not supported in Columnstore.");
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<CalpontSystemCatalog> csc = CalpontSystemCatalog::makeCalpontSystemCatalog(tid2sid(thd->thread_id));
|
boost::shared_ptr<CalpontSystemCatalog> csc = CalpontSystemCatalog::makeCalpontSystemCatalog(tid2sid(thd->thread_id));
|
||||||
@ -3324,7 +3324,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
found = insertStmt.find("ignore");
|
found = insertStmt.find("ignore");
|
||||||
if (found!=string::npos)
|
if (found!=string::npos)
|
||||||
{
|
{
|
||||||
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, "IGNORE option in insert statement is not supported in infinidb.");
|
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, "IGNORE option in insert statement is not supported in Columnstore.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( rows > 1 )
|
if ( rows > 1 )
|
||||||
@ -3731,7 +3731,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser);
|
ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser);
|
||||||
} catch (std::exception& e)
|
} catch (std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB User Priority - ") + e.what();
|
string msg = string("Columnstore User Priority - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3985,7 +3985,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
|
|||||||
ci->stats.insert();
|
ci->stats.insert();
|
||||||
} catch (std::exception& e)
|
} catch (std::exception& e)
|
||||||
{
|
{
|
||||||
string msg = string("InfiniDB Query Stats - ") + e.what();
|
string msg = string("Columnstore Query Stats - ") + e.what();
|
||||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 9999, msg.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
:******************************************************************************************
|
|
||||||
# $Id: Makefile 2339 2012-05-02 18:20:56Z pleblanc $
|
|
||||||
#
|
|
||||||
# Copyright (C) 2009-2012 Calpont Corporation
|
|
||||||
# All rights reserved
|
|
||||||
#*****************************************************************************************/
|
|
||||||
include ../../rules.mak
|
|
||||||
|
|
||||||
# The name of the executable
|
|
||||||
|
|
||||||
PROGRAM=mcadmin
|
|
||||||
VERSION=1.0.0
|
|
||||||
|
|
||||||
# List all the source files here
|
|
||||||
SRCS=mcadmin.cpp
|
|
||||||
|
|
||||||
# Run-time directories for project shared libs
|
|
||||||
CALPONT_LIBRARY_PATH=$(EXPORT_ROOT)/lib
|
|
||||||
|
|
||||||
# Preprocessor flags
|
|
||||||
CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
|
||||||
|
|
||||||
# Compiler flags
|
|
||||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
|
||||||
|
|
||||||
# Linker flags
|
|
||||||
# we need to add some search paths here because on a boostrap build we won't find liboamcpp
|
|
||||||
# anywhere except in ../oamcpp
|
|
||||||
CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS)
|
|
||||||
LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib
|
|
||||||
TLIBS=-L/usr/local/lib -lcppunit -ldl
|
|
||||||
GLIBS=$(CLIBS)
|
|
||||||
|
|
||||||
.PHONY: install clean test docs FORCE coverage leakcheck
|
|
||||||
|
|
||||||
GLIBS=-lcppunit -ldl
|
|
||||||
|
|
||||||
OBJS=$(SRCS:.cpp=.o)
|
|
||||||
|
|
||||||
$(PROGRAM): $(OBJS)
|
|
||||||
$(LINK.cpp) -o $@ $^ -Wl,-Bstatic -lreadline -Wl,-Bdynamic -lncurses -ltinfo
|
|
||||||
|
|
||||||
install: bootstrap $(PROGRAM)
|
|
||||||
mkdir -p $(INSTALL_ROOT_BIN)
|
|
||||||
$(INSTALL) $(PROGRAM) $(INSTALL_ROOT_BIN)
|
|
||||||
|
|
||||||
bootstrap:
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(OBJS) tdriver.o $(PROGRAM) $(LIBRARY) tdriver core *~ *.tag *-gcov.* *.gcov tdriver-gcov *.d *.d.* tdriver.output
|
|
||||||
rm -rf html
|
|
||||||
|
|
||||||
docs:
|
|
||||||
doxygen $(EXPORT_ROOT)/etc/Doxyfile
|
|
||||||
|
|
||||||
tdriver: tdriver.o
|
|
||||||
$(LINK.cpp) -o $@ $^ $(TLIBS)
|
|
||||||
|
|
||||||
test: $(LIBRARY) tdriver
|
|
||||||
rm -f /var/log/Calpont/uiCommands.log
|
|
||||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib ./tdriver
|
|
||||||
|
|
||||||
%-gcov.o: %.cpp
|
|
||||||
$(COMPILE.cpp) -o $@ $^
|
|
||||||
|
|
||||||
tdriver-gcov: CXXFLAGS+=-fprofile-arcs -ftest-coverage
|
|
||||||
tdriver-gcov: mcadmin-gcov.o $(subst .o,-gcov.o,$(OBJS))
|
|
||||||
$(LINK.cpp) -o $@ $^ $(GLIBS)
|
|
||||||
|
|
||||||
|
|
||||||
leakcheck: $(LIBRARY) tdriver
|
|
||||||
rm -f /var/log/Calpont/uiCommands.log
|
|
||||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib valgrind --tool=memcheck --leak-check=yes ./tdriver
|
|
||||||
|
|
||||||
%.d: %.cpp
|
|
||||||
@set -e; rm -f $@; \
|
|
||||||
$(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
|
|
||||||
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
|
||||||
rm -f $@.$$$$
|
|
||||||
|
|
||||||
ifndef BOOTSTRAP
|
|
||||||
-include $(SRCS:.cpp=.d) tdriver.d
|
|
||||||
endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,135 +0,0 @@
|
|||||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
|
||||||
|
|
||||||
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. */
|
|
||||||
|
|
||||||
/******************************************************************************************
|
|
||||||
* $Id: calpontConsole.h 3071 2013-04-04 18:45:53Z rdempsey $
|
|
||||||
*
|
|
||||||
******************************************************************************************/
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
*/
|
|
||||||
#ifndef CALPONTCONSOLE_H
|
|
||||||
#define CALPONTCONSOLE_H
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <string>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <sstream>
|
|
||||||
#include <exception>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <vector>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <sys/signal.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <readline/readline.h>
|
|
||||||
#include <readline/history.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include "liboamcpp.h"
|
|
||||||
#include "configcpp.h"
|
|
||||||
#include "snmpmanager.h"
|
|
||||||
#include "snmpglobal.h"
|
|
||||||
#include "calpontsystemcatalog.h"
|
|
||||||
#include "brmtypes.h"
|
|
||||||
|
|
||||||
|
|
||||||
const int CmdSize = 80;
|
|
||||||
const int ArgNum = 10;
|
|
||||||
const int DescNumMax = 10;
|
|
||||||
const int cmdNum = 68;
|
|
||||||
|
|
||||||
const std::string DEFAULT_LOG_FILE = "/var/log/Calpont/uiCommands.log";
|
|
||||||
std::ofstream logFile;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* write the command to the log file
|
|
||||||
*/
|
|
||||||
void writeLog(std::string command);
|
|
||||||
|
|
||||||
/** @brief location of the Process Configuration file
|
|
||||||
*/
|
|
||||||
const std::string ConsoleCmdsFile= "ConsoleCmds.xml";
|
|
||||||
|
|
||||||
void getFlags(const std::string* arguments, oam::GRACEFUL_FLAG& gracefulTemp, oam::ACK_FLAG& ackTemp, oam::CC_SUSPEND_ANSWER& suspendAnswer, bool& bNeedsConfirm, std::string* password = NULL);
|
|
||||||
int confirmPrompt(std::string warningCommand);
|
|
||||||
std::string dataPrompt(std::string promptCommand);
|
|
||||||
int processCommand(std::string*);
|
|
||||||
int ProcessSupportCommand(int CommandID, std::string arguments[]);
|
|
||||||
void printAlarmSummary();
|
|
||||||
void printCriticalAlarms();
|
|
||||||
void checkRepeat(std::string*, int);
|
|
||||||
void printSystemStatus();
|
|
||||||
void printProcessStatus(std::string port = "ProcStatusControl");
|
|
||||||
void printModuleCpuUsers(oam::TopProcessCpuUsers topprocesscpuusers);
|
|
||||||
void printModuleCpu(oam::ModuleCpu modulecpu);
|
|
||||||
void printModuleMemoryUsers(oam::TopProcessMemoryUsers topprocessmemoryusers);
|
|
||||||
void printModuleMemory(oam::ModuleMemory modulememory);
|
|
||||||
void printModuleDisk(oam::ModuleDisk moduledisk);
|
|
||||||
void printModuleResources(oam::TopProcessCpuUsers topprocesscpuusers, oam::ModuleCpu modulecpu, oam::TopProcessMemoryUsers topprocessmemoryusers, oam::ModuleMemory modulememory, oam::ModuleDisk moduledisk);
|
|
||||||
void printState(int state, std::string addInfo);
|
|
||||||
std::string getParentOAMModule();
|
|
||||||
bool checkForDisabledModules();
|
|
||||||
oam::CC_SUSPEND_ANSWER AskSuspendQuestion(int CmdID);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class to_lower
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
char operator() (char c) const // notice the return type
|
|
||||||
{
|
|
||||||
return tolower(c);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @brief Hidden Support commands in lower-case
|
|
||||||
*/
|
|
||||||
const std::string supportCmds[] = { "helpsupport",
|
|
||||||
"stopprocess",
|
|
||||||
"startprocess",
|
|
||||||
"restartprocess",
|
|
||||||
"killpid",
|
|
||||||
"rebootsystem",
|
|
||||||
"rebootnode",
|
|
||||||
"stopdbrmprocess",
|
|
||||||
"startdbrmprocess",
|
|
||||||
"restartdbrmprocess",
|
|
||||||
"setsystemstartupstate",
|
|
||||||
"stopprimprocs",
|
|
||||||
"startprimprocs",
|
|
||||||
"restartprimprocs",
|
|
||||||
"stopexemgrs",
|
|
||||||
"startexemgrs",
|
|
||||||
"restartexemgrs",
|
|
||||||
"getprocessstatusstandby",
|
|
||||||
"distributeconfigfile",
|
|
||||||
"getpmdbrootconfig",
|
|
||||||
"getdbrootpmconfig",
|
|
||||||
"getsystemdbrootconfig",
|
|
||||||
"checkdbfunctional",
|
|
||||||
"getsystemreadflags",
|
|
||||||
"setsystemqueryready",
|
|
||||||
""
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Reference in New Issue
Block a user