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 "ha_calpont.h"
#include "versionnumber.h" #include "versionnumber.h"
#define NEED_CALPONT_EXTERNS #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) 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 #ifdef INFINIDB_DEBUG
fprintf(stderr, "calpont_discover()\n"); fprintf(stderr, "calpont_discover()\n");
#endif #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, int calpont_discover_existence(handlerton *hton, const char *db,
const char *table_name) const char *table_name)
{ {
@ -195,7 +215,7 @@ static int calpont_init_func(void *p)
calpont_hton->state= SHOW_OPTION_YES; calpont_hton->state= SHOW_OPTION_YES;
calpont_hton->create= calpont_create_handler; calpont_hton->create= calpont_create_handler;
calpont_hton->flags= HTON_CAN_RECREATE; 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->discover_table_existence= calpont_discover_existence;
calpont_hton->commit= calpont_commit; calpont_hton->commit= calpont_commit;
calpont_hton->rollback= calpont_rollback; calpont_hton->rollback= calpont_rollback;
@ -1008,10 +1028,6 @@ int ha_calpont::create(const char *name, TABLE *table_arg,
HA_CREATE_INFO *create_info) HA_CREATE_INFO *create_info)
{ {
DBUG_ENTER("ha_calpont::create"); 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); 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; rc = 1;
thd->get_stmt_da()->set_overwrite_status(true); 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -670,7 +670,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -696,7 +696,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -709,7 +709,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -734,7 +734,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -743,7 +743,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -753,7 +753,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -774,7 +774,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 ) else if ( compressionType < 0 )
{ {
rc = 1; 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -789,9 +789,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args; Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true); thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type"); 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 #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 #endif
return rc; return rc;
} }
@ -805,7 +805,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{ {
int rc = 1; int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true); 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -819,7 +819,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -838,7 +838,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -850,7 +850,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -868,7 +868,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -880,7 +880,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -891,7 +891,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -920,7 +920,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args; Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true); thd->get_stmt_da()->set_overwrite_status(true);
args.add(autoiColName); 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -937,7 +937,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -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(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->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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -977,7 +977,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -993,7 +993,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1011,7 +1011,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1020,7 +1020,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1029,7 +1029,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1041,7 +1041,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1055,7 +1055,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1078,7 +1078,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1087,7 +1087,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1097,7 +1097,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1124,7 +1124,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 ) else if ( compressionType < 0 )
{ {
rc = 1; 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1137,9 +1137,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args; Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true); thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type"); 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 #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 #endif
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
@ -1162,7 +1162,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{ {
int rc = 1; int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true); 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1174,7 +1174,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1195,7 +1195,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1205,7 +1205,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1215,7 +1215,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1224,7 +1224,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1234,7 +1234,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1255,7 +1255,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1264,7 +1264,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1273,7 +1273,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -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(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->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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1308,7 +1308,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1324,7 +1324,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1342,7 +1342,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1351,7 +1351,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1360,7 +1360,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1372,7 +1372,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1386,7 +1386,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1409,7 +1409,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1418,7 +1418,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1428,7 +1428,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1448,7 +1448,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 ) else if ( compressionType < 0 )
{ {
rc = 1; 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1461,9 +1461,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args; Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true); thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type"); 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 #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 #endif
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
@ -1487,7 +1487,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{ {
int rc = 1; int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true); 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1499,7 +1499,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1520,7 +1520,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1530,7 +1530,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1540,7 +1540,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1549,7 +1549,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1558,7 +1558,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(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; return rc;
} }
} }
@ -1589,7 +1589,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
else if ( compressionType < 0 ) else if ( compressionType < 0 )
{ {
rc = 1; 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1602,9 +1602,9 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
Message::Args args; Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true); thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type"); 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 #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 #endif
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
@ -1632,7 +1632,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
{ {
int rc = 1; int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true); 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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1644,7 +1644,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1662,7 +1662,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1672,7 +1672,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1681,7 +1681,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1713,7 +1713,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(HA_ERR_UNSUPPORTED, ex.what()); thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, ex.what());
ci->alterTableState = cal_connection_info::NOT_ALTER; ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1722,7 +1722,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1731,7 +1731,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1741,7 +1741,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1761,7 +1761,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -1774,7 +1774,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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
return rc; return rc;
@ -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(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->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(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->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false; ci->isAlter = false;
} }
@ -1922,7 +1922,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
{ {
int rc = 1; int rc = 1;
thd->get_stmt_da()->set_overwrite_status(true); 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; return rc;
} }
#endif #endif
@ -1930,7 +1930,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
catch (runtime_error& ex) catch (runtime_error& ex)
{ {
thd->get_stmt_da()->set_overwrite_status(true); 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; return 1;
} }
algorithm::to_upper(tablecomment); 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) if (ci.isSlaveNode)
{ {
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE); 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; return 1;
} }
@ -2027,7 +2027,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
rc = 1; rc = 1;
Message::Args args; Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true); 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.alterTableState = cal_connection_info::NOT_ALTER;
ci.isAlter = false; ci.isAlter = false;
return rc; return rc;
@ -2047,7 +2047,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
else if ( compressiontype < 0 ) else if ( compressiontype < 0 )
{ {
rc = 1; 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.alterTableState = cal_connection_info::NOT_ALTER;
ci.isAlter = false; ci.isAlter = false;
return rc; return rc;
@ -2071,9 +2071,9 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
Message::Args args; Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true); thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type"); 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 #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 #endif
ci.alterTableState = cal_connection_info::NOT_ALTER; ci.alterTableState = cal_connection_info::NOT_ALTER;
ci.isAlter = false; ci.isAlter = false;
@ -2120,7 +2120,7 @@ int ha_calpont_impl_delete_table_(const char *name, cal_connection_info& ci)
if (ci.isSlaveNode) if (ci.isSlaveNode)
{ {
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE); 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; return 1;
} }
@ -2154,7 +2154,7 @@ int ha_calpont_impl_rename_table_(const char* from, const char* to, cal_connecti
if (ci.isSlaveNode) if (ci.isSlaveNode)
{ {
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE); 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; 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) if (fromPair.first != toPair.first)
{ {
thd->get_stmt_da()->set_overwrite_status(true); 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; 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. // We've used more null bits than allowed. Something is seriously wrong.
std::string errormsg = "Null bit header is wrong size"; 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; return -1;
} }

View File

@ -557,7 +557,7 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex)
{ {
gwi.fatalParseError = true; gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_OUTER_JOIN_SUBSELECT); 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; return -1;
} }
@ -1569,6 +1569,10 @@ void setError(THD* thd, uint32_t errcode, string errmsg)
thd->get_stmt_da()->set_overwrite_status(true); thd->get_stmt_da()->set_overwrite_status(true);
if (errmsg.empty()) if (errmsg.empty())
errmsg = "Unknown error"; 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->raise_error_printf(errcode, errmsg.c_str());
thd->infinidb_vtable.mysql_optimizer_off = false; thd->infinidb_vtable.mysql_optimizer_off = false;
thd->infinidb_vtable.override_largeside_estimate = 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) else if (funcName.compare("bit_xor(") == 0)
ac->aggOp(AggregateColumn::BIT_XOR); ac->aggOp(AggregateColumn::BIT_XOR);
else else
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
return rc; return rc;
} }
default: 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.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SELECT_SUB); 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; break;
} }
@ -2254,7 +2258,7 @@ ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& non
{ {
if (gwi.parseErrorText.empty()) if (gwi.parseErrorText.empty())
gwi.parseErrorText = "Unsupported function."; 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 NULL;
} }
return rc; return rc;
@ -2784,7 +2788,7 @@ FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonS
if (gwi.fatalParseError) if (gwi.fatalParseError)
{ {
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return NULL; return NULL;
} }
@ -4134,8 +4138,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{ {
gwi.fatalParseError = true; gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_ROLLUP_NOT_SUPPORT); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_ROLLUP_NOT_SUPPORT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
gwi.internalDecimalScale = (gwi.thd->variables.infinidb_use_decimal_scale ? gwi.thd->variables.infinidb_decimal_scale : -1); 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; Message::Args args;
args.add("View"); args.add("View");
setError(gwi.thd, HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)), gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)), gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
#endif #endif
@ -4228,9 +4232,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
SCSEP plan = fromSub.transform(); SCSEP plan = fromSub.transform();
if (!plan) 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
gwi.derivedTbList.push_back(plan); 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) if (gwi.fatalParseError)
{ {
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
} }
catch (IDBExcept& ie) 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
// @bug 3852. set error status for gwi. // @bug 3852. set error status for gwi.
gwi.fatalParseError = true; gwi.fatalParseError = true;
gwi.parseErrorText = ie.what(); gwi.parseErrorText = ie.what();
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
catch (...) 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. // @bug3852 set error status for gwi.
gwi.fatalParseError = true; gwi.fatalParseError = true;
gwi.parseErrorText = emsg; gwi.parseErrorText = emsg;
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, emsg, gwi); setError(gwi.thd, ER_INTERNAL_ERROR, emsg, gwi);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
csep->tableList(gwi.tbList); 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; gwi.thd->infinidb_vtable.isUpdateWithDerive = true;
return -1; return -1;
} }
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
} }
@ -4596,9 +4600,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
} }
else else
{ {
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
delete sc; delete sc;
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
break; break;
} }
@ -4609,9 +4613,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (gwi.fatalParseError) if (gwi.fatalParseError)
{ {
// e.g., non-support ref column // 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; delete ac;
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
// add this agg col to returnedColumnList // 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.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_SP_FUNCTION_NOT_SUPPORT); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_SP_FUNCTION_NOT_SUPPORT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
if (string(ifp->func_name()) == "xor") if (string(ifp->func_name()) == "xor")
{ {
gwi.fatalParseError = true; gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
uint16_t parseInfo = 0; 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.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SELECT_SUB); 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);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
ReturnedColumn* rc = buildFunctionColumn(ifp, gwi, hasNonSupportItem); 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()); args.add(ifp->func_name());
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORTED_FUNCTION, args); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORTED_FUNCTION, args);
} }
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
else if ( gwi.subQuery && (isPredicateFunction(ifp, &gwi) || ifp->type() == Item::COND_ITEM )) else if ( gwi.subQuery && (isPredicateFunction(ifp, &gwi) || ifp->type() == Item::COND_ITEM ))
{ {
gwi.fatalParseError = true; gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
//@Bug 3030 Add error check for dml statement //@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.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_SELECT_SUB); 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);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
#ifdef DEBUG_WALK_COND #ifdef DEBUG_WALK_COND
cout << "SELECT clause SUBSELECT Item: " << sub->substype() << endl; 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()) if (gwi.parseErrorText.empty())
gwi.parseErrorText = "Unsupported Item in SELECT subquery."; gwi.parseErrorText = "Unsupported Item in SELECT subquery.";
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
selectSubList.push_back(ssub); selectSubList.push_back(ssub);
SimpleColumn* rc = new SimpleColumn(); 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.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_FILTER_COND_EXP);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
case Item::WINDOW_FUNC_ITEM: 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()) if (gwi.parseErrorText.empty())
gwi.parseErrorText = "Unsupported Item in SELECT subquery."; gwi.parseErrorText = "Unsupported Item in SELECT subquery.";
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
gwi.returnedCols.push_back(srcp); gwi.returnedCols.push_back(srcp);
break; 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); having->traverse_cond(gp_walk, &gwi, Item::POSTFIX);
if (gwi.fatalParseError) if (gwi.fatalParseError)
{ {
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
ParseTree* ptp = 0; 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) if (funcFieldVec.size() != 0 && !gwi.fatalParseError)
{ {
string emsg("Fatal parse error in vtable mode: Unsupported Items in union or sub select unit"); string emsg("Fatal parse error in vtable mode: Unsupported Items in union or sub select unit");
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; 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; emsg = gwi.parseErrorText;
} }
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
String str; String str;
funcFieldVec[i]->print(&str, QT_INFINIDB_NO_QUOTE); 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.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_WF_NOT_ALLOWED, "GROUP BY clause"); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_WF_NOT_ALLOWED, "GROUP BY clause");
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
gwi.hasWindowFunc = hasWindowFunc; gwi.hasWindowFunc = hasWindowFunc;
@ -5357,8 +5361,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
else else
args.add(""); args.add("");
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_GROUP_BY, args); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_GROUP_BY, args);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; 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); string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
gwi.parseErrorText = emsg; gwi.parseErrorText = emsg;
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
} }
if (ordercol->asc) if (ordercol->asc)
@ -5522,8 +5526,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (ac) if (ac)
{ {
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
addToSel = true; addToSel = true;
//continue; //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) else if (ord_item->type() == Item::SUBSELECT_ITEM)
{ {
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
else if (ord_item->type() == Item::SUM_FUNC_ITEM) 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); ac = buildAggregateColumn(ifp, gwi);
if (!ac) if (!ac)
{ {
setError(gwi.thd, HA_ERR_UNSUPPORTED, setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED,
IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY), gwi); 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 // check if this order by column is on the select list
for (uint32_t i = 0; i < gwi.returnedCols.size(); i++) 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) if (select_lex.options & SELECT_DISTINCT)
{ {
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_ORDERBY_NOT_IN_DISTINCT); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_ORDERBY_NOT_IN_DISTINCT);
setError(gwi.thd, HA_ERR_UNSUPPORTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
bool hasNonSupportItem = false; bool hasNonSupportItem = false;
uint16_t parseInfo = 0; uint16_t parseInfo = 0;
@ -5644,8 +5648,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
if (hasNonSupportItem) if (hasNonSupportItem)
{ {
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
String str; String str;
ord_item->print(&str, QT_INFINIDB); 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) if (!sc)
{ {
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
String str; String str;
fieldVec[i]->print(&str, QT_INFINIDB_NO_QUOTE); 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) 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
catch (...) catch (...)
{ {
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR); 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
if (!gwi.count_asterisk_list.empty() || !gwi.no_parm_func_list.empty() || 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 (...) } catch (...)
{ {
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_LOST_CONN_EXEMGR); 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
if (gwi.returnedCols.empty() && gwi.additionalRetCols.empty()) 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) else if (ord_item->type() == Item::SUBSELECT_ITEM)
{ {
string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY);
setError(gwi.thd, HA_ERR_UNSUPPORTED, emsg, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
else else
{ {
@ -6116,8 +6120,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
{ {
gwi.fatalParseError = true; gwi.fatalParseError = true;
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_LIMIT_SUB); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_LIMIT_SUB);
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, gwi.parseErrorText, gwi); setError(gwi.thd, ER_INTERNAL_ERROR, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; 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.fatalParseError = true;
gwi.parseErrorText = "No project column found for aggregate function"; gwi.parseErrorText = "No project column found for aggregate function";
setError(gwi.thd, HA_ERR_INTERNAL_ERROR, gwi.parseErrorText, gwi); setError(gwi.thd, ER_INTERNAL_ERROR, gwi.parseErrorText, gwi);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
(*coliter)->functionParms(minSc); (*coliter)->functionParms(minSc);
} }
@ -6206,7 +6210,7 @@ int cp_get_plan(THD* thd, SCSEP& csep)
gwi.thd = thd; gwi.thd = thd;
int status = getSelectPlan(gwi, select_lex, csep); int status = getSelectPlan(gwi, select_lex, csep);
if (status > 0) if (status > 0)
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
else if (status < 0) else if (status < 0)
return status; 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) else if (sm_stat == sm::CALPONT_INTERNAL_ERROR)
{ {
ti.moreRows = false; ti.moreRows = false;
rc = HA_ERR_INTERNAL_ERROR; rc = ER_INTERNAL_ERROR;
ci->rc = rc; ci->rc = rc;
} }
else if ((uint32_t)sm_stat == logging::ERR_LOST_CONN_EXEMGR) 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) if (ci->isSlaveNode && !thd->slave_thread)
{ {
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE); string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg); setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
//@Bug 4387. Check BRM status before start statement. //@Bug 4387. Check BRM status before start statement.
@ -765,8 +765,8 @@ uint32_t doUpdateDelete(THD *thd)
if (rc != 0 ) if (rc != 0 )
{ {
setError(current_thd, HA_ERR_GENERIC, "Cannot execute the statement. DBRM is read only!"); setError(current_thd, ER_ENGINE_READ_ONLY, "Cannot execute the statement. DBRM is read only!");
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
// stats start // stats start
@ -805,8 +805,8 @@ uint32_t doUpdateDelete(THD *thd)
else else
args.add("Delete"); args.add("Delete");
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_VIEW, args); string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_VIEW, args);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg); setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
/* /*
@ -821,8 +821,8 @@ uint32_t doUpdateDelete(THD *thd)
Message::Args args; Message::Args args;
args.add("Non Calpont table(s)"); args.add("Non Calpont table(s)");
string emsg(IDBErrorInfo::instance()->errorMsg(ERR_DML_NOT_SUPPORT_FEATURE, args)); string emsg(IDBErrorInfo::instance()->errorMsg(ERR_DML_NOT_SUPPORT_FEATURE, args));
setError(current_thd, HA_ERR_UNSUPPORTED, emsg); setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
*/ */
} }
@ -882,7 +882,7 @@ uint32_t doUpdateDelete(THD *thd)
{ {
//@ Bug3326 error out for multi table update //@ Bug3326 error out for multi table update
string emsg(IDBErrorInfo::instance()->errorMsg(ERR_UPDATE_NOT_SUPPORT_FEATURE)); 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; ci->rc = -1;
thd->set_row_count_func(0); thd->set_row_count_func(0);
return -1; return -1;
@ -894,7 +894,7 @@ uint32_t doUpdateDelete(THD *thd)
return 0; return 0;
else 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; ci->rc = -1;
thd->set_row_count_func(0); thd->set_row_count_func(0);
return -1; return -1;
@ -1058,9 +1058,9 @@ uint32_t doUpdateDelete(THD *thd)
} }
else if (value->type() == Item::WINDOW_FUNC_ITEM) 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)); logging::IDBErrorInfo::instance()->errorMsg(ERR_WF_UPDATE));
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
//return 0; //return 0;
} }
else else
@ -1116,12 +1116,12 @@ uint32_t doUpdateDelete(THD *thd)
catch (IDBExcept &ie) { catch (IDBExcept &ie) {
setError(thd, HA_ERR_NO_SUCH_TABLE, setError(thd, HA_ERR_NO_SUCH_TABLE,
ie.what()); ie.what());
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
catch (std::exception&ex) { catch (std::exception&ex) {
setError(thd, HA_ERR_GENERIC, setError(thd, HA_ERR_GENERIC,
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what()); logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
ci->tableOid = roPair.objnum; ci->tableOid = roPair.objnum;
@ -1195,8 +1195,8 @@ uint32_t doUpdateDelete(THD *thd)
if (!pDMLPackage) if (!pDMLPackage)
{ {
string emsg("Fatal parse error in vtable mode in DMLParser "); string emsg("Fatal parse error in vtable mode in DMLParser ");
setError(thd, HA_ERR_UNSUPPORTED, emsg); setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
pDMLPackage->set_TableName(tableName); pDMLPackage->set_TableName(tableName);
@ -1290,7 +1290,7 @@ uint32_t doUpdateDelete(THD *thd)
{ {
emsg = gwi.parseErrorText; 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; ci->rc = -1;
thd->set_row_count_func(0); thd->set_row_count_func(0);
return -1; return -1;
@ -1360,7 +1360,7 @@ uint32_t doUpdateDelete(THD *thd)
colrids = csc->columnRIDs(deleteTableName); colrids = csc->columnRIDs(deleteTableName);
} }
catch (IDBExcept &ie) { 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; ci->rc = -1;
thd->set_row_count_func(0); thd->set_row_count_func(0);
return 0; return 0;
@ -2131,20 +2131,20 @@ long long callastinsertid(UDF_INIT* initid, UDF_ARGS* args,
catch (std::exception&) catch (std::exception&)
{ {
string msg("No such table found"); string msg("No such table found");
setError(thd, HA_ERR_UNSUPPORTED, msg); setError(thd, ER_CHECK_NOT_IMPLEMENTED, msg);
return nextVal; return nextVal;
} }
if (nextVal == AUTOINCR_SATURATED) 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; return nextVal;
} }
//@Bug 3559. Return a message for table without autoincrement column. //@Bug 3559. Return a message for table without autoincrement column.
if (nextVal == 0) if (nextVal == 0)
{ {
string msg("Autoincrement does not exist for this table."); string msg("Autoincrement does not exist for this table.");
setError(thd, HA_ERR_UNSUPPORTED, msg); setError(thd, ER_CHECK_NOT_IMPLEMENTED, msg);
return nextVal; return nextVal;
} }
@ -2350,17 +2350,17 @@ int ha_calpont_impl_rnd_init(TABLE* table)
if (bSystemQueryReady == 0) if (bSystemQueryReady == 0)
{ {
// Still not ready // 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; thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
else else
if (bSystemQueryReady < 0) if (bSystemQueryReady < 0)
{ {
// Still not ready // 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; thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
#endif #endif
// prevent "create table as select" from running on slave // 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 // return error is error status is already set
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_ERROR) 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 // by pass the extra union trips. return 0
if (thd->infinidb_vtable.isUnion && thd->infinidb_vtable.vtable_state == THD::INFINIDB_CREATE_VTABLE) 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. // @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, 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; thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
#ifdef SKIP_INSERT_SELECT #ifdef SKIP_INSERT_SELECT
@ -2406,8 +2406,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
{ {
Message::Args args; Message::Args args;
args.add("Insert with Select"); args.add("Insert with Select");
setError(thd, HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args))); setError(thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
#endif #endif
@ -2495,7 +2495,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
try { try {
ti.conn_hndl->connect(); ti.conn_hndl->connect();
} catch (...) { } 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto error; goto error;
} }
@ -2576,7 +2576,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
try { try {
ci->cal_conn_hndl->connect(); ci->cal_conn_hndl->connect();
} catch (...) { } 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto error; goto error;
} }
@ -2613,7 +2613,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
int status = cp_get_plan(thd, csep); int status = cp_get_plan(thd, csep);
//if (cp_get_plan(thd, csep) != 0) //if (cp_get_plan(thd, csep) != 0)
if (status > 0) if (status > 0)
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
else if (status < 0) else if (status < 0)
return 0; return 0;
@ -2682,8 +2682,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
if (msg.length() == 0 || emsgBs.length() == 0) if (msg.length() == 0 || emsgBs.length() == 0)
{ {
emsg = "Lost connection to ExeMgr. Please contact your administrator"; emsg = "Lost connection to ExeMgr. Please contact your administrator";
setError(thd, HA_ERR_UNSUPPORTED, emsg); setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
string emsgStr; string emsgStr;
emsgBs >> emsgStr; emsgBs >> emsgStr;
@ -2716,8 +2716,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
} }
if (err) if (err)
{ {
setError(thd, HA_ERR_UNSUPPORTED, emsgStr); setError(thd, ER_CHECK_NOT_IMPLEMENTED, emsgStr);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
rmParms.clear(); rmParms.clear();
@ -2744,7 +2744,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
try { try {
hndl->connect(); hndl->connect();
} catch (...) { } 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto error; goto error;
} }
@ -2774,7 +2774,7 @@ int ha_calpont_impl_rnd_init(TABLE* table)
tableid = execplan::IDB_VTABLE_ID; tableid = execplan::IDB_VTABLE_ID;
} catch (...) { } catch (...) {
string emsg = "No table ID found for table " + string(table->s->table_name.str); 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto internal_error; goto internal_error;
} }
@ -2785,14 +2785,14 @@ int ha_calpont_impl_rnd_init(TABLE* table)
} catch (std::exception& e) } catch (std::exception& e)
{ {
string emsg = "table can not be opened: " + string(e.what()); 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); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto internal_error; goto internal_error;
} }
catch (...) catch (...)
{ {
string emsg = "table can not be opened"; string emsg = "table can not be opened";
setError(thd, HA_ERR_INTERNAL_ERROR, emsg); setError(thd, ER_INTERNAL_ERROR, emsg);
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID); CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
goto internal_error; goto internal_error;
} }
@ -2831,7 +2831,7 @@ error:
ci->cal_conn_hndl = 0; ci->cal_conn_hndl = 0;
} }
// do we need to close all connection handle of the table map? // do we need to close all connection handle of the table map?
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
internal_error: internal_error:
if (ci->cal_conn_hndl) if (ci->cal_conn_hndl)
@ -2839,7 +2839,7 @@ internal_error:
sm::sm_cleanup(ci->cal_conn_hndl); sm::sm_cleanup(ci->cal_conn_hndl);
ci->cal_conn_hndl = 0; ci->cal_conn_hndl = 0;
} }
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table) 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) if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_ERROR)
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
// @bug 3005 // @bug 3005
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_SELECT_VTABLE && if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_SELECT_VTABLE &&
string(table->s->table_name.str).find("$vtable") != 0) 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. // @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, 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; thd->infinidb_vtable.vtable_state = THD::INFINIDB_ERROR;
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
if (!thd->infinidb_vtable.cal_conn_info) 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()) if (!thd->get_stmt_da()->is_error())
{ {
string emsg = "Cannot open table handle for " + string(table->s->table_name.str) + "."; 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)); CalpontSystemCatalog::removeCalpontSystemCatalog(tid2sid(thd->thread_id));
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
idbassert(ti.msTablePtr == table); idbassert(ti.msTablePtr == table);
@ -2934,9 +2934,9 @@ int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
} catch (std::exception& e) } catch (std::exception& e)
{ {
string emsg = string("Lost connection to ExeMgr while fetching: ") + e.what(); 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)); CalpontSystemCatalog::removeCalpontSystemCatalog(tid2sid(thd->thread_id));
return HA_ERR_INTERNAL_ERROR; return ER_INTERNAL_ERROR;
} }
ci->tableMap[table] = ti; ci->tableMap[table] = ti;
@ -2951,11 +2951,11 @@ int ha_calpont_impl_rnd_next(uchar *buf, TABLE* table)
logging::ErrorCodes errorcodes; logging::ErrorCodes errorcodes;
emsg = errorcodes.errorString(rc); emsg = errorcodes.errorString(rc);
} }
setError(thd, HA_ERR_INTERNAL_ERROR, emsg); setError(thd, ER_INTERNAL_ERROR, emsg);
//setError(thd, HA_ERR_INTERNAL_ERROR, "testing"); //setError(thd, ER_INTERNAL_ERROR, "testing");
ci->stats.fErrorNo = rc; ci->stats.fErrorNo = rc;
CalpontSystemCatalog::removeCalpontSystemCatalog(tid2sid(thd->thread_id)); CalpontSystemCatalog::removeCalpontSystemCatalog(tid2sid(thd->thread_id));
rc = HA_ERR_INTERNAL_ERROR; rc = ER_INTERNAL_ERROR;
} }
return rc; return rc;
@ -3073,7 +3073,7 @@ int ha_calpont_impl_rnd_end(TABLE* table)
try { try {
sm::tpl_scan_close(ti.tpl_scan_ctx); sm::tpl_scan_close(ti.tpl_scan_ctx);
} catch (...) { } catch (...) {
rc = HA_ERR_INTERNAL_ERROR; rc = ER_INTERNAL_ERROR;
} }
} }
ti.tpl_scan_ctx.reset(); ti.tpl_scan_ctx.reset();
@ -3094,18 +3094,18 @@ int ha_calpont_impl_rnd_end(TABLE* table)
} }
else else
{ {
setError(thd, HA_ERR_INTERNAL_ERROR, e.what()); setError(thd, ER_INTERNAL_ERROR, e.what());
rc = HA_ERR_INTERNAL_ERROR; rc = ER_INTERNAL_ERROR;
} }
} }
catch (std::exception& e) { catch (std::exception& e) {
setError(thd, HA_ERR_INTERNAL_ERROR, e.what()); setError(thd, ER_INTERNAL_ERROR, e.what());
rc = HA_ERR_INTERNAL_ERROR; rc = ER_INTERNAL_ERROR;
} }
catch (...) catch (...)
{ {
setError(thd, HA_ERR_INTERNAL_ERROR, "Internal error throwed in rnd_end"); setError(thd, ER_INTERNAL_ERROR, "Internal error throwed in rnd_end");
rc = HA_ERR_INTERNAL_ERROR; rc = ER_INTERNAL_ERROR;
} }
} }
ti.tpl_ctx = 0; 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) if (thd->lex->sql_command == SQLCOM_DROP_DB)
{ {
thd->get_stmt_da()->set_overwrite_status(true); 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; return 1;
} }
@ -3177,7 +3177,7 @@ int ha_calpont_impl_delete_table(const char *name)
// should never get in here // should never get in here
if (!first_table) 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; return 1;
} }
if (!(first_table->table && first_table->table->s && first_table->table->s->db.str)) 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; 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; return 1;
} }
@ -3224,8 +3224,8 @@ int ha_calpont_impl_write_row(uchar *buf, TABLE* table)
Message::Args args; Message::Args args;
args.add("Insert"); args.add("Insert");
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_VIEW, args); string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_VIEW, args);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg); setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; 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) if (ci->isSlaveNode && thd->infinidb_vtable.vtable_state != THD::INFINIDB_ALTER_VTABLE)
{ {
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_DML_DDL_SLAVE); 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; return;
} }
@ -3447,7 +3447,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
int localModuleId = oamcache->getLocalPMId(); int localModuleId = oamcache->getLocalPMId();
if (localModuleId == 0) 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; ci->singleInsert = true;
LoggingID logid( 24, tid2sid(thd->thread_id), 0); LoggingID logid( 24, tid2sid(thd->thread_id), 0);
logging::Message::Args args1; logging::Message::Args args1;
@ -3884,7 +3884,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
if (exitCode != 0) if (exitCode != 0)
{ {
rc = 1; 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. // Close handles to the cpimport process and its primary thread.
CloseHandle(ci->cpimportProcInfo.hProcess); CloseHandle(ci->cpimportProcInfo.hProcess);
@ -3916,7 +3916,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
{ {
string line; string line;
getline(dmlFile, line); getline(dmlFile, line);
setError(thd, HA_ERR_INTERNAL_ERROR, line); setError(thd, ER_INTERNAL_ERROR, line);
dmlFile.close(); dmlFile.close();
remove (oss.str().c_str()); remove (oss.str().c_str());
} }
@ -3932,12 +3932,12 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
{ {
string line; string line;
getline(dmlFile, line); getline(dmlFile, line);
setError(thd, HA_ERR_INTERNAL_ERROR, line); setError(thd, ER_INTERNAL_ERROR, line);
dmlFile.close(); dmlFile.close();
remove (oss.str().c_str()); remove (oss.str().c_str());
} }
else 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 #if 0
thd->get_stmt_da()->set_overwrite_status(true); 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; return 1;
#endif #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. // @bug 3014. Error out locking table command. IDB does not support it now.
if (thd->lex->sql_command == SQLCOM_LOCK_TABLES) 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)); 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. // @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; Message::Args args;
args.add("Insert with Select"); args.add("Insert with Select");
setError(thd, HA_ERR_UNSUPPORTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args))); setError(thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
#endif #endif
@ -4325,8 +4325,8 @@ int ha_calpont_impl_rnd_pos(uchar *buf, uchar *pos)
{ {
IDEBUG( cout << "ha_calpont_impl_rnd_pos" << endl); IDEBUG( cout << "ha_calpont_impl_rnd_pos" << endl);
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_ORDERBY_TOO_BIG); string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_ORDERBY_TOO_BIG);
setError(current_thd, HA_ERR_UNSUPPORTED, emsg); setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
return HA_ERR_UNSUPPORTED; return ER_CHECK_NOT_IMPLEMENTED;
} }
// Called from mysql parser to set IDB error for window functions // 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++) for (uint32_t i = 0; i < argCount; i++)
arguments.add(args[i].str); arguments.add(args[i].str);
string emsg = logging::IDBErrorInfo::instance()->errorMsg(errCode, arguments); 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: // vim:sw=4 ts=4:

