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

Change error codes to match MariaDB's new scheme

This commit is contained in:
David Hall
2016-02-17 10:09:40 -06:00
parent d393d33c0d
commit 357cba722c
9 changed files with 292 additions and 272 deletions

View File

@ -107,7 +107,6 @@
*/
#include "ha_calpont.h"
#include "versionnumber.h"
#define NEED_CALPONT_EXTERNS
@ -159,11 +158,32 @@ static uchar* calpont_get_key(INFINIDB_SHARE *share, size_t *length,
int calpont_discover(handlerton *hton, THD* thd, TABLE_SHARE *share)
{
DBUG_ENTER("calpont_discover");
DBUG_PRINT("calpont_discover", ("db: '%s' name: '%s'", share->db.str,
share->table_name.str));
#ifdef INFINIDB_DEBUG
fprintf(stderr, "calpont_discover()\n");
#endif
return 1;
uchar* frm_data = NULL;
size_t frm_len = 0;
int error = 0;
if (!ha_calpont_impl_discover_existence(share->db.str, share->table_name.str))
DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
error = share->read_frm_image((const uchar**)&frm_data, &frm_len);
if (error)
DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
my_errno= share->init_from_binary_frm_image(thd, 1, frm_data, frm_len);
my_free(frm_data);
DBUG_RETURN(my_errno);
}
int calpont_discover_existence(handlerton *hton, const char *db,
const char *table_name)
{
@ -195,7 +215,7 @@ static int calpont_init_func(void *p)
calpont_hton->state= SHOW_OPTION_YES;
calpont_hton->create= calpont_create_handler;
calpont_hton->flags= HTON_CAN_RECREATE;
calpont_hton->discover_table= calpont_discover;
// calpont_hton->discover_table= calpont_discover;
calpont_hton->discover_table_existence= calpont_discover_existence;
calpont_hton->commit= calpont_commit;
calpont_hton->rollback= calpont_rollback;
@ -1008,10 +1028,6 @@ int ha_calpont::create(const char *name, TABLE *table_arg,
HA_CREATE_INFO *create_info)
{
DBUG_ENTER("ha_calpont::create");
/*
This is not implemented but we want someone to be able to see that it
works.
*/
int rc = ha_calpont_impl_create(name, table_arg, create_info);

View File

@ -647,7 +647,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_DATATYPE_NOT_SUPPORT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_DATATYPE_NOT_SUPPORT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -670,7 +670,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -684,7 +684,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary is currently not supported by InfiniDB.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by InfiniDB.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -696,7 +696,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary length has to be between 8 and 8000.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary length has to be between 8 and 8000.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -709,7 +709,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary column cannot have default value.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary column cannot have default value.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -734,7 +734,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -743,7 +743,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -753,7 +753,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -774,7 +774,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 )
{
rc = 1;
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -789,9 +789,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
return rc;
}
@ -805,7 +805,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -819,7 +819,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -838,7 +838,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Autoincrement column cannot have a default value.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Autoincrement column cannot have a default value.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -850,7 +850,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -868,7 +868,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_NEGATIVE_STARTVALUE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_NEGATIVE_STARTVALUE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -880,7 +880,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -891,7 +891,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -920,7 +920,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add(autoiColName);
thd->raise_error_printf(HA_ERR_UNSUPPORTED,(IDBErrorInfo::instance()->errorMsg(ERR_UNKNOWN_COL, args)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED,(IDBErrorInfo::instance()->errorMsg(ERR_UNKNOWN_COL, args)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -937,7 +937,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "No database selected.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "No database selected.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -950,7 +950,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "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 InfiniDB.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
@ -966,7 +966,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary is currently not supported by InfiniDB.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by InfiniDB.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -977,7 +977,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary length has to be between 8 and 8000.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary length has to be between 8 and 8000.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -993,7 +993,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1011,7 +1011,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1020,7 +1020,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Unknown exception caught when checking any rows in the table.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Unknown exception caught when checking any rows in the table.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1029,7 +1029,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Table is not empty. New column has to have a default value if NOT NULL required.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Table is not empty. New column has to have a default value if NOT NULL required.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1041,7 +1041,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "New column has to have a default value if NOT NULL required.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "New column has to have a default value if NOT NULL required.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1055,7 +1055,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary column cannot have default value.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary column cannot have default value.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1078,7 +1078,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1087,7 +1087,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1097,7 +1097,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1124,7 +1124,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 )
{
rc = 1;
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1137,9 +1137,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
@ -1162,7 +1162,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1174,7 +1174,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1195,7 +1195,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1205,7 +1205,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1215,7 +1215,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1224,7 +1224,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1234,7 +1234,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_NEGATIVE_STARTVALUE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_NEGATIVE_STARTVALUE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1255,7 +1255,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1264,7 +1264,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1273,7 +1273,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1285,7 +1285,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "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 InfiniDB.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1296,7 +1296,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary is currently not supported by InfiniDB.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary is currently not supported by InfiniDB.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1308,7 +1308,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary length has to be between 8 and 8000.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary length has to be between 8 and 8000.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1324,7 +1324,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1342,7 +1342,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1351,7 +1351,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Unknown exception caught when checking any rows in the table.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Unknown exception caught when checking any rows in the table.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1360,7 +1360,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Table is not empty. New column has to have a default value if NOT NULL required.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Table is not empty. New column has to have a default value if NOT NULL required.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1372,7 +1372,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "New column has to have a default value if NOT NULL required.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "New column has to have a default value if NOT NULL required.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1386,7 +1386,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Varbinary column cannot have default value.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Varbinary column cannot have default value.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1409,7 +1409,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1418,7 +1418,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1428,7 +1428,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The default value is out of range for the specified data type.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The default value is out of range for the specified data type.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1448,7 +1448,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 )
{
rc = 1;
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1461,9 +1461,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
@ -1487,7 +1487,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1499,7 +1499,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1520,7 +1520,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1530,7 +1530,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1540,7 +1540,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1549,7 +1549,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1558,7 +1558,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_NEGATIVE_STARTVALUE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_NEGATIVE_STARTVALUE)).c_str());
return rc;
}
}
@ -1589,7 +1589,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 )
{
rc = 1;
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1602,9 +1602,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
@ -1632,7 +1632,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1644,7 +1644,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1662,7 +1662,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_NUMBER_AUTOINCREMENT)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1672,7 +1672,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_AUTOINCREMENT_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1681,7 +1681,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_STARTVALUE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1713,7 +1713,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1722,7 +1722,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Unknown exception caught when checking any existing null values in the column.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Unknown exception caught when checking any existing null values in the column.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1731,7 +1731,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The existing rows in this column has null value already.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The existing rows in this column has null value already.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1741,7 +1741,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1761,7 +1761,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SYNTAX)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SYNTAX)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1774,7 +1774,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{
rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Cannot execute the statement. DBRM is read only!");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Cannot execute the statement. DBRM is read only!");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1853,14 +1853,14 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
algorithm::to_upper(ddlStatement);
if (ddlStatement.find("AUTO_INCREMENT") != string::npos)
{
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "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 InfiniDB. If you wish to create an auto increment column in InfiniDB, please consult the InfiniDB SQL Syntax Guide for the correct usage.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
}
else
{
//@Bug 1888,1885. update error message
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "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 InfiniDB. Please check the InfiniDB syntax guide for supported syntax or data types.");
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
}
@ -1922,7 +1922,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
{
int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str());
return rc;
}
#endif
@ -1930,7 +1930,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
catch (runtime_error& ex)
{
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
return 1;
}
algorithm::to_upper(tablecomment);
@ -2017,7 +2017,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
if (ci.isSlaveNode)
{
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return 1;
}
@ -2027,7 +2027,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
rc = 1;
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS, args)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CONSTRAINTS, args)).c_str());
ci.alterTableState = cal_connection_info::NOT_ALTER;
ci.isAlter = false;
return rc;
@ -2047,7 +2047,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
else if ( compressiontype < 0 )
{
rc = 1;
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci.alterTableState = cal_connection_info::NOT_ALTER;
ci.isAlter = false;
return rc;
@ -2071,9 +2071,9 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
ci.alterTableState = cal_connection_info::NOT_ALTER;
ci.isAlter = false;
@ -2120,7 +2120,7 @@ int ha_calpont_impl_delete_table_(const char *name, cal_connection_info& ci)
if (ci.isSlaveNode)
{
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return 1;
}
@ -2154,7 +2154,7 @@ int ha_calpont_impl_rename_table_(const char* from, const char* to, cal_connecti
if (ci.isSlaveNode)
{
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return 1;
}
@ -2164,7 +2164,7 @@ int ha_calpont_impl_rename_table_(const char* from, const char* to, cal_connecti
if (fromPair.first != toPair.first)
{
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Both tables must be in the same database to use RENAME TABLE");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Both tables must be in the same database to use RENAME TABLE");
return -1;
}

View File

@ -713,7 +713,7 @@ int ha_calpont_impl_write_batch_row_(uchar *buf, TABLE* table, cal_impl_if::cal_
{
// We've used more null bits than allowed. Something is seriously wrong.
std::string errormsg = "Null bit header is wrong size";
setError(current_thd, HA_ERR_INTERNAL_ERROR, errormsg);
setError(current_thd, ER_INTERNAL_ERROR, errormsg);
return -1;
}

View File

@ -557,7 +557,7 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex)
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_OUTER_JOIN_SUBSELECT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText);
return -1;
}
@ -1569,6 +1569,10 @@ void setError(THD* thd, uint32_t errcode, string errmsg)
thd->get_stmt_da()->set_overwrite_status(true);
if (errmsg.empty())
errmsg = "Unknown error";
if (errcode < ER_ERROR_FIRST || errcode > ER_ERROR_LAST)
{
errcode = ER_UNKNOWN_ERROR;
}
thd->raise_error_printf(errcode, errmsg.c_str());
thd->infinidb_vtable.mysql_optimizer_off = false;
thd->infinidb_vtable.override_largeside_estimate = false;
@ -1675,11 +1679,11 @@ uint32_t setAggOp(AggregateColumn* ac, Item_sum* isp)
else if (funcName.compare("bit_xor(") == 0)
ac->aggOp(AggregateColumn::BIT_XOR);
else
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
return rc;
}
default:
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
}
@ -1945,7 +1949,7 @@ ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupp
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SELECT_SUB);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
break;
}
@ -2254,7 +2258,7 @@ ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& non
{
if (gwi.parseErrorText.empty())
gwi.parseErrorText = "Unsupported function.";
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return NULL;
}
return rc;
@ -2784,7 +2788,7 @@ FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonS
if (gwi.fatalParseError)
{
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return NULL;
}
@ -4134,8 +4138,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_ROLLUP_NOT_SUPPORT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
gwi.internalDecimalScale = (gwi.thd->variables.infinidb_use_decimal_scale ? gwi.thd->variables.infinidb_decimal_scale : -1);
@ -4210,8 +4214,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
Message::Args args;
args.add("View");
setError(gwi.thd, HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)), gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)), gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
#endif
@ -4228,9 +4232,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
SCSEP plan = fromSub.transform();
if (!plan)
{
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, fromSub.gwip().parseErrorText, gwi);
setError(gwi.thd, ER_INTERNAL_ERROR, fromSub.gwip().parseErrorText, gwi);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
gwi.derivedTbList.push_back(plan);
@ -4272,18 +4276,18 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
}
if (gwi.fatalParseError)
{
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
}
catch (IDBExcept& ie)
{
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, ie.what(), gwi);
setError(gwi.thd, ER_INTERNAL_ERROR, ie.what(), gwi);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
// @bug 3852. set error status for gwi.
gwi.fatalParseError = true;
gwi.parseErrorText = ie.what();
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
catch (...)
{
@ -4291,9 +4295,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
// @bug3852 set error status for gwi.
gwi.fatalParseError = true;
gwi.parseErrorText = emsg;
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, emsg, gwi);
setError(gwi.thd, ER_INTERNAL_ERROR, emsg, gwi);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
csep->tableList(gwi.tbList);
@ -4392,8 +4396,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
gwi.thd->infinidb_vtable.isUpdateWithDerive = true;
return -1;
}
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
}
@ -4596,9 +4600,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
}
else
{
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
delete sc;
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
break;
}
@ -4609,9 +4613,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (gwi.fatalParseError)
{
// e.g., non-support ref column
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
delete ac;
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
// add this agg col to returnedColumnList
@ -4634,16 +4638,16 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_SP_FUNCTION_NOT_SUPPORT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
if (string(ifp->func_name()) == "xor")
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
uint16_t parseInfo = 0;
@ -4657,8 +4661,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SELECT_SUB);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
ReturnedColumn* rc = buildFunctionColumn(ifp, gwi, hasNonSupportItem);
@ -4759,15 +4763,15 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
args.add(ifp->func_name());
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORTED_FUNCTION, args);
}
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
else if ( gwi.subQuery && (isPredicateFunction(ifp, &gwi) || ifp->type() == Item::COND_ITEM ))
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
//@Bug 3030 Add error check for dml statement
@ -4894,8 +4898,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SELECT_SUB);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
#ifdef DEBUG_WALK_COND
cout << "SELECT clause SUBSELECT Item: " << sub->substype() << endl;
@ -4915,8 +4919,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
if (gwi.parseErrorText.empty())
gwi.parseErrorText = "Unsupported Item in SELECT subquery.";
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
selectSubList.push_back(ssub);
SimpleColumn* rc = new SimpleColumn();
@ -4947,8 +4951,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
case Item::WINDOW_FUNC_ITEM:
{
@ -4957,8 +4961,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
if (gwi.parseErrorText.empty())
gwi.parseErrorText = "Unsupported Item in SELECT subquery.";
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
gwi.returnedCols.push_back(srcp);
break;
@ -5009,8 +5013,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
having->traverse_cond(gp_walk, &gwi, Item::POSTFIX);
if (gwi.fatalParseError)
{
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
ParseTree* ptp = 0;
@ -5045,8 +5049,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (funcFieldVec.size() != 0 && !gwi.fatalParseError)
{
string emsg("Fatal parse error in vtable mode: Unsupported Items in union or sub select unit");
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
}
@ -5067,8 +5071,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
emsg = gwi.parseErrorText;
}
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
String str;
funcFieldVec[i]->print(&str, QT_INFINIDB_NO_QUOTE);
@ -5126,8 +5130,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_WF_NOT_ALLOWED, "GROUP BY clause");
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
gwi.hasWindowFunc = hasWindowFunc;
@ -5357,8 +5361,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
else
args.add("");
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_GROUP_BY, args);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
}
@ -5428,8 +5432,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
gwi.parseErrorText = emsg;
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
}
if (ordercol->asc)
@ -5522,8 +5526,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (ac)
{
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
addToSel = true;
//continue;
@ -5539,8 +5543,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
else if (ord_item->type() == Item::SUBSELECT_ITEM)
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
else if (ord_item->type() == Item::SUM_FUNC_ITEM)
@ -5552,9 +5556,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
ac = buildAggregateColumn(ifp, gwi);
if (!ac)
{
setError(gwi.thd, HA_ERR_UNSUPPORTED,
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED,
IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY), gwi);
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
// check if this order by column is on the select list
for (uint32_t i = 0; i < gwi.returnedCols.size(); i++)
@ -5635,8 +5639,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (select_lex.options & SELECT_DISTINCT)
{
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_ORDERBY_NOT_IN_DISTINCT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
bool hasNonSupportItem = false;
uint16_t parseInfo = 0;
@ -5644,8 +5648,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (hasNonSupportItem)
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
String str;
ord_item->print(&str, QT_INFINIDB);
@ -5664,8 +5668,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (!sc)
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
String str;
fieldVec[i]->print(&str, QT_INFINIDB_NO_QUOTE);
@ -5715,16 +5719,16 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
}
catch (runtime_error& e)
{
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, e.what(), gwi);
setError(gwi.thd, ER_INTERNAL_ERROR, e.what(), gwi);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
catch (...)
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR);
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, emsg, gwi);
setError(gwi.thd, ER_INTERNAL_ERROR, emsg, gwi);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
if (!gwi.count_asterisk_list.empty() || !gwi.no_parm_func_list.empty() ||
@ -5758,9 +5762,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
} catch (...)
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR);
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, emsg, gwi);
setError(gwi.thd, ER_INTERNAL_ERROR, emsg, gwi);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
if (gwi.returnedCols.empty() && gwi.additionalRetCols.empty())
@ -5962,8 +5966,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
else if (ord_item->type() == Item::SUBSELECT_ITEM)
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
else
{
@ -6116,8 +6120,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_LIMIT_SUB);
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_INTERNAL_ERROR, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
}
@ -6159,8 +6163,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{
gwi.fatalParseError = true;
gwi.parseErrorText = "No project column found for aggregate function";
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED;
setError(gwi.thd, ER_INTERNAL_ERROR, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
(*coliter)->functionParms(minSc);
}
@ -6206,7 +6210,7 @@ int cp_get_plan(THD* thd, SCSEP& csep)
gwi.thd = thd;
int status = getSelectPlan(gwi, select_lex, csep);
if (status > 0)
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
else if (status < 0)
return status;

View File

@ -637,7 +637,7 @@ int fetchNextRow(uchar *buf, cal_table_info& ti, cal_connection_info* ci)
else if (sm_stat == sm::CALPONT_INTERNAL_ERROR)
{
ti.moreRows = false;
rc = HA_ERR_INTERNAL_ERROR;
rc = ER_INTERNAL_ERROR;
ci->rc = rc;
}
else if ((uint32_t)sm_stat == logging::ERR_LOST_CONN_EXEMGR)
@ -754,8 +754,8 @@ uint32_t doUpdateDelete(THD *thd)
if (ci->isSlaveNode && !thd->slave_thread)
{
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
//@Bug 4387. Check BRM status before start statement.
@ -765,8 +765,8 @@ uint32_t doUpdateDelete(THD *thd)
if (rc != 0 )
{
setError(current_thd, HA_ERR_GENERIC, "Cannot execute the statement. DBRM is read only!");
return HA_ERR_UNSUPPORTED;
setError(current_thd, ER_ENGINE_READ_ONLY, "Cannot execute the statement. DBRM is read only!");
return ER_CHECK_NOT_IMPLEMENTED;
}
// stats start
@ -805,8 +805,8 @@ uint32_t doUpdateDelete(THD *thd)
else
args.add("Delete");
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_VIEW, args);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
/*
@ -821,8 +821,8 @@ uint32_t doUpdateDelete(THD *thd)
Message::Args args;
args.add("Non Calpont table(s)");
string emsg(IDBErrorInfo::instance()->errorMsg(ERR_DML_NOT_SUPPORT_FEATURE, args));
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
*/
}
@ -882,7 +882,7 @@ uint32_t doUpdateDelete(THD *thd)
{
//@ Bug3326 error out for multi table update
string emsg(IDBErrorInfo::instance()->errorMsg(ERR_UPDATE_NOT_SUPPORT_FEATURE));
thd->raise_error_printf(HA_ERR_UNSUPPORTED, emsg.c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, emsg.c_str());
ci->rc = -1;
thd->set_row_count_func(0);
return -1;
@ -894,7 +894,7 @@ uint32_t doUpdateDelete(THD *thd)
return 0;
else
{
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "The statement cannot be processed without schema.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "The statement cannot be processed without schema.");
ci->rc = -1;
thd->set_row_count_func(0);
return -1;
@ -1058,9 +1058,9 @@ uint32_t doUpdateDelete(THD *thd)
}
else if (value->type() == Item::WINDOW_FUNC_ITEM)
{
setError(thd, HA_ERR_INTERNAL_ERROR,
setError(thd, ER_INTERNAL_ERROR,
logging::IDBErrorInfo::instance()->errorMsg(ERR_WF_UPDATE));
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
//return 0;
}
else
@ -1116,12 +1116,12 @@ uint32_t doUpdateDelete(THD *thd)
catch (IDBExcept &ie) {
setError(thd, HA_ERR_NO_SUCH_TABLE,
ie.what());
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
catch (std::exception&ex) {
setError(thd, HA_ERR_GENERIC,
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
ci->tableOid = roPair.objnum;
@ -1195,8 +1195,8 @@ uint32_t doUpdateDelete(THD *thd)
if (!pDMLPackage)
{
string emsg("Fatal parse error in vtable mode in DMLParser ");
setError(thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
pDMLPackage->set_TableName(tableName);
@ -1290,7 +1290,7 @@ uint32_t doUpdateDelete(THD *thd)
{
emsg = gwi.parseErrorText;
}
thd->raise_error_printf(HA_ERR_UNSUPPORTED, emsg.c_str());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, emsg.c_str());
ci->rc = -1;
thd->set_row_count_func(0);
return -1;
@ -1360,7 +1360,7 @@ uint32_t doUpdateDelete(THD *thd)
colrids = csc->columnRIDs(deleteTableName);
}
catch (IDBExcept &ie) {
thd->raise_error_printf(HA_ERR_UNSUPPORTED, ie.what());
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ie.what());
ci->rc = -1;
thd->set_row_count_func(0);
return 0;
@ -2131,20 +2131,20 @@ long long callastinsertid(UDF_INIT* initid, UDF_ARGS* args,
catch (std::exception&)
{
string msg("No such table found");
setError(thd, HA_ERR_UNSUPPORTED, msg);
setError(thd, ER_CHECK_NOT_IMPLEMENTED, msg);
return nextVal;
}
if (nextVal == AUTOINCR_SATURATED)
{
setError(thd, HA_ERR_UNSUPPORTED, IDBErrorInfo::instance()->errorMsg(ERR_EXCEED_LIMIT));
setError(thd, ER_CHECK_NOT_IMPLEMENTED, IDBErrorInfo::instance()->errorMsg(ERR_EXCEED_LIMIT));
return nextVal;
}
//@Bug 3559. Return a message for table without autoincrement column.
if (nextVal == 0)
{
string msg("Autoincrement does not exist for this table.");
setError(thd, HA_ERR_UNSUPPORTED, msg);
setError(thd, ER_CHECK_NOT_IMPLEMENTED, msg);
return nextVal;
}
@ -2350,17 +2350,17 @@ int ha_calpont_impl_rnd_init(TABLE* table)
if (bSystemQueryReady == 0)
{
// Still not ready
setError(thd, HA_ERR_INTERNAL_ERROR, "The system is not yet ready to accept queries");
setError(thd, ER_INTERNAL_ERROR, "The system is not yet ready to accept queries");
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
else
if (bSystemQueryReady < 0)
{
// Still not ready
setError(thd, HA_ERR_INTERNAL_ERROR, "DBRM is not responding. Cannot accept queries");
setError(thd, ER_INTERNAL_ERROR, "DBRM is not responding. Cannot accept queries");
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
#endif
// prevent "create table as select" from running on slave
@ -2386,7 +2386,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
// return error is error status is already set
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_ERROR)
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
// by pass the extra union trips. return 0
if (thd->infinidb_vtable.isUnion && thd->infinidb_vtable.vtable_state == THD::INFINIDB_CREATE_VTABLE)
@ -2396,9 +2396,9 @@ int ha_calpont_impl_rnd_init(TABLE* table)
// @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)
{
setError(thd, HA_ERR_UNSUPPORTED, "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 InfiniDB in this version");
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
#ifdef SKIP_INSERT_SELECT
@ -2406,8 +2406,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
{
Message::Args args;
args.add("Insert with Select");
setError(thd, HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return HA_ERR_UNSUPPORTED;
setError(thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return ER_CHECK_NOT_IMPLEMENTED;
}
#endif
@ -2495,7 +2495,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
try {
ti.conn_hndl->connect();
} catch (...) {
setError(thd, HA_ERR_INTERNAL_ERROR, IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR));
setError(thd, ER_INTERNAL_ERROR, IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR));
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto error;
}
@ -2576,7 +2576,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
try {
ci->cal_conn_hndl->connect();
} catch (...) {
setError(thd, HA_ERR_INTERNAL_ERROR, IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR));
setError(thd, ER_INTERNAL_ERROR, IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR));
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto error;
}
@ -2613,7 +2613,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
int status = cp_get_plan(thd, csep);
//if (cp_get_plan(thd, csep) != 0)
if (status > 0)
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
else if (status < 0)
return 0;
@ -2682,8 +2682,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
if (msg.length() == 0 || emsgBs.length() == 0)
{
emsg = "Lost connection to ExeMgr. Please contact your administrator";
setError(thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
string emsgStr;
emsgBs >> emsgStr;
@ -2716,8 +2716,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
}
if (err)
{
setError(thd, HA_ERR_UNSUPPORTED, emsgStr);
return HA_ERR_UNSUPPORTED;
setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsgStr);
return ER_CHECK_NOT_IMPLEMENTED;
}
rmParms.clear();
@ -2744,7 +2744,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
try {
hndl->connect();
} catch (...) {
setError(thd, HA_ERR_INTERNAL_ERROR, IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR));
setError(thd, ER_INTERNAL_ERROR, IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR));
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto error;
}
@ -2774,7 +2774,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
tableid = execplan::IDB_VTABLE_ID;
} catch (...) {
string emsg = "No table ID found for table " + string(table->s->table_name.str);
setError(thd, HA_ERR_INTERNAL_ERROR, emsg);
setError(thd, ER_INTERNAL_ERROR, emsg);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto internal_error;
}
@ -2785,14 +2785,14 @@ int ha_calpont_impl_rnd_init(TABLE* table)
} catch (std::exception& e)
{
string emsg = "table can not be opened: " + string(e.what());
setError(thd, HA_ERR_INTERNAL_ERROR, emsg);
setError(thd, ER_INTERNAL_ERROR, emsg);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto internal_error;
}
catch (...)
{
string emsg = "table can not be opened";
setError(thd, HA_ERR_INTERNAL_ERROR, emsg);
setError(thd, ER_INTERNAL_ERROR, emsg);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto internal_error;
}
@ -2831,7 +2831,7 @@ error:
ci->cal_conn_hndl = 0;
}
// do we need to close all connection handle of the table map?
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
internal_error:
if (ci->cal_conn_hndl)
@ -2839,7 +2839,7 @@ internal_error:
sm::sm_cleanup(ci->cal_conn_hndl);
ci->cal_conn_hndl = 0;
}
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
@ -2860,7 +2860,7 @@ int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_ERROR)
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
// @bug 3005
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_SELECT_VTABLE &&
string(table->s->table_name.str).find("$vtable") != 0)
@ -2877,9 +2877,9 @@ 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.
if (thd->infinidb_vtable.call_sp && (thd->lex)->sql_command != SQLCOM_ALTER_TABLE)
{
setError(thd, HA_ERR_UNSUPPORTED, "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 InfiniDB in this version");
thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
if (!thd->infinidb_vtable.cal_conn_info)
@ -2921,10 +2921,10 @@ int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
if (!thd->get_stmt_da()->is_error())
{
string emsg = "Cannot open table handle for " + string(table->s->table_name.str) + ".";
setError(thd, HA_ERR_INTERNAL_ERROR, emsg);
setError(thd, ER_INTERNAL_ERROR, emsg);
}
CalpontSystemCatalog::removeCalpontSystemCatalog(tid2sid(thd->thread_id));
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
idbassert(ti.msTablePtr == table);
@ -2934,9 +2934,9 @@ int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
} catch (std::exception& e)
{
string emsg = string("Lost connection to ExeMgr while fetching: ") + e.what();
setError(thd, HA_ERR_INTERNAL_ERROR, emsg);
setError(thd, ER_INTERNAL_ERROR, emsg);
CalpontSystemCatalog::removeCalpontSystemCatalog(tid2sid(thd->thread_id));
return HA_ERR_INTERNAL_ERROR;
return ER_INTERNAL_ERROR;
}
ci->tableMap[table] = ti;
@ -2951,11 +2951,11 @@ int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
logging::ErrorCodes errorcodes;
emsg = errorcodes.errorString(rc);
}
setError(thd, HA_ERR_INTERNAL_ERROR, emsg);
//setError(thd, HA_ERR_INTERNAL_ERROR, "testing");
setError(thd, ER_INTERNAL_ERROR, emsg);
//setError(thd, ER_INTERNAL_ERROR, "testing");
ci->stats.fErrorNo = rc;
CalpontSystemCatalog::removeCalpontSystemCatalog(tid2sid(thd->thread_id));
rc = HA_ERR_INTERNAL_ERROR;
rc = ER_INTERNAL_ERROR;
}
return rc;
@ -3073,7 +3073,7 @@ int ha_calpont_impl_rnd_end(TABLE* table)
try {
sm::tpl_scan_close(ti.tpl_scan_ctx);
} catch (...) {
rc = HA_ERR_INTERNAL_ERROR;
rc = ER_INTERNAL_ERROR;
}
}
ti.tpl_scan_ctx.reset();
@ -3094,18 +3094,18 @@ int ha_calpont_impl_rnd_end(TABLE* table)
}
else
{
setError(thd, HA_ERR_INTERNAL_ERROR, e.what());
rc = HA_ERR_INTERNAL_ERROR;
setError(thd, ER_INTERNAL_ERROR, e.what());
rc = ER_INTERNAL_ERROR;
}
}
catch (std::exception& e) {
setError(thd, HA_ERR_INTERNAL_ERROR, e.what());
rc = HA_ERR_INTERNAL_ERROR;
setError(thd, ER_INTERNAL_ERROR, e.what());
rc = ER_INTERNAL_ERROR;
}
catch (...)
{
setError(thd, HA_ERR_INTERNAL_ERROR, "Internal error throwed in rnd_end");
rc = HA_ERR_INTERNAL_ERROR;
setError(thd, ER_INTERNAL_ERROR, "Internal error throwed in rnd_end");
rc = ER_INTERNAL_ERROR;
}
}
ti.tpl_ctx = 0;
@ -3168,7 +3168,7 @@ int ha_calpont_impl_delete_table(const char *name)
if (thd->lex->sql_command == SQLCOM_DROP_DB)
{
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Non-empty database can not be dropped. ");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Non-empty database can not be dropped. ");
return 1;
}
@ -3177,7 +3177,7 @@ int ha_calpont_impl_delete_table(const char *name)
// should never get in here
if (!first_table)
{
setError(thd, HA_ERR_INTERNAL_ERROR, "Null table pointer detected when dropping table");
setError(thd, ER_INTERNAL_ERROR, "Null table pointer detected when dropping table");
return 1;
}
if (!(first_table->table && first_table->table->s && first_table->table->s->db.str))
@ -3202,7 +3202,7 @@ int ha_calpont_impl_delete_table(const char *name)
{
return 0;
}
setError(thd, HA_ERR_INTERNAL_ERROR, "Calpont system tables can only be dropped with restrict.");
setError(thd, ER_INTERNAL_ERROR, "Calpont system tables can only be dropped with restrict.");
return 1;
}
@ -3224,8 +3224,8 @@ int ha_calpont_impl_write_row(uchar *buf, TABLE* table)
Message::Args args;
args.add("Insert");
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_VIEW, args);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
}
@ -3317,7 +3317,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
if (ci->isSlaveNode && thd->infinidb_vtable.vtable_state != THD::INFINIDB_ALTER_VTABLE)
{
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return;
}
@ -3447,7 +3447,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
int localModuleId = oamcache->getLocalPMId();
if (localModuleId == 0)
{
setError(current_thd, HA_ERR_UNSUPPORTED, logging::IDBErrorInfo::instance()->errorMsg(ERR_LOCAL_QUERY_UM));
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, logging::IDBErrorInfo::instance()->errorMsg(ERR_LOCAL_QUERY_UM));
ci->singleInsert = true;
LoggingID logid( 24, tid2sid(thd->thread_id), 0);
logging::Message::Args args1;
@ -3884,7 +3884,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
if (exitCode != 0)
{
rc = 1;
setError(thd, HA_ERR_INTERNAL_ERROR, "load failed. The detailed error information is listed in InfiniDBLog.txt.");
setError(thd, ER_INTERNAL_ERROR, "load failed. The detailed error information is listed in InfiniDBLog.txt.");
}
// Close handles to the cpimport process and its primary thread.
CloseHandle(ci->cpimportProcInfo.hProcess);
@ -3916,7 +3916,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
{
string line;
getline(dmlFile, line);
setError(thd, HA_ERR_INTERNAL_ERROR, line);
setError(thd, ER_INTERNAL_ERROR, line);
dmlFile.close();
remove (oss.str().c_str());
}
@ -3932,12 +3932,12 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
{
string line;
getline(dmlFile, line);
setError(thd, HA_ERR_INTERNAL_ERROR, line);
setError(thd, ER_INTERNAL_ERROR, line);
dmlFile.close();
remove (oss.str().c_str());
}
else
setError(thd, HA_ERR_INTERNAL_ERROR, "load failed. The detailed error information is listed in err.log.");
setError(thd, ER_INTERNAL_ERROR, "load failed. The detailed error information is listed in err.log.");
}
}
}
@ -4138,7 +4138,7 @@ int ha_calpont_impl_rename_table(const char* from, const char* to)
{
#if 0
thd->get_stmt_da()->set_overwrite_status(true);
thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Syntax is not supported in InfiniDB.");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Syntax is not supported in InfiniDB.");
return 1;
#endif
}
@ -4214,9 +4214,9 @@ int ha_calpont_impl_external_lock(THD *thd, TABLE* table, int lock_type)
// @bug 3014. Error out locking table command. IDB does not support it now.
if (thd->lex->sql_command == SQLCOM_LOCK_TABLES)
{
setError(current_thd, HA_ERR_UNSUPPORTED,
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED,
logging::IDBErrorInfo::instance()->errorMsg(ERR_LOCK_TABLE));
return HA_ERR_UNSUPPORTED;
return ER_CHECK_NOT_IMPLEMENTED;
}
// @info called for every table at the beginning and at the end of a query.
@ -4233,8 +4233,8 @@ int ha_calpont_impl_external_lock(THD *thd, TABLE* table, int lock_type)
{
Message::Args args;
args.add("Insert with Select");
setError(thd, HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return HA_ERR_UNSUPPORTED;
setError(thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return ER_CHECK_NOT_IMPLEMENTED;
}
#endif
@ -4325,8 +4325,8 @@ int ha_calpont_impl_rnd_pos(uchar *buf, uchar *pos)
{
IDEBUG( cout << "ha_calpont_impl_rnd_pos" << endl);
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_ORDERBY_TOO_BIG);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg);
return HA_ERR_UNSUPPORTED;
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return ER_CHECK_NOT_IMPLEMENTED;
}
// Called from mysql parser to set IDB error for window functions
@ -4337,7 +4337,7 @@ void ha_calpont_impl_set_error(THD* thd, uint64_t errCode, LEX_STRING* args, uin
for (uint32_t i = 0; i < argCount; i++)
arguments.add(args[i].str);
string emsg = logging::IDBErrorInfo::instance()->errorMsg(errCode, arguments);
setError(thd, HA_ERR_INTERNAL_ERROR, emsg);
setError(thd, ER_INTERNAL_ERROR, emsg);
}
// vim:sw=4 ts=4:

