PostgreSQL Source Code  git master
misc.c File Reference
#include "postgres_fe.h"
#include <limits.h>
#include <unistd.h>
#include "ecpg-pthread-win32.h"
#include "ecpgerrno.h"
#include "ecpglib.h"
#include "ecpglib_extern.h"
#include "ecpgtype.h"
#include "pg_config_paths.h"
#include "pgtypes_date.h"
#include "pgtypes_interval.h"
#include "pgtypes_numeric.h"
#include "pgtypes_timestamp.h"
#include "sqlca.h"
Include dependency graph for misc.c:

Go to the source code of this file.

Macros

#define POSTGRES_ECPG_INTERNAL
 
#define LONG_LONG_MIN   LONGLONG_MIN
 

Functions

void ecpg_init_sqlca (struct sqlca_t *sqlca)
 
bool ecpg_init (const struct connection *con, const char *connection_name, const int lineno)
 
struct sqlca_tECPGget_sqlca (void)
 
bool ECPGstatus (int lineno, const char *connection_name)
 
PGTransactionStatusType ECPGtransactionStatus (const char *connection_name)
 
bool ECPGtrans (int lineno, const char *connection_name, const char *transaction)
 
void ECPGdebug (int n, FILE *dbgs)
 
void ecpg_log (const char *format,...)
 
void ECPGset_noind_null (enum ECPGttype type, void *ptr)
 
static bool _check (const unsigned char *ptr, int length)
 
bool ECPGis_noind_null (enum ECPGttype type, const void *ptr)
 
void ECPGset_var (int number, void *pointer, int lineno)
 
void * ECPGget_var (int number)
 

Variables

bool ecpg_internal_regression_mode = false
 
static struct sqlca_t sqlca_init
 
static struct sqlca_t sqlca
 
static int simple_debug = 0
 
static FILE * debugstream = NULL
 
struct var_listivlist = NULL
 

Macro Definition Documentation

◆ LONG_LONG_MIN

#define LONG_LONG_MIN   LONGLONG_MIN

Definition at line 25 of file misc.c.

◆ POSTGRES_ECPG_INTERNAL

#define POSTGRES_ECPG_INTERNAL

Definition at line 3 of file misc.c.

Function Documentation

◆ _check()

static bool _check ( const unsigned char *  ptr,
int  length 
)
static

Definition at line 377 of file misc.c.

378 {
379  for (length--; length >= 0; length--)
380  if (ptr[length] != 0xff)
381  return false;
382 
383  return true;
384 }

Referenced by ECPGis_noind_null().

◆ ecpg_init()

bool ecpg_init ( const struct connection con,
const char *  connection_name,
const int  lineno 
)

Definition at line 104 of file misc.c.

105 {
106  struct sqlca_t *sqlca = ECPGget_sqlca();
107 
108  if (sqlca == NULL)
109  {
111  NULL);
112  return false;
113  }
114 
116  if (con == NULL)
117  {
119  connection_name ? connection_name : ecpg_gettext("NULL"));
120  return false;
121  }
122 
123  return true;
124 }
#define ECPG_OUT_OF_MEMORY
Definition: ecpgerrno.h:15
#define ECPG_NO_CONN
Definition: ecpgerrno.h:36
#define ecpg_gettext(x)
#define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY
#define ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST
void ecpg_raise(int line, int code, const char *sqlstate, const char *str)
Definition: error.c:13
static struct sqlca_t sqlca
Definition: misc.c:62
struct sqlca_t * ECPGget_sqlca(void)
Definition: misc.c:141
void ecpg_init_sqlca(struct sqlca_t *sqlca)
Definition: misc.c:98
Definition: sqlca.h:20

References ecpg_gettext, ecpg_init_sqlca(), ECPG_NO_CONN, ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPGget_sqlca(), and sqlca.

Referenced by ecpg_do_prologue(), ECPGdeallocate(), ECPGdisconnect(), ECPGprepare(), ECPGsetcommit(), ECPGsetconn(), ECPGstatus(), and ECPGtrans().