View File

@ -981,13 +981,13 @@ const char* calshowpartitions(UDF_INIT* initid, UDF_ARGS* args,
} catch (IDBExcept& ex) } catch (IDBExcept& ex)
{ {
current_thd->get_stmt_da()->set_overwrite_status(true); 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; return result;
} }
catch (...) catch (...)
{ {
current_thd->get_stmt_da()->set_overwrite_status(true); 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; return result;
} }
@ -1749,19 +1749,19 @@ const char* calshowpartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args,
args.add(ex.what()); args.add(ex.what());
errMsg = IDBErrorInfo::instance()->errorMsg(ERR_INVALID_FUNC_ARGUMENT, args); errMsg = IDBErrorInfo::instance()->errorMsg(ERR_INVALID_FUNC_ARGUMENT, args);
current_thd->get_stmt_da()->set_overwrite_status(true); 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; return result;
} }
catch (IDBExcept& ex) catch (IDBExcept& ex)
{ {
current_thd->get_stmt_da()->set_overwrite_status(true); 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; return result;
} }
catch (...) catch (...)
{ {
current_thd->get_stmt_da()->set_overwrite_status(true); 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; return result;
} }
@ -1826,7 +1826,7 @@ const char* calshowpartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args,
{ {
errMsg = IDBErrorInfo::instance()->errorMsg(WARN_NO_PARTITION_FOUND); errMsg = IDBErrorInfo::instance()->errorMsg(WARN_NO_PARTITION_FOUND);
current_thd->get_stmt_da()->set_overwrite_status(true); 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; return result;
} }

View File

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

View File

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

Binary file not shown.