mirror of https://github.com/citusdata/citus.git
CurrentDatabaseName: return const char* as we're borrowing from cache
parent
cc1c398d87
commit
50c5e814c8
|
@ -846,7 +846,7 @@ TrackerConnectPoll(TaskTracker *taskTracker)
|
|||
{
|
||||
char *nodeName = taskTracker->workerName;
|
||||
uint32 nodePort = taskTracker->workerPort;
|
||||
char *nodeDatabase = CurrentDatabaseName();
|
||||
const char *nodeDatabase = CurrentDatabaseName();
|
||||
char *nodeUser = taskTracker->userName;
|
||||
|
||||
int32 connectionId = MultiClientConnectStart(nodeName, nodePort,
|
||||
|
|
|
@ -2281,7 +2281,7 @@ CitusTableVisibleFuncId(void)
|
|||
* one session connected to it, we do not need to implement any invalidation
|
||||
* mechanism.
|
||||
*/
|
||||
char *
|
||||
const char *
|
||||
CurrentDatabaseName(void)
|
||||
{
|
||||
if (!MetadataCache.databaseNameValid)
|
||||
|
|
|
@ -517,7 +517,7 @@ ExplainTaskPlacement(ShardPlacement *taskPlacement, List *explainOutputList,
|
|||
StringInfo nodeAddress = makeStringInfo();
|
||||
char *nodeName = taskPlacement->nodeName;
|
||||
uint32 nodePort = taskPlacement->nodePort;
|
||||
char *nodeDatabase = CurrentDatabaseName();
|
||||
const char *nodeDatabase = CurrentDatabaseName();
|
||||
ListCell *explainOutputCell = NULL;
|
||||
int rowIndex = 0;
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ CreateJobSchema(StringInfo schemaName)
|
|||
static void
|
||||
CreateTask(uint64 jobId, uint32 taskId, char *taskCallString)
|
||||
{
|
||||
char *databaseName = CurrentDatabaseName();
|
||||
const char *databaseName = CurrentDatabaseName();
|
||||
char *userName = CurrentUserName();
|
||||
|
||||
/* increase task priority for cleanup tasks */
|
||||
|
|
|
@ -238,7 +238,7 @@ ReceiveRegularFile(const char *nodeName, uint32 nodePort, const char *nodeUser,
|
|||
}
|
||||
|
||||
/* we use the same database name on the master and worker nodes */
|
||||
char *nodeDatabase = CurrentDatabaseName();
|
||||
const char *nodeDatabase = CurrentDatabaseName();
|
||||
|
||||
/* connect to remote node */
|
||||
int32 connectionId = MultiClientConnect(nodeName, nodePort, nodeDatabase, nodeUser);
|
||||
|
|
|
@ -216,7 +216,7 @@ extern Oid BinaryCopyFormatId(void);
|
|||
extern Oid CitusExtensionOwner(void);
|
||||
extern char * CitusExtensionOwnerName(void);
|
||||
extern char * CurrentUserName(void);
|
||||
extern char * CurrentDatabaseName(void);
|
||||
extern const char * CurrentDatabaseName(void);
|
||||
|
||||
|
||||
#endif /* METADATA_CACHE_H */
|
||||
|
|
Loading…
Reference in New Issue