◆ ecpg_init_sqlca()

void ecpg_init_sqlca ( struct sqlca_t sqlca)

Definition at line 98 of file misc.c.

99 {
100  memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t));
101 }
static struct sqlca_t sqlca_init
Definition: misc.c:31

References sqlca, and sqlca_init.

Referenced by ecpg_init(), ECPGallocate_desc(), ECPGconnect(), ECPGdeallocate_desc(), ECPGdisconnect(), ECPGget_desc(), ECPGget_desc_header(), ECPGget_sqlca(), and ECPGset_var().

◆ ecpg_log()

void ecpg_log ( const char *  format,
  ... 
)

Definition at line 265 of file misc.c.

266 {
267  va_list ap;
268  struct sqlca_t *sqlca = ECPGget_sqlca();
269  const char *intl_format;
270  int bufsize;
271  char *fmt;
272 
273  if (!simple_debug)
274  return;
275 
276  /* localize the error message string */
277  intl_format = ecpg_gettext(format);
278 
279  /*
280  * Insert PID into the format, unless ecpg_internal_regression_mode is set
281  * (regression tests want unchanging output).
282  */
283  bufsize = strlen(intl_format) + 100;
284  fmt = (char *) malloc(bufsize);
285  if (fmt == NULL)
286  return;
287 
289  snprintf(fmt, bufsize, "[NO_PID]: %s", intl_format);
290  else
291  snprintf(fmt, bufsize, "[%d]: %s", (int) getpid(), intl_format);
292 
293 #ifdef ENABLE_THREAD_SAFETY
294  pthread_mutex_lock(&debug_mutex);
295 #endif
296 
297  va_start(ap, format);
298  vfprintf(debugstream, fmt, ap);
299  va_end(ap);
300 
301  /* dump out internal sqlca variables */
302  if (ecpg_internal_regression_mode && sqlca != NULL)
303  {
304  fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n",
306  }
307 
309 
310 #ifdef ENABLE_THREAD_SAFETY
311  pthread_mutex_unlock(&debug_mutex);
312 #endif
313 
314  free(fmt);
315 }
#define free(a)
Definition: header.h:65
#define malloc(a)
Definition: header.h:50
static int simple_debug
Definition: misc.c:94
static FILE * debugstream
Definition: misc.c:95
bool ecpg_internal_regression_mode
Definition: misc.c:29
static void const char * fmt
static void const char fflush(stdout)
va_end(args)
vfprintf(stderr, fmt, args)
va_start(args, fmt)
static char format
#define snprintf
Definition: port.h:234
#define fprintf
Definition: port.h:238
int pthread_mutex_unlock(pthread_mutex_t *mp)
Definition: pthread-win32.c:54
int pthread_mutex_lock(pthread_mutex_t *mp)
Definition: pthread-win32.c:45
char sqlstate[5]
Definition: sqlca.h:53
long sqlcode
Definition: sqlca.h:23

References debugstream, ecpg_gettext, ecpg_internal_regression_mode, ECPGget_sqlca(), fflush(), fmt, format, fprintf, free, malloc, pthread_mutex_lock(), pthread_mutex_unlock(), simple_debug, snprintf, sqlca, sqlca_t::sqlcode, sqlca_t::sqlstate, va_end(), va_start(), and vfprintf().

Referenced by ECPGdebug(), and ECPGtrans().

◆ ECPGdebug()

void ECPGdebug ( int  n,
FILE *  dbgs 
)

Definition at line 241 of file misc.c.

242 {
243 #ifdef ENABLE_THREAD_SAFETY
244  pthread_mutex_lock(&debug_init_mutex);
245 #endif
246 
247  if (n > 100)
248  {
250  simple_debug = n - 100;
251  }
252  else
253  simple_debug = n;
254 
255  debugstream = dbgs;
256 
257  ecpg_log("ECPGdebug: set to %d\n", simple_debug);
258 
259 #ifdef ENABLE_THREAD_SAFETY
260  pthread_mutex_unlock(&debug_init_mutex);
261 #endif
262 }
void ecpg_log(const char *format,...)
Definition: misc.c:265

