You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
Convert some more error codes
This commit is contained in:
@@ -329,7 +329,7 @@ int doProcessInsertValues ( TABLE* table, uint32_t size, cal_connection_info& ci
|
|||||||
table->s->db.str, size, ci.colNameList.size(), ci.colNameList,
|
table->s->db.str, size, ci.colNameList.size(), ci.colNameList,
|
||||||
ci.tableValuesMap, sessionID);
|
ci.tableValuesMap, sessionID);
|
||||||
|
|
||||||
CalpontDMLPackage* pDMLPackage = CalpontDMLFactory::makeCalpontDMLPackageFromMysqlBuffer(dmlStmts);
|
CalpontDMLPackage* pDMLPackage = CalpontDMLFactory::makeCalpontDMLPackageFromMysqlBuffer(dmlStmts);
|
||||||
//@Bug 2466 Move the clean up earlier to avoid the second insert in another session to get the data
|
//@Bug 2466 Move the clean up earlier to avoid the second insert in another session to get the data
|
||||||
ci.tableValuesMap.clear();
|
ci.tableValuesMap.clear();
|
||||||
ci.colNameList.clear();
|
ci.colNameList.clear();
|
||||||
|
@@ -1114,14 +1114,14 @@ uint32_t doUpdateDelete(THD *thd)
|
|||||||
roPair = csc->tableRID( aTableName );
|
roPair = csc->tableRID( aTableName );
|
||||||
}
|
}
|
||||||
catch (IDBExcept &ie) {
|
catch (IDBExcept &ie) {
|
||||||
setError(thd, HA_ERR_NO_SUCH_TABLE,
|
setError(thd, ER_UNKNOWN_TABLE,
|
||||||
ie.what());
|
ie.what());
|
||||||
return ER_CHECK_NOT_IMPLEMENTED;
|
return ER_UNKNOWN_TABLE;
|
||||||
}
|
}
|
||||||
catch (std::exception&ex) {
|
catch (std::exception&ex) {
|
||||||
setError(thd, HA_ERR_GENERIC,
|
setError(thd, ER_INTERNAL_ERROR,
|
||||||
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
|
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
|
||||||
return ER_CHECK_NOT_IMPLEMENTED;
|
return ER_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
ci->tableOid = roPair.objnum;
|
ci->tableOid = roPair.objnum;
|
||||||
@@ -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, ER_CHECK_NOT_IMPLEMENTED, emsg);
|
setError(thd, ER_INTERNAL_ERROR, emsg);
|
||||||
return ER_CHECK_NOT_IMPLEMENTED;
|
return ER_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
string emsgStr;
|
string emsgStr;
|
||||||
emsgBs >> emsgStr;
|
emsgBs >> emsgStr;
|
||||||
@@ -3320,7 +3320,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
//@bug 4771. reject REPLACE key word
|
//@bug 4771. reject REPLACE key word
|
||||||
if ((thd->lex)->sql_command == SQLCOM_REPLACE_SELECT)
|
if ((thd->lex)->sql_command == SQLCOM_REPLACE_SELECT)
|
||||||
{
|
{
|
||||||
setError(current_thd, HA_ERR_GENERIC, "REPLACE statement is not supported in infinidb.");
|
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, "REPLACE statement is not supported in infinidb.");
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<CalpontSystemCatalog> csc = CalpontSystemCatalog::makeCalpontSystemCatalog(tid2sid(thd->thread_id));
|
boost::shared_ptr<CalpontSystemCatalog> csc = CalpontSystemCatalog::makeCalpontSystemCatalog(tid2sid(thd->thread_id));
|
||||||
@@ -3339,7 +3339,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
found = insertStmt.find("ignore");
|
found = insertStmt.find("ignore");
|
||||||
if (found!=string::npos)
|
if (found!=string::npos)
|
||||||
{
|
{
|
||||||
setError(current_thd, HA_ERR_GENERIC, "IGNORE option in insert statement is not supported in infinidb.");
|
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, "IGNORE option in insert statement is not supported in infinidb.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( rows > 1 )
|
if ( rows > 1 )
|
||||||
@@ -3376,7 +3376,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
colrids = csc->columnRIDs(tableName);
|
colrids = csc->columnRIDs(tableName);
|
||||||
}
|
}
|
||||||
catch (IDBExcept &ie) {
|
catch (IDBExcept &ie) {
|
||||||
setError(thd, HA_ERR_NO_SUCH_TABLE, ie.what());
|
setError(thd, ER_UNKNOWN_TABLE, ie.what());
|
||||||
ci->rc = 5;
|
ci->rc = 5;
|
||||||
ci->singleInsert = true;
|
ci->singleInsert = true;
|
||||||
return;
|
return;
|
||||||
@@ -3604,7 +3604,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss <<" : Error in " << pSectionMsg << " (errno-" <<
|
oss <<" : Error in " << pSectionMsg << " (errno-" <<
|
||||||
errnum << "); " << errmsg;
|
errnum << "); " << errmsg;
|
||||||
setError(current_thd, HA_ERR_GENERIC, oss.str());
|
setError(current_thd, ER_INTERNAL_ERROR, oss.str());
|
||||||
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, args2;
|
logging::Message::Args args1, args2;
|
||||||
@@ -3632,7 +3632,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss <<" : Error in creating pipe (errno-" <<
|
oss <<" : Error in creating pipe (errno-" <<
|
||||||
errnum << "); " << strerror(errnum);
|
errnum << "); " << strerror(errnum);
|
||||||
setError(current_thd, HA_ERR_GENERIC, oss.str());
|
setError(current_thd, ER_INTERNAL_ERROR, oss.str());
|
||||||
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;
|
||||||
@@ -3652,7 +3652,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss << " : Error in forking cpimport.bin (errno-" <<
|
oss << " : Error in forking cpimport.bin (errno-" <<
|
||||||
errnum << "); " << strerror(errnum);
|
errnum << "); " << strerror(errnum);
|
||||||
setError(current_thd, HA_ERR_GENERIC, oss.str());
|
setError(current_thd, ER_INTERNAL_ERROR, oss.str());
|
||||||
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;
|
||||||
@@ -3673,7 +3673,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
if (dup2(ci->fdt[0], 0) < 0) //make stdin be the reading end of the pipe
|
if (dup2(ci->fdt[0], 0) < 0) //make stdin be the reading end of the pipe
|
||||||
{
|
{
|
||||||
setError(current_thd, HA_ERR_GENERIC, "dup2 failed");
|
setError(current_thd, ER_INTERNAL_ERROR, "dup2 failed");
|
||||||
ci->singleInsert = true;
|
ci->singleInsert = true;
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
@@ -3692,7 +3692,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
"; Check file and try invoking locally.";
|
"; Check file and try invoking locally.";
|
||||||
cout << oss.str();
|
cout << oss.str();
|
||||||
|
|
||||||
setError(current_thd, HA_ERR_GENERIC, "Forking process cpimport failed.");
|
setError(current_thd, ER_INTERNAL_ERROR, "Forking process cpimport failed.");
|
||||||
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;
|
||||||
@@ -3760,7 +3760,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
int rc = dbrmp->isReadWrite();
|
int rc = dbrmp->isReadWrite();
|
||||||
if (rc != 0 )
|
if (rc != 0 )
|
||||||
{
|
{
|
||||||
setError(current_thd, HA_ERR_GENERIC, "Cannot execute the statement. DBRM is read only!");
|
setError(current_thd, ER_READ_ONLY_MODE, "Cannot execute the statement. DBRM is read only!");
|
||||||
ci->rc = rc;
|
ci->rc = rc;
|
||||||
ci->singleInsert = true;
|
ci->singleInsert = true;
|
||||||
return;
|
return;
|
||||||
@@ -3774,11 +3774,11 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
|||||||
ci->tableOid = roPair.objnum;
|
ci->tableOid = roPair.objnum;
|
||||||
}
|
}
|
||||||
catch (IDBExcept &ie) {
|
catch (IDBExcept &ie) {
|
||||||
setError(thd, HA_ERR_NO_SUCH_TABLE,
|
setError(thd, ER_UNKNOWN_TABLE,
|
||||||
ie.what());
|
ie.what());
|
||||||
}
|
}
|
||||||
catch (std::exception& ex) {
|
catch (std::exception& ex) {
|
||||||
setError(thd, HA_ERR_GENERIC,
|
setError(thd, ER_INTERNAL_ERROR,
|
||||||
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
|
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user