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

Function fn

src/interfaces/ecpg/test/expected/thread-alloc.c:127–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125static unsigned __stdcall fn(void* arg)
126#else
127static void* fn(void* arg)
128#endif
129{
130 int i;
131
132 /* exec sql begin declare section */
133
134
135
136
137#line 41 "alloc.pgc"
138 int value ;
139
140#line 42 "alloc.pgc"
141 char name [ 100 ] ;
142
143#line 43 "alloc.pgc"
144 char ** r = NULL ;
145/* exec sql end declare section */
146#line 44 "alloc.pgc"
147
148
149 value = (intptr_t) arg;
150 sprintf(name, "Connection: %d", value);
151
152 { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , name, 0);
153#line 49 "alloc.pgc"
154
155if (sqlca.sqlcode < 0) sqlprint();}
156#line 49 "alloc.pgc"
157
158 { ECPGsetcommit(__LINE__, "on", NULL);
159#line 50 "alloc.pgc"
160
161if (sqlca.sqlcode < 0) sqlprint();}
162#line 50 "alloc.pgc"
163
164 for (i = 1; i <= REPEATS; ++i)
165 {
166 { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select relname from pg_class where relname = 'pg_class'", ECPGt_EOIT,
167 ECPGt_char,&(r),(long)0,(long)0,(1)*sizeof(char),
168 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
169#line 53 "alloc.pgc"
170
171if (sqlca.sqlcode == ECPG_NOT_FOUND) sqlprint();
172#line 53 "alloc.pgc"
173
174if (sqlca.sqlcode < 0) sqlprint();}
175#line 53 "alloc.pgc"
176
177 free(r);
178 r = NULL;
179 }
180 { ECPGdisconnect(__LINE__, name);
181#line 57 "alloc.pgc"
182
183if (sqlca.sqlcode < 0) sqlprint();}
184#line 57 "alloc.pgc"

Callers

nothing calls this directly

Calls 5

ECPGconnectFunction · 0.85
sqlprintFunction · 0.85
ECPGsetcommitFunction · 0.85
ECPGdoFunction · 0.85
ECPGdisconnectFunction · 0.85

Tested by

no test coverage detected