References debugstream, ecpg_internal_regression_mode, ecpg_log(), pthread_mutex_lock(), pthread_mutex_unlock(), and simple_debug.

◆ ECPGget_sqlca()

struct sqlca_t* ECPGget_sqlca ( void  )

Definition at line 141 of file misc.c.

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;
155  pthread_setspecific(sqlca_key, sqlca);
156  }
157  return sqlca;
158 #else
159  return &sqlca;
160 #endif
161 }
void * pthread_getspecific(pthread_key_t key)
Definition: pthread-win32.c:29
void pthread_setspecific(pthread_key_t key, void *val)
Definition: pthread-win32.c:24

References ecpg_init_sqlca(), malloc, pthread_getspecific(), pthread_setspecific(), and sqlca.

Referenced by ecpg_get_data(), ECPG_informix_reset_sqlca(), ecpg_init(), ecpg_log(), ecpg_process_output(), ecpg_raise(), ecpg_raise_backend(), ECPGallocate_desc(), ECPGconnect(), ECPGdeallocate_desc(), ECPGdisconnect(), ECPGget_desc(), ECPGget_desc_header(), ECPGnoticeReceiver(), ECPGset_var(), and sqlprint().

◆ ECPGget_var()

void* ECPGget_var ( int  number)

Definition at line 587 of file misc.c.

588 {
589  struct var_list *ptr;
590 
591  for (ptr = ivlist; ptr != NULL && ptr->number != number; ptr = ptr->next);
592  return (ptr) ? ptr->pointer : NULL;
593 }
struct var_list * ivlist
Definition: misc.c:529
struct var_list * next
void * pointer

References ivlist, var_list::next, var_list::number, and var_list::pointer.

Referenced by ECPG_informix_get_var(), get_record1(), open_cur1(), and openit().

◆ ECPGis_noind_null()

bool ECPGis_noind_null ( enum ECPGttype  type,
const void *  ptr 
)

Definition at line 387 of file misc.c.

388 {
389  switch (type)
390  {
391  case ECPGt_char:
392  case ECPGt_unsigned_char:
393  case ECPGt_string:
394  if (*((const char *) ptr) == '\0')
395  return true;
396  break;
397  case ECPGt_short:
399  if (*((const short int *) ptr) == SHRT_MIN)
400  return true;
401  break;
402  case ECPGt_int:
403  case ECPGt_unsigned_int:
404  if (*((const int *) ptr) == INT_MIN)
405  return true;
406  break;
407  case ECPGt_long:
408  case ECPGt_unsigned_long:
409  case ECPGt_date:
410  if (*((const long *) ptr) == LONG_MIN)
411  return true;
412  break;
413  case ECPGt_long_long:
415  if (*((const long long *) ptr) == LONG_LONG_MIN)
416  return true;
417  break;
418  case ECPGt_float:
419  return _check(ptr, sizeof(float));
420  break;
421  case ECPGt_double:
422  return _check(ptr, sizeof(double));
423  break;
424  case ECPGt_varchar:
425  if (*(((const struct ECPGgeneric_varchar *) ptr)->arr) == 0x00)
426  return true;
427  break;
428  case ECPGt_bytea:
429  if (((const struct ECPGgeneric_bytea *) ptr)->len == 0)
430  return true;
431  break;
432  case ECPGt_decimal:
433  if (((const decimal *) ptr)->sign == NUMERIC_NULL)
434  return true;
435  break;
436  case ECPGt_numeric:
437  if (((const numeric *) ptr)->sign == NUMERIC_NULL)
438  return true;
439  break;
440  case ECPGt_interval:
441  return _check(ptr, sizeof(interval));
442  break;
443  case ECPGt_timestamp:
444  return _check(ptr, sizeof(timestamp));
445  break;
446  default:
447  break;
448  }
449 
450  return false;
451 }
@ ECPGt_float
Definition: ecpgtype.h:47
@ ECPGt_long_long
Definition: ecpgtype.h:45
@ ECPGt_short
Definition: ecpgtype.h:43
@ ECPGt_decimal
Definition: ecpgtype.h:51
@ ECPGt_bytea
Definition: ecpgtype.h:67
@ ECPGt_numeric
Definition: ecpgtype.h:49
@ ECPGt_varchar
Definition: ecpgtype.h:48
@ ECPGt_timestamp
Definition: ecpgtype.h:54
@ ECPGt_unsigned_short
Definition: ecpgtype.h:43
@ ECPGt_int
Definition: ecpgtype.h:44
@ ECPGt_long
Definition: ecpgtype.h:44
@ ECPGt_unsigned_char
Definition: ecpgtype.h:43
@ ECPGt_double
Definition: ecpgtype.h:47
@ ECPGt_date
Definition: ecpgtype.h:53
@ ECPGt_interval
Definition: ecpgtype.h:55
@ ECPGt_unsigned_long
Definition: ecpgtype.h:44
@ ECPGt_unsigned_long_long
Definition: ecpgtype.h:45
@ ECPGt_unsigned_int
Definition: ecpgtype.h:44
@ ECPGt_char
Definition: ecpgtype.h:43
@ ECPGt_string
Definition: ecpgtype.h:65
char sign
Definition: informix.c:668
static bool _check(const unsigned char *ptr, int length)
Definition: misc.c:377
#define LONG_LONG_MIN
Definition: misc.c:25
const void size_t len
#define NUMERIC_NULL
int64 timestamp

