1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge pull request #1329 from dhall-MariaDB/MCOL-4126

Mcol 4126
This commit is contained in:
Gagan Goel
2020-07-08 13:37:52 -04:00
committed by GitHub

View File

@ -1605,25 +1605,6 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
aTableName.table = first_table->table->s->table_name.str;
}
CalpontSystemCatalog::ROPair roPair;
try
{
roPair = csc->tableRID( aTableName );
}
catch (IDBExcept& ie)
{
setError(thd, ER_INTERNAL_ERROR, ie.what());
return ER_INTERNAL_ERROR;
}
catch (std::exception& ex)
{
setError(thd, ER_INTERNAL_ERROR,
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
return ER_INTERNAL_ERROR;
}
ci->tableOid = roPair.objnum;
CalpontDMLPackage* pDMLPackage = 0;
// dmlStmt += ";";
IDEBUG( cout << "STMT: " << dmlStmt << " and sessionID " << thd->thread_id << endl );
@ -1670,7 +1651,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
thd->raise_error_printf(ER_INTERNAL_ERROR, emsg.c_str());
ci->rc = 1;
thd->set_row_count_func(0);
return 0;
return 1;
}
}
else
@ -1734,7 +1715,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
thd->raise_error_printf(ER_INTERNAL_ERROR, emsg.c_str());
ci->rc = 1;
thd->set_row_count_func(0);
return 0;
return 1;
}
{
@ -1884,7 +1865,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
thd->raise_error_printf(ER_INTERNAL_ERROR, ie.what());
ci->rc = -1;
thd->set_row_count_func(0);
return 0;
return -1;
}
int minColWidth = -1;
@ -1968,6 +1949,25 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
//querystats::QueryStats stats;
string tableLockInfo;
// Save the tableOid for the COMMIT | ROLLBACK
CalpontSystemCatalog::ROPair roPair;
try
{
roPair = csc->tableRID( aTableName );
}
catch (IDBExcept& ie)
{
setError(thd, ER_INTERNAL_ERROR, ie.what());
return ER_INTERNAL_ERROR;
}
catch (std::exception& ex)
{
setError(thd, ER_INTERNAL_ERROR,
logging::IDBErrorInfo::instance()->errorMsg(ERR_SYSTEM_CATALOG) + ex.what());
return ER_INTERNAL_ERROR;
}
ci->tableOid = roPair.objnum;
// Send the request to DMLProc and wait for a response.
try
{
@ -2196,6 +2196,9 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
errorMsg = "Unknown error caught";
b = 1;
}
// Clear tableOid for the next SQL statement
ci->tableOid = 0;
}
}