MCPcopy Create free account
hub / github.com/apache/cloudberry / ECPGget_sqlca

Function ECPGget_sqlca

src/interfaces/ecpg/ecpglib/misc.c:140–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138#endif
139
140struct sqlca_t *
141ECPGget_sqlca(void)
142{
143#ifdef ENABLE_THREAD_SAFETY
144 struct sqlca_t *sqlca;
145
146 pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
147
148 sqlca = pthread_getspecific(sqlca_key);
149 if (sqlca == NULL)
150 {
151 sqlca = malloc(sizeof(struct sqlca_t));
152 if (sqlca == NULL)
153 return NULL;
154 ecpg_init_sqlca(sqlca);
155 pthread_setspecific(sqlca_key, sqlca);
156 }
157 return sqlca;
158#else
159 return &sqlca;
160#endif
161}
162
163bool
164ECPGstatus(int lineno, const char *connection_name)

Callers 15

ECPGnoticeReceiverFunction · 0.85
ECPGconnectFunction · 0.85
ECPGdisconnectFunction · 0.85
ecpg_raiseFunction · 0.85
ecpg_raise_backendFunction · 0.85
sqlprintFunction · 0.85
ecpg_get_dataFunction · 0.85
ECPGget_desc_headerFunction · 0.85
ECPGget_descFunction · 0.85
ECPGdeallocate_descFunction · 0.85
ECPGallocate_descFunction · 0.85
ecpg_process_outputFunction · 0.85

Calls 3

pthread_getspecificFunction · 0.85
ecpg_init_sqlcaFunction · 0.85
pthread_setspecificFunction · 0.85

Tested by

no test coverage detected