References _check(), ECPGgeneric_bytea::arr, ECPGt_bytea, ECPGt_char, ECPGt_date, ECPGt_decimal, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_numeric, ECPGt_short, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, ECPGt_varchar, len, LONG_LONG_MIN, NUMERIC_NULL, sign, and generate_unaccent_rules::type.

Referenced by ecpg_store_input(), and risnull().

◆ ECPGset_noind_null()

void ECPGset_noind_null ( enum ECPGttype  type,
void *  ptr 
)

Definition at line 318 of file misc.c.

319 {
320  switch (type)
321  {
322  case ECPGt_char:
323  case ECPGt_unsigned_char:
324  case ECPGt_string:
325  *((char *) ptr) = '\0';
326  break;
327  case ECPGt_short:
329  *((short int *) ptr) = SHRT_MIN;
330  break;
331  case ECPGt_int:
332  case ECPGt_unsigned_int:
333  *((int *) ptr) = INT_MIN;
334  break;
335  case ECPGt_long:
336  case ECPGt_unsigned_long:
337  case ECPGt_date:
338  *((long *) ptr) = LONG_MIN;
339  break;
340  case ECPGt_long_long:
342  *((long long *) ptr) = LONG_LONG_MIN;
343  break;
344  case ECPGt_float:
345  memset((char *) ptr, 0xff, sizeof(float));
346  break;
347  case ECPGt_double:
348  memset((char *) ptr, 0xff, sizeof(double));
349  break;
350  case ECPGt_varchar:
351  *(((struct ECPGgeneric_varchar *) ptr)->arr) = 0x00;
352  ((struct ECPGgeneric_varchar *) ptr)->len = 0;
353  break;
354  case ECPGt_bytea:
355  ((struct ECPGgeneric_bytea *) ptr)->len = 0;
356  break;
357  case ECPGt_decimal:
358  memset((char *) ptr, 0, sizeof(decimal));
359  ((decimal *) ptr)->sign = NUMERIC_NULL;
360  break;
361  case ECPGt_numeric:
362  memset((char *) ptr, 0, sizeof(numeric));
363  ((numeric *) ptr)->sign = NUMERIC_NULL;
364  break;
365  case ECPGt_interval:
366  memset((char *) ptr, 0xff, sizeof(interval));
367  break;
368  case ECPGt_timestamp:
369  memset((char *) ptr, 0xff, sizeof(timestamp));
370  break;
371  default:
372  break;
373  }
374 }