View File

@ -981,13 +981,13 @@ const char* calshowpartitions(UDF_INIT* initid, UDF_ARGS* args,
} catch (IDBExcept& ex)
{
current_thd->get_stmt_da()->set_overwrite_status(true);
current_thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
current_thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
return result;
}
catch (...)
{
current_thd->get_stmt_da()->set_overwrite_status(true);
current_thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Error occured when calling CALSHOWPARTITIONS");
current_thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Error occured when calling CALSHOWPARTITIONS");
return result;
}
@ -1749,19 +1749,19 @@ const char* calshowpartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args,
args.add(ex.what());
errMsg = IDBErrorInfo::instance()->errorMsg(ERR_INVALID_FUNC_ARGUMENT, args);
current_thd->get_stmt_da()->set_overwrite_status(true);
current_thd->raise_error_printf(HA_ERR_UNSUPPORTED, (char*)errMsg.c_str());
current_thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (char*)errMsg.c_str());
return result;
}
catch (IDBExcept& ex)
{
current_thd->get_stmt_da()->set_overwrite_status(true);
current_thd->raise_error_printf(HA_ERR_UNSUPPORTED, ex.what());
current_thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
return result;
}
catch (...)
{
current_thd->get_stmt_da()->set_overwrite_status(true);
current_thd->raise_error_printf(HA_ERR_UNSUPPORTED, "Error occured when calling CALSHOWPARTITIONS");
current_thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, "Error occured when calling CALSHOWPARTITIONS");
return result;
}
@ -1826,7 +1826,7 @@ const char* calshowpartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args,
{
errMsg = IDBErrorInfo::instance()->errorMsg(WARN_NO_PARTITION_FOUND);
current_thd->get_stmt_da()->set_overwrite_status(true);
current_thd->raise_error_printf(HA_ERR_UNSUPPORTED, errMsg.c_str());
current_thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, errMsg.c_str());
return result;
}

View File

@ -128,20 +128,20 @@ void View::transform()
}
if (gwi.fatalParseError)
{
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText);
return;
}
}
catch (IDBExcept& ie)
{
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, ie.what());
setError(gwi.thd, ER_INTERNAL_ERROR, ie.what());
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return;
}
catch (...)
{
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR);
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, emsg);
setError(gwi.thd, ER_INTERNAL_ERROR, emsg);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return;
}

View File

@ -51,13 +51,13 @@ ReturnedColumn* nullOnError(gp_walk_info& gwi)
if (gwi.hasSubSelect)
{
gwi.parseErrorText = logging::IDBErrorInfo::instance()->errorMsg(logging::ERR_NON_SUPPORT_SELECT_SUB);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText);
}
if (gwi.parseErrorText.empty())
{
gwi.parseErrorText = logging::IDBErrorInfo::instance()->errorMsg(logging::ERR_WF_NON_SUPPORT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText);
}
return NULL;
}
@ -416,7 +416,7 @@ ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& n
{
if (gwi.parseErrorText.empty())
gwi.parseErrorText = logging::IDBErrorInfo::instance()->errorMsg(logging::ERR_WF_NON_SUPPORT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText);
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText);
return NULL;
}

Binary file not shown.