;
99 return "unrecognized layer";
109 return "external error";
112 return "internal CT-Library error";
115 return "common library error";
118 return "intl library error";
121 return "user error";
124 return "internal BLK-Library error";
129 return "unrecognized origin";
139 return "Failed in conversion routine - condition overflow." 140 " col = %1! row = %2!.";
142 return "Failed in conversion routine - syntax error." 143 " col = %1! row = %2!.";
145 return "Data truncated while doing local character set" 146 " conversion. col = %1! row = %2!.";
148 return "A bind count of %1! is not consistent with the count supplied for existing binds. " 149 "The current bind count is %2!.";
152 return "Use direction CS_BLK_IN or CS_BLK_OUT for a bulk copy operation.";
155 return "The parameter tblname cannot be NULL.";
158 return "Failed when processing results from server.";
161 return "Parameter %1! has an illegal value of %2!";
164 return "No value or default value available and NULL not allowed. col = %1! row = %2! .";
167 return "parameter name(s) must be supplied for LANGUAGE command.";
170 return "This routine cannot be called when the command structure is idle.";
175 return "unrecognized error";
183 tdsdump_log(
TDS_DBG_FUNC,
"_ct_get_msgstr(%s, %d, %d, %d, %d)\n", funcname, layer,
origin, severity,
number);
201 tdsdump_log(
TDS_DBG_FUNC,
"_ctclient_msg(%p, %s, %d, %d, %d, %d, %s)\n", con, funcname, layer,
origin, severity,
number, fmt);
207cm.
msgnumber= (((layer << 24) & 0xFF000000)
208| ((
origin<< 16) & 0x00FF0000)
209| ((severity << 8) & 0x0000FF00)
210| ((
number) & 0x000000FF));
301(*con)->tds_login =
login;
302(*con)->server_addr =
NULL;
314 int(*funcptr) (
void*,
void*,
void*) = (
int(*)(
void*,
void*,
void*)) func;
316 tdsdump_log(
TDS_DBG_FUNC,
"ct_callback(%p, %p, %d, %d, %p)\n",
ctx, con, action,
type, func);
338*(
void**) func =
NULL;
378 tdsdump_log(
TDS_DBG_FUNC,
"ct_con_props(%p, %d, %d, %p, %d, %p)\n", con, action, property,
buffer, buflen, out_len);
386 char*set_buffer =
NULL;
387 boolcopy_ret =
true;
442 char*host, *port, *lasts =
NULL;
444host=
strtok_r(set_buffer,
" ", &lasts);
446 if(!host || !port) {
451portno = (
int)strtol(port,
NULL, 10);
452 if(portno < 1 || portno >= 65536) {
484memcpy(&intval,
buffer,
sizeof(intval));
488memcpy(&intval,
buffer,
sizeof(intval));
558}
else if(action ==
CS_GET) {
619memcpy(
buffer, &intval,
sizeof(intval));
626memcpy(
buffer, &intval,
sizeof(intval));
633memcpy(
buffer, &intval,
sizeof(intval));
635*out_len =
sizeof(intval);
710}
else if(!servername || snamelen == 0 || snamelen ==
CS_UNUSED) {
713server = (
char*) servername;
766 if(!
locale->datetime_fmt)
820 for(pcommand = con->
cmds; pcommand->
next!=
NULL; pcommand = pcommand->
next)
831 ssize_tquery_len, current_query_len;
833 tdsdump_log(
TDS_DBG_FUNC,
"ct_command(%p, %d, %p, %d, %d)\n",
cmd,
type,
buffer, buflen,
option);
854query_len = strlen((
const char*)
buffer);
873current_query_len = strlen(
cmd->
query);
877 cmd->
query[current_query_len + query_len] =
'\0';
902}
else if(buflen > 0) {
1034tdsdyn->
params= pparam_info;
1134 intsomething_to_send = 0;
1144 if(!cursor->
query) {
1160 if(something_to_send == 0) {
1174 if(something_to_send == 0) {
1191 if(something_to_send) {
1195something_to_send = 0;
1246 unsignedprocess_flags;
1337*result_type = res_type;
1400*result_type = res_type;
1533*result_type = res_type;
1540*result_type = res_type;
1548*result_type = res_type;
1553*result_type = res_type;
1605 tdsdump_log(
TDS_DBG_FUNC,
"ct_bind(%p, %d, %p, %p, %p, %p)\n",
cmd, item, datafmt_arg,
buffer, copied, indicator);
1612bind_count = datafmt->
count;
1620 if(!resinfo || item <= 0 || item > resinfo->
num_cols)
1628bind_count = (datafmt->
count== 0) ? 1 : datafmt->
count;
1644colinfo = resinfo->
columns[item - 1];
1668 tdsdump_log(
TDS_DBG_FUNC,
"ct_fetch(%p, %d, %d, %d, %p)\n",
cmd,
type,
offset,
option, prows_read);
1684prows_read = &rows_read_dummy;
1728 for(temp_count = 0; temp_count <
cmd->
bind_count; temp_count++) {
1784 tdsdump_log(
TDS_DBG_FUNC,
"_ct_fetch_cursor(%p, %d, %d, %d, %p)\n",
cmd,
type,
offset,
option, rows_read);
1826 for(temp_count = 0; temp_count <
cmd->
bind_count; temp_count++) {
1841*rows_read = *rows_read + 1;
1855 if(rows_this_fetch)
1867 unsigned char*src, *dest;
1870 TDS_INTdatalen_dummy, *pdatalen;
1882bindcol = bindinfo->
columns[
i];
1898nullind = &nullind_dummy;
1904pdatalen = &datalen_dummy;
1926src = (
unsigned char*) ((
TDSBLOB*) src)->textvalue;
1950*pdatalen, srctype);
1983 for(pvictim = &con->
cmds; *pvictim !=
cmd; ) {
1988pvictim = &(*pvictim)->
next;
2027con->
cmds= next_cmd;
2492 if(item < 1 || item > resinfo->
num_cols)
2495curcol = resinfo->
columns[item - 1];
2536datafmt->
status= status;
2538datafmt->
count= 1;
2554 tdsdump_log(
TDS_DBG_FUNC,
"ct_res_info(%p, %d, %p, %d, %p)\n",
cmd,
type,
buffer, buflen, out_len);
2600 tdsdump_log(
TDS_DBG_FUNC,
"ct_config(%p, %d, %d, %p, %d, %p)\n",
ctx, action, property,
buffer, buflen, outlen);
2634 if(
buffer&& buflen > 0 && outlen) {
2636*outlen= snprintf((
char*)
buffer, buflen,
"%s (%s, default tds version=%s)",
2638(settings->
threadsafe?
"threadsafe":
"non-threadsafe"),
2641((
char*)
buffer)[buflen - 1]= 0;
2644strlen((
char*)
buffer);
2659 if(
buffer&& buflen > 0 && outlen) {
2662((
char*)
buffer)[buflen - 1]= 0;
2665strlen((
char*)
buffer);
2721 tdsdump_log(
TDS_DBG_FUNC,
"ct_cmd_props(%p, %d, %d, %p, %d, %p)\n",
cmd, action, property,
buffer, buflen, outlen);
2760 if(outlen) *outlen =
sizeof(
CS_INT);
2769 if(outlen) *outlen =
sizeof(
CS_INT);
2773 if(outlen) *outlen =
sizeof(
CS_INT);
2784 if(outlen) *outlen =
sizeof(
CS_INT);
2791 if(outlen) *outlen = maxcp;
2814 tdsdump_log(
TDS_DBG_FUNC,
"ct_compute_info(%p, %d, %d, %p, %d, %p)\n",
cmd,
type, colnum,
buffer, buflen, outlen);
2833*outlen =
sizeof(
CS_INT);
2842*dest_by_col_ptr = *src_by_col_ptr;
2854curcol = resinfo->
columns[colnum - 1];
2859*outlen =
sizeof(
CS_INT);
2869*outlen =
sizeof(
CS_INT);
2875curcol = resinfo->
columns[colnum - 1];
2880*outlen =
sizeof(
CS_INT);
2899 tdsdump_log(
TDS_DBG_FUNC,
"ct_get_data(%p, %d, %p, %d, %p)\n",
cmd, item,
buffer, buflen, outlen);
2906 if(item < 1 || item > resinfo->
num_cols)
2922 size_ttable_namelen, column_namelen;
2935curcol = resinfo->
columns[item - 1];
2940src = (
unsigned char*) blob->
textvalue;
2959 if(table_namelen + column_namelen + 2 >
sizeof(
cmd->
iodesc->
name))
2960column_namelen =
sizeof(
cmd->
iodesc->
name) - 2 - table_namelen;
2969 if(table_namelen) {
2981 if(column_namelen) {
2999curcol = resinfo->
columns[item - 1];
3002src = (
unsigned char*) ((
TDSBLOB*) src)->textvalue;
3016 if(item < resinfo->num_cols)
3026 if(buflen >= srclen) {
3027memcpy(
buffer, src, srclen);
3031 if(item < resinfo->num_cols)
3036memcpy(
buffer, src, buflen);
3048 chartextptr_string[35];
3049 chartimestamp_string[19];
3084c = timestamp_string;
3153 if(colnum < 1 || colnum > resinfo->
num_cols)
3189 unsigned charbitmask = 0;
3192 tdsdump_log(
TDS_DBG_FUNC,
"ct_capability(%p, %d, %d, %d, %p)\n", con, action,
type, capability,
value);
3199 switch(capability) {
3249 "ct_capability -- attempt to set a read-only capability (type %d, action %d)\n",
3255 switch(capability) {
3327bitmask = 1 << (idx&7);
3328idx =
sizeof(cap->
values) - 1 - (idx>>3);
3336cap->
values[idx] |= bitmask;
3339cap->
values[idx] &= ~bitmask;
3364 tdsdump_log(
TDS_DBG_FUNC,
"ct_dynamic(%p, %d, %p, %d, %p, %d)\n",
cmd,
type,
id, idlen,
buffer, buflen);
3381query_len = strlen(
buffer);
3433 tdsdump_log(
TDS_DBG_FUNC,
"ct_param(%p, %p, %p, %d, %hd)\n",
cmd, datafmt_arg,
data, datalen, indicator);
3445 for(
i= 0;
i< datalen; ++
i) {
3446 if(((
const char*)
data)[
i] & 0x80) {
3468 "RPC is NULL in ct_param\n");
3486pparam = &(*pparam)->
next;
3512pparam = &(*pparam)->
next;
3538pparam = &(*pparam)->
next;
3558 tdsdump_log(
TDS_DBG_FUNC,
"ct_setparam(%p, %p, %p, %p, %p)\n",
cmd, datafmt_arg,
data, datalen, indicator);
3576 "RPC is NULL in ct_param\n");
3594 if(*pparam !=
NULL) {
3595 while((*pparam)->next !=
NULL) {
3596pparam = &(*pparam)->
next;
3599pparam = &(*pparam)->
next;
3611 "cmd->dyn is NULL in ct_param\n");
3627 if(*pparam !=
NULL) {
3628 while((*pparam)->next !=
NULL) {
3629pparam = &(*pparam)->
next;
3632pparam = &(*pparam)->
next;
3662 while((*pparam)->next)
3663pparam = &(*pparam)->
next;
3664(*pparam)->
next= param;
3682 const char*action_string =
NULL;
3686 static const structTDS_BOOL_OPTION_MAP
3690} tds_bool_option_map[] = {
3710 tdsdump_log(
TDS_DBG_FUNC,
"ct_options(%p, %d, %d, %p, %d, %p)\n", con, action,
option, param, paramlen, outlen);
3724action_string =
"CS_GET";
3729action_string =
"CS_SET";
3733action_string =
"CS_CLEAR";
3741 assert(tds_command && action_string);
3764tds_option = tds_bool_option_map[
i].tds_option;
3766 switch(*(
CS_BOOL*) param) {
3768tds_argument.
ti= 1;
3771tds_argument.
ti= 0;
3791 switch(*(
CS_BOOL*) param) {
3803tds_argsize = (action ==
CS_SET) ? paramlen : 0;
3808tds_argsize = (action ==
CS_SET) ? paramlen : 0;
3813 switch(*(
CS_INT*) param) {
3839tds_argsize = (action ==
CS_SET) ? 1 : 0;
3843 switch(*(
CS_INT*) param) {
3866tds_argsize = (action ==
CS_SET) ? 1 : 0;
3870 switch(*(
char*) param) {
3887tds_argsize = (action ==
CS_SET) ? 1 : 0;
3891tds_argument.
i= *(
CS_INT*) param;
3892tds_argsize = (action ==
CS_SET) ?
sizeof(tds_argument.
i) : 0;
3896 switch(*(
CS_BOOL*) param) {
3904tds_argument.
ti= !*(
CS_BOOL*) param;
3905tds_argsize = (action ==
CS_SET) ? 1 : 0;
3914action_string, tds_option,
3915tds_argsize == 1 ? tds_argument.
ti: (tds_argsize == 4 ? tds_argument.
i: 0), tds_argsize);
3971 ctx, connection, milliseconds, compconn, compcmd, compid, compstatus);
3983 size_tstr_len = strlen(
str);
3989}
else if(pos != str_len) {
4005 tdsdump_log(
TDS_DBG_FUNC,
"ct_cursor(%p, %d, %p, %d, %p, %d, %d)\n",
cmd,
type, name, namelen,
text, tlen,
option);
4039}
state= eBaseline;
4040 char* savept =
NULL;
4044 while(tok !=
NULL) {
4049}
else if(
state== eFor
4061 if(
state== eForUpdate) {
4062cursor->
type= 0x4;
4065cursor->
type= 0x1;
4069cursor->
type= 0x4;
4071cursor->
type= 0x1;
4203 enum{ num_cols = 1 };
4220curcol =
info->columns[0];
4241 static const unsigned char*
4275 return(
const unsigned char*)
row;
4298 for(
i= 0, p = first_param; p !=
NULL; p = p->
next,
i++) {
4299 const unsigned char*prow;
4305params = new_params;
4332temp_value = p->
value;
4335temp_value = p->
value;
4336temp_datalen = *(p->
datalen);
4345temp_datalen = vc->
len;
4360temp_datalen = strlen((
const char*) temp_value);
4371 "paraminfoalloc", 2, 1, 10, 25,
4377}
else if(p->
maxlen== 0
4383p->
maxlen= temp_datalen * 2;
4387 if(temp_datalen > 0 && temp_datalen > p->
maxlen)
4401 "paraminfoalloc: name = %s, varint size %d " 4402 "column_type %d size %d, %d column_cur_size %d column_output = %d\n",
4407prow =
paramrowalloc(params, pcol,
i, temp_value, temp_datalen);
4417 "paraminfoalloc", 2, 1, 17, 33,
"");
4448 if(pparam->
next) {
4478cmd_type, param, datafmt,
data, datalen, indicator, byvalue);
4488}
else if(namelen > 0) {
4527*(param->
datalen) = *datalen;
4530*(param->
ind) = *indicator;
4537 if(*indicator == -1 || (!
data&& (*datalen == 0 || *datalen ==
CS_UNUSED))) {
4552 " _ct_fill_param() about to strdup string %u bytes long\n",
4553(
unsigned int) strlen((
const char*)
data));
4554*(param->
datalen) = strlen((
const char*)
data);
4555}
else if(*(param->
datalen) < 0) {
4559 if(!param->
value)
4570param->
ind= indicator;
4582 tdsdump_log(
TDS_DBG_FUNC,
"ct_diag(%p, %d, %d, %d, %p)\n",
conn,
operation,
type, idx,
buffer);
4678 while(*curptr !=
NULL) {
4680curptr = &((*curptr)->next);
4697 while(scurptr !=
NULL) {
4699scurptr = scurptr->
next;
4710(*curptr)->next =
NULL;
4711memcpy(&(*curptr)->clientmsg, message,
sizeof(
CS_CLIENTMSG));
4729 while(*curptr !=
NULL) {
4731curptr = &((*curptr)->next);
4748 while(ccurptr !=
NULL) {
4750ccurptr = ccurptr->
next;
4761(*curptr)->next =
NULL;
4779 while(curptr !=
NULL) {
4781 if(msg_count == idx) {
4785curptr = curptr->
next;
4803 while(curptr !=
NULL) {
4805 if(msg_count == idx) {
4809curptr = curptr->
next;
4826 while(curptr !=
NULL) {
4828curptr = freeptr->
next;
4839 while(scurptr !=
NULL) {
4841scurptr = sfreeptr->
next;
4860 while(curptr !=
NULL) {
4862curptr = curptr->
next;
4871 while(scurptr !=
NULL) {
4873scurptr = scurptr->
next;
4876*
count= msg_count;
4895id_len = strlen(
id);
4908pdyn = &(*pdyn)->
next;
4926id_len = strlen(
id);
4934 if(
strncmp(dyn->
id,
id, id_len) == 0)
4952 for(; *pvictim != dyn;) {
4957pvictim = &(*pvictim)->
next;
4962*pvictim = dyn->
next;
#define CS_SERVERMSG_TYPE
#define CS_DATA_NOSENSITIVITY
#define CS_DATA_NOBOUNDARY
#define CS_NLONGCHAR_TYPE
#define CS_OPT_CURCLOSEONXACT
#define CS_DATETIME4_TYPE
CS_RETCODE(* CS_SERVERMSG_FUNC)(CS_CONTEXT *, CS_CONNECTION *, CS_SERVERMSG *)
#define CS_OPT_QUOTED_IDENT
#define CS_COMPUTEFMT_RESULT
#define CS_LONGBINARY_TYPE
#define CS_OPT_TRUNCIGNORE
#define CS_DESCRIBE_OUTPUT
#define CS_IMPLICIT_CURSOR
#define CS_OPT_ARITHIGNORE
#define CS_OPT_ARITHABORT
#define CS_OPT_DATEFORMAT
#define CS_DATA_DATETIMEN
#define CS_OPT_CHAINXACTS
#define CS_OPT_FORMATONLY
#define CS_DATA_NODATETIMEN
#define CS_BIGDATETIME_TYPE
#define CS_USMALLINT_TYPE
#define CS_DATA_SENSITIVITY
CS_RETCODE(* CS_CLIENTMSG_FUNC)(CS_CONTEXT *, CS_CONNECTION *, CS_CLIENTMSG *)
#define CS_CONSTAT_CONNECTED
#define CS_DESCRIBE_RESULT
#define CS_OPT_STR_RTRUNC
#define CS_COMPUTE_RESULT
#define CS_VARBINARY_TYPE
#define CS_CLIENTMSG_TYPE
#define CS_RES_NOTDSDEBUG
#define CS_DESCRIBE_INPUT
#define CS_CURSOR_DECLARE
#define CS_CURSOR_DEALLOC
#define CS_CANCEL_CURRENT
#define CS_OPT_STATS_TIME
#define CS_RES_NOSTRIPBLANKS
struct _cs_numeric CS_NUMERIC
CS_RETCODE ct_dynamic(CS_COMMAND *cmd, CS_INT type, CS_CHAR *id, CS_INT idlen, CS_CHAR *buffer, CS_INT buflen)
CS_RETCODE ct_cursor(CS_COMMAND *cmd, CS_INT type, CS_CHAR *name, CS_INT namelen, CS_CHAR *text, CS_INT tlen, CS_INT option)
CS_RETCODE ct_compute_info(CS_COMMAND *cmd, CS_INT type, CS_INT colnum, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
CS_RETCODE ct_command(CS_COMMAND *cmd, CS_INT type, const CS_VOID *buffer, CS_INT buflen, CS_INT option)
CS_RETCODE ct_connect(CS_CONNECTION *con, CS_CHAR *servername, CS_INT snamelen)
CS_RETCODE ct_results(CS_COMMAND *cmd, CS_INT *result_type)
CS_RETCODE ct_cmd_alloc(CS_CONNECTION *con, CS_COMMAND **pcmd)
CS_RETCODE ct_res_info(CS_COMMAND *cmd, CS_INT type, CS_VOID *buffer, CS_INT buflen, CS_INT *out_len)
CS_RETCODE ct_callback(CS_CONTEXT *ctx, CS_CONNECTION *con, CS_INT action, CS_INT type, CS_VOID *func)
CS_RETCODE ct_fetch(CS_COMMAND *cmd, CS_INT type, CS_INT offset, CS_INT option, CS_INT *prows_read)
CS_RETCODE ct_poll(CS_CONTEXT *ctx, CS_CONNECTION *connection, CS_INT milliseconds, CS_CONNECTION **compconn, CS_COMMAND **compcmd, CS_INT *compid, CS_INT *compstatus)
CS_RETCODE ct_cmd_drop(CS_COMMAND *cmd)
CS_RETCODE ct_get_data(CS_COMMAND *cmd, CS_INT item, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
CS_RETCODE ct_cmd_props(CS_COMMAND *cmd, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
CS_RETCODE ct_param(CS_COMMAND *cmd, CS_DATAFMT *datafmt, CS_VOID *data, CS_INT datalen, CS_SMALLINT indicator)
CS_RETCODE ct_con_alloc(CS_CONTEXT *ctx, CS_CONNECTION **con)
TDS_SERVER_TYPE _ct_get_server_type(TDSSOCKET *tds, int datatype)
CS_RETCODE ct_con_drop(CS_CONNECTION *con)
int _ct_bind_data(CS_CONTEXT *ctx, TDSRESULTINFO *resinfo, TDSRESULTINFO *bindinfo, CS_INT offset)
void _ctclient_msg(CS_CONNECTION *con, const char *funcname, int layer, int origin, int severity, int number, const char *fmt,...)
CS_RETCODE ct_diag(CS_CONNECTION *conn, CS_INT operation, CS_INT type, CS_INT idx, CS_VOID *buffer)
int _ct_get_client_type(CS_CONTEXT *ctx, TDSCOLUMN *col)
CS_RETCODE ct_close(CS_CONNECTION *con, CS_INT option)
CS_INT _ct_diag_clearmsg(CS_CONTEXT *context, CS_INT type)
CS_RETCODE ct_options(CS_CONNECTION *con, CS_INT action, CS_INT option, CS_VOID *param, CS_INT paramlen, CS_INT *outlen)
CS_RETCODE ct_capability(CS_CONNECTION *con, CS_INT action, CS_INT type, CS_INT capability, CS_VOID *value)
CS_RETCODE ct_send(CS_COMMAND *cmd)
CS_RETCODE ct_data_info(CS_COMMAND *cmd, CS_INT action, CS_INT colnum, CS_IODESC *iodesc)
CS_RETCODE ct_send_data(CS_COMMAND *cmd, CS_VOID *buffer, CS_INT buflen)
CS_RETCODE ct_bind(CS_COMMAND *cmd, CS_INT item, CS_DATAFMT *datafmt, CS_VOID *buffer, CS_INT *copied, CS_SMALLINT *indicator)
CS_RETCODE ct_cancel(CS_CONNECTION *conn, CS_COMMAND *cmd, CS_INT type)
CS_RETCODE ct_con_props(CS_CONNECTION *con, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *out_len)
CS_RETCODE ct_init(CS_CONTEXT *ctx, CS_INT version)
CS_RETCODE ct_exit(CS_CONTEXT *ctx, CS_INT unused)
CS_RETCODE ct_config(CS_CONTEXT *ctx, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
CS_RETCODE ct_describe(CS_COMMAND *cmd, CS_INT item, CS_DATAFMT *datafmt)
CS_RETCODE ct_setparam(CS_COMMAND *cmd, CS_DATAFMT *datafmt, CS_VOID *data, CS_INT *datalen, CS_SMALLINT *indicator)
static CS_CONNECTION * conn
#define _CS_CANCEL_PENDING
CS_LOCALE * _cs_locale_copy(CS_LOCALE *orig)
int _ct_handle_client_message(const TDSCONTEXT *ctxptr, TDSSOCKET *tdsptr, TDSMESSAGE *msgptr)
#define _CS_CURS_TYPE_SENT
#define _CS_RES_DESCRIBE_RESULT
#define _CS_COMMAND_BUILDING
void _cs_locale_free(CS_LOCALE *locale)
#define _CS_ERRHAND_INLINE
int _cs_locale_copy_inplace(CS_LOCALE *new_locale, CS_LOCALE *orig)
#define _CS_CANCEL_NOCANCEL
void _csclient_msg(CS_CONTEXT *ctx, const char *funcname, int layer, int origin, int severity, int number, const char *fmt,...)
#define _CS_COMMAND_READY
int _cs_convert_not_client(CS_CONTEXT *ctx, TDSCOLUMN *curcol, CONV_RESULT *convert_buffer, unsigned char **p_src)
Try to convert to a type we can handle.
#define _CS_RES_END_RESULTS
TDSRET _ct_handle_server_message(const TDSCONTEXT *ctxptr, TDSSOCKET *tdsptr, TDSMESSAGE *msgptr)
#define _CS_RES_CMD_SUCCEED
#define _CS_RES_RESULTSET_EMPTY
#define _CS_CURS_TYPE_REQUESTED
#define _CS_RES_RESULTSET_ROWS
@ TDS_RES_DATA_NOBOUNDARY
@ TDS_RES_DATA_NOSENSITIVITY
@ TDS_RES_DATA_NODATETIMEN
@ TDS_REQ_DATA_BIGDATETIME
@ TDS_REQ_DATA_SENSITIVITY
TDS_OPTION_CMD
options that can be sent with a TDS_OPTIONCMD token
@ TDS_OPT_LIST
Request current setting of a specific option.
@ TDS_OPT_DEFAULT
Set option to its default value.
@ TDS_OPT_SET
Set an option.
#define TDS_NBC_ROW_TOKEN
#define TDS_RETURNSTATUS_TOKEN
#define is_numeric_type(x)
#define TDS_DONEPROC_RESULT
#define tds_capability_has_req(conn, cap)
tds_sysdep_int32_type TDS_INT
#define tds_get_parent(tds)
#define TDS_NO_MORE_RESULTS
tds_sysdep_int64_type TDS_INT8
#define is_unicode_type(x)
#define TDS_DESCRIBE_RESULT
#define TDS_COMPUTE_RESULT
@ TDS_CURSOR_STATE_UNACTIONED
@ TDS_CURSOR_STATE_REQUESTED
@ TDS_PENDING
cilent is waiting for data
tds_sysdep_int16_type TDS_SMALLINT
#define TDS_VECTOR_SIZE(x)
#define tds_new0(type, n)
@ TDS_DONE_ERROR
error occurred
#define TDS_STATUS_RESULT
#define tds_set_parent(tds, val)
#define TDS_DONEINPROC_RESULT
static const char * str(char *buf, int n)
#define SYBMSDATETIMEOFFSET
#define tds_cursor_setrows
#define tds_set_param_type
#define tds_alloc_results
#define tds_submit_unprepare
#define tds_read_config_info
#define tds_cursor_declare
#define tds_free_param_results
#define tds_writetext_end
#define tds_set_column_type
#define tds_free_all_results
#define tds_submit_optioncmd
#define tds_release_dynamic
#define tds_free_input_params
#define tds_get_size_by_type
#define tds_writetext_continue
#define tds_connect_and_login
#define tds_submit_prepare
#define tds_alloc_param_result
#define tds_release_cursor
#define tds_set_current_results
#define tds_cursor_dealloc
#define tds_lookup_host_set
#define tds_process_cancel
#define tds_alloc_param_data
#define tds_set_client_charset
#define tds_get_conversion_type
#define tds_submit_query_params
#define tds_writetext_start
#define tds_process_tokens
#define tds_submit_execute
CS_RETCODE(* CS_INTERRUPT_FUNC)(CS_CONNECTION *)
static CS_INT _ct_deallocate_dynamic(CS_CONNECTION *con, CS_DYNAMIC *dyn)
static CS_INT ct_diag_storeclientmsg(CS_CONTEXT *context, CS_CONNECTION *conn, CS_CLIENTMSG *message)
static CS_RETCODE _ct_cancel_cleanup(CS_COMMAND *cmd)
static CS_DYNAMIC * _ct_locate_dynamic(CS_CONNECTION *con, char *id, int idlen)
static char * get_next_tok(char *str, char *delimiter, char **endptr)
static CS_INT _ct_map_compute_op(CS_INT comp_op)
static const char * _ct_get_user_api_layer_error(int error)
static CS_INT ct_diag_storeservermsg(CS_CONTEXT *context, CS_CONNECTION *conn, CS_SERVERMSG *message)
static void param_clear(CSREMOTE_PROC_PARAM *pparam)
recursively erase the parameter list
static char * _ct_get_msgstr(const char *funcname, int layer, int origin, int severity, int number)
static CS_INT ct_diag_getservermsg(CS_CONTEXT *context, CS_INT idx, CS_SERVERMSG *message)
static void rpc_clear(CSREMOTE_PROC *rpc)
static const char * _ct_get_layer(int layer)
static const unsigned char * paramrowalloc(TDSPARAMINFO *params, TDSCOLUMN *curcol, int param_num, void *value, int size)
static const char * ct_describe_cmd_state(CS_INT state)
static int _ct_fetch_cursor(CS_COMMAND *cmd, CS_INT type, CS_INT offset, CS_INT option, CS_INT *rows_read)
Read a row of data.
static CS_RETCODE ct_set_command_state(CS_COMMAND *cmd, CS_INT state)
static TDSRET _ct_process_return_status(TDSSOCKET *tds)
static CS_INT ct_diag_getclientmsg(CS_CONTEXT *context, CS_INT idx, CS_CLIENTMSG *message)
static int _ct_fill_param(CS_INT cmd_type, CS_PARAM *param, const CS_DATAFMT_LARGE *datafmt, CS_VOID *data, CS_INT *datalen, CS_SMALLINT *indicator, CS_BYTE byvalue)
static TDSPARAMINFO * paraminfoalloc(TDSSOCKET *tds, CS_PARAM *first_param)
Allocate memory and copy the rpc information into a TDSPARAMINFO structure.
static int _ct_fetchable_results(CS_COMMAND *cmd)
static CS_DYNAMIC * _ct_allocate_dynamic(CS_CONNECTION *con, char *id, int idlen)
static CS_INT ct_diag_countmsg(CS_CONTEXT *context, CS_INT type, CS_INT *count)
static const char * _ct_get_origin(int origin)
static void _ct_initialise_cmd(CS_COMMAND *cmd)
#define CONV_CAP(ct, tds)
int _ct_handle_interrupt(void *ptr)
static size_t cs_servermsg_len(CS_CONTEXT *ctx)
CS_DATAFMT_LARGE * _ct_datafmt_conv_prepare(CS_CONTEXT *ctx, CS_DATAFMT *datafmt, CS_DATAFMT_LARGE *fmtbuf)
Prepares to Convert CS_DATAFMT output parameter to CS_DATAFMT_LARGE.
bool _ct_is_large_identifiers_version(CS_INT version)
Check if a give version supports large identifiers.
const CS_DATAFMT_COMMON * _ct_datafmt_common(CS_CONTEXT *ctx, const CS_DATAFMT *datafmt)
CS_RETCODE _cs_convert(CS_CONTEXT *ctx, const CS_DATAFMT_COMMON *srcfmt, CS_VOID *srcdata, const CS_DATAFMT_COMMON *destfmt, CS_VOID *destdata, CS_INT *resultlen, TDS_SERVER_TYPE desttype, CS_VOID **handle, BLK_CONV_STATUS *blk_status)
void _ct_datafmt_conv_back(CS_DATAFMT *datafmt, CS_DATAFMT_LARGE *fmtbuf)
Converts CS_DATAFMT output parameter to CS_DATAFMT_LARGE after setting it.
const CS_DATAFMT_LARGE * _ct_datafmt_conv_in(CS_CONTEXT *ctx, const CS_DATAFMT *datafmt, CS_DATAFMT_LARGE *fmtbuf)
Converts CS_DATAFMT input parameter to CS_DATAFMT_LARGE.
operation
Bit operations.
#define tds_get_compiletime_settings
Return a structure capturing the compile-time settings provided to the configure script.
static const char * tds_dstr_cstr(DSTR *s)
Returns a C version (NUL terminated string) of dstr.
#define tds_dstr_empty(s)
Make a string empty.
DSTR * tds_dstr_copy(DSTR *s, const char *src) TDS_WUR
copy a string from another
static size_t tds_dstr_len(DSTR *s)
Returns the length of the string in bytes.
unsigned int
A callback function used to compare two keys in a database.
if(yy_accept[yy_current_state])
static const CS_INT unused
static void text(MDB_val *v)
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
int strncmp(const char *str1, const char *str2, size_t count)
static const GLdouble origin[]
static const char * locale
static const char delimiter[]
#define row(bind, expected)
int get_data_bytes_returned
struct _cs_command * next
CS_INTERRUPT_FUNC _interrupt_cb
CS_SERVERMSG_FUNC _servermsg_cb
CS_CLIENTMSG_FUNC _clientmsg_cb
CS_INT cs_diag_msglimit_client
int login_timeout
not used unless positive
bool use_large_identifiers
structures uses large identifiers
struct cs_diag_msg_client * clientstore
CS_INT cs_diag_msglimit_total
CS_INT cs_diag_msglimit_server
struct cs_diag_msg_svr * svrstore
int query_timeout
not used unless positive
CS_SERVERMSG_FUNC _servermsg_cb
CS_CLIENTMSG_FUNC _clientmsg_cb
CS_INTERRUPT_FUNC _interrupt_cb
struct _cs_dynamic * next
CS_DYNAMIC_PARAM * param_list
CS_SMALLINT indicator_value
CSREMOTE_PROC_PARAM * param_list
struct cs_diag_msg_client * next
struct cs_diag_msg_svr * next
Information about blobs (e.g.
TDS_CAPABILITY_TYPE types[2]
unsigned char values[32/2-2]
Metadata about columns in regular and compute rows.
TDS_TINYINT column_varint_size
size of length when reading from wire (0, 1, 2 or 4)
TDS_TINYINT column_operator
TDS_INT column_size
maximun size of data.
TDS_SMALLINT column_operand
TDS_SMALLINT * column_nullbind
unsigned int column_timestamp
TDS_SMALLINT column_bindtype
unsigned int column_writeable
TDS_TINYINT column_prec
precision for decimal/numeric
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
unsigned int column_identity
TDS_SMALLINT column_bindfmt
unsigned int column_nullable
TDS_TINYINT column_scale
scale for decimal/numeric
unsigned char * column_data
unsigned int column_output
struct tds_column::@124 on_server
TDS_CHAR * column_varaddr
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
unsigned int column_hidden
A structure to hold all the compile-time settings.
const char * freetds_version
TDSENV env
environment is shared between all sessions
TDS_USMALLINT tds_version
int(* msg_handler)(const TDSCONTEXT *, TDSSOCKET *, TDSMESSAGE *)
int(* err_handler)(const TDSCONTEXT *, TDSSOCKET *, TDSMESSAGE *)
int(* int_handler)(void *)
TDS_CURSOR_STATE cursor_row
Holds informations about a cursor.
TDS_TINYINT options
read only|updatable TODO use it
char * cursor_name
name of the cursor
TDS_INT cursor_id
cursor id returned by the server after cursor declare
TDS_INT cursor_rows
< number of updatable columns
TDS_INT type
row fetched from this cursor
TDS_CURSOR_STATUS status
cursor parameter
Structure to hold a string.
Holds information for a dynamic (also called prepared) query.
TDSPARAMINFO * params
query parameters.
TDSPARAMINFO * res_info
query results
int block_size
packet size (512-65535)
DSTR user_name
account for login
unsigned int gssapi_use_delegation
struct addrinfo * ip_addrs
ip(s) of server
DSTR password
password of account login
TDS_CAPABILITIES capabilities
DSTR server_name
server name (in freetds.conf)
DSTR server_charset
charset of server e.g.
unsigned int mutual_authentication
unsigned int bulk_copy
if bulk copy should be enabled
DSTR server_spn
server SPN (in freetds.conf)
Hold information for any results.
Information for a server connection.
TDS_INT ret_status
return status from store procedure
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
TDSDYNAMIC * cur_dyn
dynamic structure in use
TDSRESULTINFO * current_results
Current query information.
TDSPARAMINFO * param_info
Store variant informations.
static CS_CONTEXT * context
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4