References ECPGt_bytea, ECPGt_char, ECPGt_date, ECPGt_decimal, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_numeric, ECPGt_short, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, ECPGt_varchar, LONG_LONG_MIN, NUMERIC_NULL, and generate_unaccent_rules::type.

Referenced by ecpg_get_data(), ecpg_set_compat_sqlda(), ecpg_set_native_sqlda(), and rsetnull().

◆ ECPGset_var()

void ECPGset_var ( int  number,
void *  pointer,
int  lineno 
)

Definition at line 532 of file misc.c.

533 {
534  struct var_list *ptr;
535 
536  struct sqlca_t *sqlca = ECPGget_sqlca();
537 
538  if (sqlca == NULL)
539  {
542  return;
543  }
544 
546 
547  for (ptr = ivlist; ptr != NULL; ptr = ptr->next)
548  {
549  if (ptr->number == number)
550  {
551  /* already known => just change pointer value */
552  ptr->pointer = pointer;
553  return;
554  }
555  }
556 
557  /* a new one has to be added */
558  ptr = (struct var_list *) calloc(1L, sizeof(struct var_list));
559  if (!ptr)
560  {
561  struct sqlca_t *sqlca = ECPGget_sqlca();
562 
563  if (sqlca == NULL)
564  {
567  return;
568  }
569 
571  strncpy(sqlca->sqlstate, "YE001", sizeof(sqlca->sqlstate));
572  snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc), "out of memory on line %d", lineno);
574  /* free all memory we have allocated for the user */
576  }
577  else
578  {
579  ptr->number = number;
580  ptr->pointer = pointer;
581  ptr->next = ivlist;
582  ivlist = ptr;
583  }
584 }
#define calloc(a, b)
Definition: header.h:55
void ECPGfree_auto_mem(void)
Definition: memory.c:138
struct sqlca_t::@147 sqlerrm
char sqlerrmc[SQLERRMC_LEN]
Definition: sqlca.h:27
int sqlerrml
Definition: sqlca.h:26

References calloc, ecpg_init_sqlca(), ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPGfree_auto_mem(), ECPGget_sqlca(), ivlist, var_list::next, var_list::number, var_list::pointer, snprintf, sqlca, sqlca_t::sqlcode, sqlca_t::sqlerrm, sqlca_t::sqlerrmc, sqlca_t::sqlerrml, and sqlca_t::sqlstate.

Referenced by ECPG_informix_set_var(), get_var1(), and main().

◆ ECPGstatus()

bool ECPGstatus ( int  lineno,
const char *  connection_name 
)

Definition at line 164 of file misc.c.

165 {
166  struct connection *con = ecpg_get_connection(connection_name);
167 
168  if (!ecpg_init(con, connection_name, lineno))
169  return false;
170 
171  /* are we connected? */
172  if (con->connection == NULL)
173  {
175  return false;
176  }
177 
178  return true;
179 }
struct connection * ecpg_get_connection(const char *connection_name)
Definition: connect.c:79
#define ECPG_NOT_CONN
Definition: ecpgerrno.h:37
#define ECPG_SQLSTATE_ECPG_INTERNAL_ERROR
bool ecpg_init(const struct connection *con, const char *connection_name, const int lineno)
Definition: misc.c:104
PGconn * connection

References connection::connection, ecpg_get_connection(), ecpg_init(), ECPG_NOT_CONN, ecpg_raise(), ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, and connection::name.

◆ ECPGtrans()

bool ECPGtrans ( int  lineno,
const char *  connection_name,
const char *  transaction 
)

Definition at line 197 of file misc.c.

