DBD-Sybase
view release on metacpan or search on metacpan
627 - Spurious sigset_t declaration.
Release 1.08
Detect missing libblk.a library, and disable the BLK api calls
if necessary.
Added code to force dlopen() to use RTLD_GLOBAL.
Corrected ct_option() functionality detection.
Fixed incorrect handling of bind_params() (Thanks to Tim Bunce).
Added serverType DSN parameter.
Added tds_keepalive DSN parameter.
Fixed incorrect handling of multiple result sets with DBI
1.53 and later.
Re-wrote $dbh->ping() in C, it's now four times faster.
Allow automated build without prompts.
Improved nsql().
Added corrected handling of DATE and TIME values (ASE 12.5.2 and later).
Added handling of UNSIGNED INT and BIGINT (ASE 15 and later).
Added PERL_NO_GET_CONTEXT #define.
Bug Fixes
document.)
$dbh->DBI->connect("dbi:Sybase:bulkLogin=1", $user, $password);
=item serverType
Tell DBD::Sybase what the server type is. Defaults to ASE. Setting it to
something else will prevent certain actions (such as setting options,
fetching the ASE version via @@version, etc.) and avoid spurious errors.
=item tds_keepalive
Set this to 1 to tell OpenClient to enable the KEEP_ALIVE attribute on the
connection. Default 1.
=back
These different parameters (as well as the server name) can be strung
together by separating each entry with a semi-colon:
$dbh = DBI->connect("dbi:Sybase:server=ENGINEERING;packetSize=8192;language=us_english;charset=iso_1",
extractFromDsn("scriptName=", dsn, imp_dbh->scriptName, 255);
extractFromDsn("hostname=", dsn, imp_dbh->hostname, 255);
extractFromDsn("tdsLevel=", dsn, imp_dbh->tdsLevel, 30);
extractFromDsn("encryptPassword=", dsn, imp_dbh->encryptPassword, 10);
extractFromDsn("kerberos=", dsn, imp_dbh->kerberosPrincipal, 255);
extractFromDsn("host=", dsn, imp_dbh->host, 64);
extractFromDsn("port=", dsn, imp_dbh->port, 20);
extractFromDsn("maxConnect=", dsn, imp_dbh->maxConnect, 25);
extractFromDsn("sslCAFile=", dsn, imp_dbh->sslCAFile, 255);
extractFromDsn("bulkLogin=", dsn, imp_dbh->blkLogin, 10);
extractFromDsn("tds_keepalive=", dsn, imp_dbh->tds_keepalive, 10);
extractFromDsn("serverType=", dsn, imp_dbh->serverType, 30);
} else {
strncpy(imp_dbh->server, dsn, 64);
imp_dbh->server[63] = 0;
}
strncpy(imp_dbh->uid, uid, UID_PWD_SIZE);
imp_dbh->uid[UID_PWD_SIZE - 1] = 0;
strncpy(imp_dbh->pwd, pwd, UID_PWD_SIZE);
imp_dbh->pwd[UID_PWD_SIZE - 1] = 0;
}
if (cs_dt_info(context, CS_SET, imp_dbh->locale, CS_DT_CONVFMT,
CS_UNUSED, (CS_VOID*) &type, CS_SIZEOF(CS_INT), NULL)
!= CS_SUCCEED) {
warn("cs_dt_info() failed");
}
}
#if defined(CS_CON_KEEPALIVE)
if (imp_dbh->tds_keepalive[0]) {
int tds_keepalive = atoi(imp_dbh->tds_keepalive);
if (tds_keepalive != 1) {
tds_keepalive = 0;
}
if(DBIc_DBISTATE(imp_dbh)->debug >= 3) {
PerlIO_printf(DBIc_LOGPIO(imp_dbh), "syb_db_login() -> ct_config(CS_CON_KEEPALIVE,%d)\n", tds_keepalive);
}
if((retcode = ct_config(context, CS_SET, CS_CON_KEEPALIVE, &tds_keepalive, CS_UNUSED, NULL)) != CS_SUCCEED) {
warn("ct_config(CS_SET, CS_CON_KEEPALIVE) failed");
}
}
#endif
if ((retcode = ct_con_alloc(context, &connection)) != CS_SUCCEED) {
warn("ct_con_alloc failed");
return 0;
}
char database[260];
char curr_db[36];
char tdsLevel[30];
char encryptPassword[10];
char kerberosPrincipal[256];
char host[64]; /* for use with CS_SERVERADDR */
char port[20]; /* for use with CS_SERVERADDR */
char maxConnect[25];
char sslCAFile[255];
char blkLogin[16];
char tds_keepalive[16];
char serverType[32];
char serverVersion[VERSION_SIZE];
char serverVersionString[255];
int isMSSql;
int isDead;
SV *err_handler;
SV *row_cb;
( run in 2.216 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )