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

fix(writeengine) MCOL-4202: use schema name when renaming table and change it's fields in syscat

This commit is contained in:
Leonid Fedorov
2023-12-06 21:05:51 +00:00
committed by Leonid Fedorov
parent a9ab71e675
commit 97abd9866b
12 changed files with 214 additions and 657 deletions

View File

@@ -1899,7 +1899,7 @@ void AlterTableProcessor::renameTable(uint32_t sessionID, execplan::CalpontSyste
boost::shared_ptr<CalpontSystemCatalog> systemCatalogPtr =
CalpontSystemCatalog::makeCalpontSystemCatalog(sessionID);
execplan::CalpontSystemCatalog::TableName tableName;
tableName.schema = fTableName.fSchema;
tableName.schema = ataRenameTable.fQualifiedName->fSchema;
tableName.table = ataRenameTable.fQualifiedName->fName;
execplan::CalpontSystemCatalog::ROPair roPair;
roPair.objnum = 0;
@@ -1924,6 +1924,7 @@ void AlterTableProcessor::renameTable(uint32_t sessionID, execplan::CalpontSyste
bytestream << fTableName.fSchema;
bytestream << fTableName.fName;
bytestream << ataRenameTable.fQualifiedName->fName;
bytestream << ataRenameTable.fQualifiedName->fSchema;
std::string errorMsg;
uint16_t dbRoot;
@@ -1997,6 +1998,7 @@ void AlterTableProcessor::renameTable(uint32_t sessionID, execplan::CalpontSyste
bytestream << fTableName.fSchema;
bytestream << fTableName.fName;
bytestream << ataRenameTable.fQualifiedName->fName;
bytestream << ataRenameTable.fQualifiedName->fSchema;
sysOid = 1021;
// Find out where syscolumn is
rc = fDbrm->getSysCatDBRoot(sysOid, dbRoot);