198 {
199  PGresult *res;
200  struct connection *con = ecpg_get_connection(connection_name);
201 
202  if (!ecpg_init(con, connection_name, lineno))
203  return false;
204 
205  ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : "null");
206 
207  /* if we have no connection we just simulate the command */
208  if (con && con->connection)
209  {
210  /*
211  * If we got a transaction command but have no open transaction, we
212  * have to start one, unless we are in autocommit, where the
213  * developers have to take care themselves. However, if the command is
214  * a begin statement, we just execute it once. And if the command is
215  * commit or rollback prepared, we don't execute it.
216  */
218  !con->autocommit &&
219  strncmp(transaction, "begin", 5) != 0 &&
220  strncmp(transaction, "start", 5) != 0 &&
221  strncmp(transaction, "commit prepared", 15) != 0 &&
222  strncmp(transaction, "rollback prepared", 17) != 0)
223  {
224  res = PQexec(con->connection, "begin transaction");
226  return false;
227  PQclear(res);
228  }
229 
230  res = PQexec(con->connection, transaction);
232  return false;
233  PQclear(res);
234  }
235 
236  return true;
237 }
bool ecpg_check_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPAT_MODE compat)
Definition: error.c:281
@ ECPG_COMPAT_PGSQL
PGTransactionStatusType PQtransactionStatus(const PGconn *conn)
Definition: fe-connect.c:6773
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:2243
@ PQTRANS_IDLE
Definition: libpq-fe.h:118

References connection::autocommit, connection::connection, ecpg_check_PQresult(), ECPG_COMPAT_PGSQL, ecpg_get_connection(), ecpg_init(), ecpg_log(), connection::name, PQclear(), PQexec(), PQTRANS_IDLE, PQtransactionStatus(), and res.

Referenced by commitTable(), main(), and sql_check().

◆ ECPGtransactionStatus()

PGTransactionStatusType ECPGtransactionStatus ( const char *  connection_name)

Definition at line 182 of file misc.c.

183 {
184  const struct connection *con;
185 
186  con = ecpg_get_connection(connection_name);
187  if (con == NULL)
188  {
189  /* transaction status is unknown */
190  return PQTRANS_UNKNOWN;
191  }
192 
193  return PQtransactionStatus(con->connection);
194 }
@ PQTRANS_UNKNOWN
Definition: libpq-fe.h:122

References connection::connection, ecpg_get_connection(), PQTRANS_UNKNOWN, and PQtransactionStatus().

Variable Documentation

◆ debugstream

FILE* debugstream = NULL
static

Definition at line 95 of file misc.c.

Referenced by ecpg_log(), and ECPGdebug().

◆ ecpg_internal_regression_mode

bool ecpg_internal_regression_mode = false

Definition at line 29 of file misc.c.

Referenced by ecpg_get_data(), ecpg_log(), ECPGconnect(), and ECPGdebug().

◆ ivlist

struct var_list* ivlist = NULL

Definition at line 529 of file misc.c.

Referenced by ecpg_finish(), ECPGget_var(), and ECPGset_var().

◆ simple_debug

int simple_debug = 0
static

Definition at line 94 of file misc.c.

Referenced by ecpg_log(), and ECPGdebug().

◆ sqlca

struct sqlca_t sqlca
static
Initial value:
=
{
{
'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '
},
sizeof(struct sqlca_t),
0,
{
0,
{
0
}
},
{
'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '
},
{
0, 0, 0, 0, 0, 0
},
{
0, 0, 0, 0, 0, 0, 0, 0
},
{
'0', '0', '0', '0', '0'
}
}

Definition at line 29 of file misc.c.

Referenced by ecpg_init(), ecpg_init_sqlca(), ecpg_log(), ECPGget_sqlca(), and ECPGset_var().

◆ sqlca_init

struct sqlca_t sqlca_init
static
Initial value:
=
{
{
'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '
},
sizeof(struct sqlca_t),
0,
{
0,
{
0
}
},
{
'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '
},
{
0, 0, 0, 0, 0, 0
},
{
0, 0, 0, 0, 0, 0, 0, 0
},
{
'0', '0', '0', '0', '0'
}
}

Definition at line 29 of file misc.c.

Referenced by ecpg_init_sqlca().