Quantcast
Channel: perl.dbi.users
Viewing all 225 articles
Browse latest View live

Announce: DBI 1.639 (1 message)

$
0
0
file: $CPAN/authors/id/T/TI/TIMB/DBI-1.639.tar.gz
size: 603697 bytes
md5: f9bf9775b3dbaabc4630b2b29941aa89
sha1: d486ad357708054827017a0d7151554704ce6607

=head2 Changes in DBI 1.639 - 28th December 2017

Fix UTF-8 support for warn/croak calls within DBI internals,
thanks to pali #53
Fix dependency on Storable for perl older than 5.8.9,
thanks to H.Merijn Brand.

Add DBD::Mem driver, a pure-perl in-memory driver using DBI::DBD::SqlEngine,
thanks to Jens Rehsack #42

Corrected missing semicolon in example in documentation,
thanks to pali #55

=cut

Many thanks to those who contributed.

Enjoy!

Tim.

p.s. There wasn't a 1.638 release.

RE: Hunting down (possible) memory leak in DBD::Oracle (3 messages)

$
0
0
I got this case running with valgrind -
Valgrind reported -
8 invalid writes, 8 invalid writes, 2239 accesses to uninitialized values.
All invalid writes have a stack trace leading back to XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662) and ora_st_fetch (oci8.c:4032)

Details follow:

export DATE_MANIP=DM5;
export ORACLE_HOME=/db/app/oracle/product/12.1.0/client_1 ;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib ;
export PATH="$ORACLE_HOME/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin";
export NLS_LANG="AMERICAN_AMERICA.WE8ISO8859P1";
export NLS_NCHAR="AL16UTF16" ;
export NLS_NCHAR_CHARACTERSET="AL16UTF16" ;
export LANGUAGE=en_US:en:C;
export LANG=C;
export LC_ALL=C;
export LC_CTYPE=C;
/bin/rm -rf /feeds/data/search4_1/ProductAttributes-dbi-trace.txt \
/feeds/data/search4_1/getTableData-debug-log.txt \
/feeds/data/search4_1/valgrind-log.txt ;
/usr/local/bin/valgrind \
--tool=memcheck \
--leak-check=yes \
--track-origins=yes \
--leak-check=full \
--show-leak-kinds=all \
--num-callers=100 \
--error-limit=no \
--log-file=/feeds/data/search4_1/valgrind-log.txt \
/usr/local/bin/perl \
[ . . . ]


$ wc -l /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
696325 /copy/sandbox/feeds/data/search4_1/valgrind-log.txt

$ du -h /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
53M /copy/sandbox/feeds/data/search4_1/valgrind-log.txt

$ egrep -c -i 'invalid write' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
8

$ egrep -c -i 'invalid read' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
8

$ egrep -c -i 'uninitialised value' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
2239

$ egrep -n -A20 -i 'invalid write' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt | egrep '(oci8\.c|Oracle\.xsi)'
51575-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51576-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51596-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51597-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51614-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51615-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51670-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51671-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51710-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51711-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51731-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51732-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51771-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51772-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51830-==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51831-==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)

$ egrep -B1 -A20 -i 'invalid write' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt | head -22
==19402==
==19402== Invalid write of size 4
==19402== at 0xBD747E6: __intel_ssse3_rep_memcpy (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xBD6CE95: _intel_fast_memcpy.P (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xCF70D36: kpccclr (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xCF705D7: kpccs2c (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xCF6ED9E: ttccfpg (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xCF6C799: ttcfour (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xCF3B0AE: kpufcpf (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xCF392F5: kpufch0 (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xCF37C34: kpufch (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xB14F1CA: OCIStmtFetch2 (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402== by 0xAA0F269: ora_st_fetch (oci8.c:4032)
==19402== by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
==19402== by 0x6D33069: XS_DBI_dispatch (DBI.xs:3797)
==19402== by 0x4EF240E: Perl_pp_entersub (in /usr/lib64/perl5/CORE/libperl.so)
==19402== by 0x4EEAB85: Perl_runops_standard (in /usr/lib64/perl5/CORE/libperl.so)
==19402== by 0x4E87984: perl_run (in /usr/lib64/perl5/CORE/libperl.so)
==19402== by 0x400D98: ??? (in /usr/bin/perl)
==19402== by 0x6174C04: (below main) (in /usr/lib64/libc-2.17.so)
==19402== Address 0x14ec4275f is 4,095,739,679 bytes inside a block of size 4,095,741,856 in arena "client"
==19402==

New DBI driver DBD::MariaDB (2 messages)

$
0
0
Hello,

I would like to announce a new DBI driver for MariaDB and MySQL
databases. As stated in the email [1] which I sent to this mailing list
about a half year ago, we in the GoodData company decided to create a
fork of the old DBD::mysql driver under the name DBD::MariaDB.

The source code of this new driver is now public, avaiable in our git
repository on GitHub [2]. After we declare it stable we would like to
upload it to CPAN, too.

We hope that this new DBD::MariaDB driver would be useful also for
others and we are open for pull requests or other bug fixes from the
community.

Major changes in DBD::MariaDB since DBD::mysql 4.043 are:

* Correct Unicode support according to the standard Perl Unicode model
* Better compatibility with the MariaDB client library
* Fixes for security issues, SSL/TLS (BACKRONYM and Riddle vulnerabilities)
* Fixes for ZEROFILL columns and magic scalars (needed by Amavis)
* Extended Travis-CI testing

[1] - https://www.nntp.perl.org/group/perl.dbi.dev/2017/08/msg8030.html
[2] - https://github.com/gooddata/DBD-MariaDB

DBD::mysql 4.044 released! (1 message)

$
0
0
Dear Perl and MySQL community,

I'm quite pleased to announce the release of DBD::mysql 4.044!

This release in particular contains a re-application of an earlier SSL
fix that was needed when we reverted a release last year.

Per the Changelog:

---

 Reapply https://github.com/perl5-dbi/DBD-mysql/pull/114 "Improve SSL
settings, reflect changes for BACKRONYM and Riddle vulnerabilities,
enforce SSL encryption when mysql_ssl=1 is set"
  Thank you to Pali Rohar, Daniël van Eeden, Booking.com, et al:w
* Fix parsing configure libs from mysql_config --libs output in Makefile.PL
  Libraries in mysql_config --libs output can be specified by library name
  with the -l prefix or by absolute path to library name without any
prefix.
  Parameters must start with a hyphen, so treat all options without leading
  hyphen in mysql_config --libs output as libraries with full path.
  Partially fixes bug https://rt.cpan.org/Public/Bug/Display.html?id=100898
  Fix by Pali Rohár.
* Return INTs with ZEROFILL as strings. Reported by Knarf, fix by Pali
Rohár.
   https://rt.cpan.org/Public/Bug/Display.html?id=118977
* Correct require on relative path for perl 5.26. Fix by Grinnz.
   https://github.com/perl5-dbi/DBD-mysql/pull/136

This release has been made possible with the excellent work of Pali
Rohár, Daniël van Eeden (http://booking.com), Knarf, Grinnz, and my
co-maintainer, Michiel Beijen.

Also, thanks for Reggie Burnett (who recently set up a slack room for
mysql), Matt Lord, Georg Richter, Paul Dubois, and other former MySQL
colleagues who have been helpful in establishing communications about
things that need to get done in the driver!

I'm particularly please that this release also coincides with my 50th
birthday! I have been maintaining DBD::mysql since 2004 now, and look
forward to future releases containing further improvements as discussed
on the mailing lists and supporting new features in both MySQL and MariaDB.

Thank  you!

Patrick

--

Patrick M. Galbraith
Principal Platform Engineer, Oracle + Dyn
http://patg.net
patg@patg.net
patrick.m.galbraith@oracle.com

Need help with an unexpected behaviour (1 message)

$
0
0
Hi all,

today I stumpled on a behaviour that I didn't expect
this way. And currently I haven't found an explanation.
That's the reason why I want to ask you whether you can
give me the right hints.

Environment:
SL Linux 6.7 64bit
MySQL Community Server 5.5.40
perl 5.10.1
DBI 1.633
DBD::mysql 4.038

The smallest programm I can replicate the problem is
that:
======================8<===============================
1 #!/usr/bin/perl
2 use 5.010;
3 use strict;
4 use warnings;
5
6 use utf8;
7 use DBI;
8
9 my %attr = (
10 'AutoCommit' => 1,
11 'RaiseError' => 1,
12 'FetchHashKeyName' => 'NAME_lc',
13 'mysql_enable_utf8' => 1,
14 );
15
16 my $dsn = 'dbi:mysql:database=XXXXXXX';
17 my $user = 'USERUSER';
18 my $password = 'PASSWORD';
19 my $dbh = DBI->connect($dsn, $user, $password, \%attr);
20
21
22 # Prepare
23 $dbh->do("drop table if exists mca_rb_test");
24 $dbh->do("create table mca_rb_test (
25 name varchar(20) not null primary key
26 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"
27 );
28
29 doit($dbh);
30
31 $dbh->disconnect;
32 say "Ende";
33
34
35 sub doit {
36 my $dbh = shift;
37
38 local $dbh->{'AutoCommit'} = 1;
39
40 $dbh->begin_work;
41 $dbh->do("insert into mca_rb_test values ('short')");
42 $dbh->do("insert into mca_rb_test values
('looooooooooooooooooooooooooooooooooooooooooooooooooong')");
43 $dbh->commit;
44 say "Commit done";
45 return;
46 }

======================8<===============================

Whithout line 38 I get what I expect. The transaction is opened
with begin_work, the first insert statement is done, the second
statement raises an exception which is not catched, the DESTROY
function issues as rollback against the database. After that
I don't see any record in the table.

BUT: As soon as I have line 38 in there, which shouldn't change
the initially set 'AutoCommit', the first insert is commited
to the database even the exeption is raised in the opened
transaction.

Can someone explain what is happening behind the scenes or
give a pointer to some helpful documentation which I have
overlooked?


Best regards
Andreas

Announce DBI-1.640 (1 message)

$
0
0
file: $CPAN/authors/id/T/TI/TIMB/DBI-1.640.tar.gz
size: 603787 bytes
md5: 47d37079ba164908a65fb86f8179cb74
sha1: 2446ea4e139cd56c66f1dd99c58536fa3f4e97cc

=head2 Changes in DBI 1.640 - 28th January 2018

Fix test t/91_store_warning.t for perl 5.10.0
thanks to pali #57

Add Perl 5.10.0 and 5.8.1 specific versions to Travis testing
thanks to pali #57
Add registration of mariadb_ prefix for new DBD::MariaDB driver
thanks to pali #56

=cut

Many thanks to pali for these contributions.

Enjoy!

Tim.

DBD::mysql 4.046 released (3 messages)

$
0
0
Greetings!

I'm pleased to announce the release of DBD::mysql 4.046:

* Use API function for reconnect; fixes compilation on MariaDB 10.2.6+.
  Fix provided by Pali.
* Fixed broken link to MySQL download page, provided by Mohammad S Anwar.
* Spelling fixes, provided by Ville Skyttä.

Many thanks to the Pali Rohár, Ville Skyttä, Michiel Beijen, and of
course the community!

Have a great day!

--

Patrick M. Galbraith
Principal Platform Engineer, Oracle + Dyn
http://patg.net
patg@patg.net
patrick.m.galbraith@oracle.com

Hello Perl Comminity from ATL (2 messages)

$
0
0


Hello Perl Community:



I am working at the CDC in ATL and I found this thread from 2001.

###############################

From:

Sterin, Ilya

Date:

October 30, 2001 09:02

Subject:

RE: Can't locate loadable object for module DBI in @INC

Message ID:


<https://www.nntp.perl.org/group/perl.dbi.users/;msgid=15977008ABB8D5118B130
0805FA7A8F1815994@cibermail2.ciber.com>
15977008ABB8D5118B1300805FA7A8F1815994@cibermail2.ciber.com



Which goes like this.

DBI doesn't work, although I've seen the same script work fine on

> another machine.

>

> The script (called load_bugs, which is supposed to use DBI to populate

a

>

> MySQL database) falls over when it gets to "use DBI". Here is the full



> output:

>

> Can't locate loadable object for module DBI in @INC (@INC contains:

> /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1

> /usr/local/lib/perl5/site_perl/5.6.1/i686-linux

> /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .)



> at /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 189

> BEGIN failed--compilation aborted at

> /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 189.

> Compilation failed in require at ./load_bugs line 9.

> BEGIN failed--compilation aborted at ./load_bugs line 9.

>

> If you look around line 189 of DBI.pm, here's what it says:

>

> # If you get an error here like "Can't find loadable object ..."

> # then you haven't installed the DBI correctly. Read the README

> # then install it again.

> bootstrap DBI;





Well here I am in 2018 and I have the exact same problem with DBIx.

I trying to bring up RT 4.4.2 and apache barf's when RT trying to connect to
the database. RT Test dependencies and make test deps all work fine.



But RT 4.4.2 ( rtserver that gets called from apache2.4 config file)

Complains that it cannot find a .pm called Search .pm when its right in the
@INC of Perl.



Any clues on how to troubleshoot ?










Results of DBI-check on SQL Server 2005. (1 message)

$
0
0
Hi,
I send you the report which shows a small difference with the DBI documentation of
the version 1.636.
Best Regards
Larry A.

DBD::ODBC and issues getting LongTruncOk / LongReadLen to takeeffect (2 messages)

$
0
0
Hi all.

I'm writing a database utility that has to access IBM's "DashDB" and other
DB2-variants. I have their latest ODBC driver, and I have simple queries
working. However queries against their system catalog are not working -
queries appear to be returning *empty* recordsets. After some laborious
debugging, I can see that when I call $sth->fetchrow_array, DBI::errstr is
set to:

st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or
LongReadLen too small) (SQL-HY000)

I've dealt with this before. So when constructing my $dbh, I do:

$self->{dbh}->{LongReadLen} = 65535 * 1024 # 64MB - yes I know it's big
$self->{dbh}->{LongTruncOK} = 1;

This usually fixes things - or at least has for SQL Server and Netezza. For
DB2 connections however, it appears to have no effect.

I've turned on ODBC tracing immediately prior to calling $sth->prepare ...
$sth->execute ... $sth->fetchrow_array:
https://paste.pound-python.org/show/hS6ur7dwGRsQubr29HFT/

This one was from the query:
select * from SYSCAT.COLUMNS

Does anyone know why LongTruncOk / LongReadLen are not being honored here?

I'm using unixODBC-2.3.6, DBD::ODBC from git, and the latest available DB2
ODBC driver.

Please help! Thanks :)

Dan

(Fwd) Perl with Oracle 12c (8 messages)

$
0
0
----- Forwarded message from "Seidler, Reinhard" <Reinhard.Seidler@amtc-dresden.com> -----

Date: Tue, 10 Apr 2018 12:16:09 +0000
From: "Seidler, Reinhard" <Reinhard.Seidler@amtc-dresden.com>
To: "Tim.Bunce@pobox.com" <Tim.Bunce@pobox.com>
Subject: Perl with Oracle 12c

Hi Tim,

We develop Perl applications connecting and working with Oracle database (DBD:Oracle). So far it was
Oracle version 11. Now the database will be migrated to 12.2.0.1. How should we deal with that? Any
answer would be appreciated.

Thanks in advance.

With best regards
Reinhard

***********************************************************
Reinhard Seidler
Automation Engineer

Advanced Mask Technology Center GmbH & Co. KG
Phone: [+49] (0) 351 4048 384
Fax: [+49] (0) 351 4048 189
[1]mailto:reinhard.seidler@amtc-dresden.com

Advanced Mask Technology Center GmbH & Co. KG
Raehnitzer Allee 9 | D-01109 Dresden | GERMANY
Sitz: Dresden
Registergericht: Dresden
HRA Nummer: HRA 4820

persönlich haftender Gesellschafter:
Advanced Mask Technology Center Verwaltungs GmbH
Sitz des persönlich haftenden Gesellschafters: Dresden
Registergericht: Dresden
HRB-Nummer: HRB 22745
Geschäftsführer: Thomas Schmidt
***********************************************************

Diese Mail einschliesslich der Anhänge könnte vertraulich sein. Sollten Sie nicht der beabsichtigte
Empfänger dieser Mail sein, so ist jegliches Verwenden, Offenbaren oder Kopieren der Mail und ihrer
Anhänge untersagt.
Bitte informieren Sie den Absender und löschen Sie die Mail und deren Anhänge von Ihrem Rechner.
Vielen Dank.

This email and its attachments may be confidential and/or privileged. If you are not the intended
recipient, any use, disclosure or copying of this email and its attachments is prohibited.
If you have received this email in error, please notify immediately the sender by return email and
delete this email and its attachments from your computer system. Thank you.




References

Visible links
1. mailto:reinhard.seidler@amtc-dresden.com

----- End forwarded message -----

debugging and stepping into ->do (8 messages)

$
0
0
Hi,

When using DBD::mysql, I can step into the prepare and execute methods of
DBD, but I can't step into do (execution is the next code line after the do
statement). 'do' is defined in DBI.pm this way:

sub do {
my($dbh, $statement, $attr, @params) = @_;
my $sth = $dbh->prepare($statement, $attr) or return undef;
$sth->execute(@params) or return undef;
my $rows = $sth->rows;
($rows == 0) ? "0E0" : $rows;
}


Based on this, if I were to put a breakpoint on execute, I should be able
to see 'do' statements via execute, but I don't. For example:

$dbh->do('insert into foo (a, b) values (1,2)')

should cause the execute method to be called, but that does not seem to be
the case. Is 'do' in DBI/DBD calling some magic method?
--
Jeff Macdonald
Ayer, MA

Extend API for last_insert_id (1 message)

$
0
0
Hello,

I would like to propose two new changes to DBI which extends
last_insert_id API.

First one: Allow to call $dbh->last_insert_id() method without
arguments. Currently this method needs to take four arguments (plus
$dbh) and XS code validates their count:

XS_EUPXS(XS_DBD__Perl__db_last_insert_id)
{
dVAR; dXSARGS;
if (items < 5 || items > 6)
croak_xs_usage(cv, "dbh, catalog, schema, table, field, attr=Nullsv");
...
}

More databases does not process these arguments and caller needs to
supply four undefs.

So I'm proposing change that caller would be allowed to call
$dbh->last_insert_id() without any argument and DBI would fill those
missing arguments by undefs prior to calling DBI driver function. This
does not change driver API, so all existing DBI drivers would work as
before and allows application to not specify those useless four undef
arguments.

Second change: Add a new statement method $sth->last_insert_id().
Some databases (e.g. MariaDB) supports tracking last insert id when more
statement or cursor handles are open. This would allow to call e.g.

$sth1->execute();
$sth2->execute();
...
$sth1->last_insert_id();
$sth2->last_insert_id();

for drivers which would support it. $sth1->last_insert_id() would return
insert it which belongs to last ->execute of $sth1 even there were more
INSERT/execute calls (e.g. by $sth2).

Currently database handle method $dbh->last_insert_id() returns id of
the most recent INSERT statement.

What do you think about those two enhancements?

Here is my prototype implementation for DBI:
https://github.com/perl5-dbi/dbi/compare/master...pali:last-insert-id

DBI drivers can then implement own dbd_st_last_insert_id() function and
provide correct id for the selected $sth statement.

PERL 5.24.1 DBD::Sybase Module Build Error (1 message)

$
0
0
I am trying to build the DBD::Sybase module for PERL 5.24.1 on Solaris 11 and Sybase Open Client 16.0 (ASE 16.0 is not installed on the host). The make test is failing. I found that the expected version string is not present in the version 16 libsybct modules so I hard-coded the version at line 366 of Makefile.PL but that has not resolved the issue. I would greatly appreciate any suggestions for fixing this. Below is the environment and the output of $PERL Makefile.PL, make, and make test. Thanks, in advance, for your time.

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ ls -l /opt/sybase/O*
lrwxrwxrwx 1 sybase sybase 19 May 30 11:10 /opt/sybase/OC -> /opt/sybase/OC-16.0
lrwxrwxrwx 1 sybase sybase 19 May 30 11:10 /opt/sybase/OCS -> /opt/sybase/OC-16.0

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $SYBASE
/opt/sybase/OC
sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $SYBASE_OCS
OCS

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $PATH
/opt/boksm/bin:/bin:/sbin:/usr/ccs/bin:/usr/bin:/usr/sbin:/usr/ucb:/etc:/usr/local/bin:/opt/sybase/OC/OCS/bin:/opt/dba/sybadmin/tools:/usr/local/bin:/usr/sfw/bin:/opt/dba/dbaadmin/util:/bin

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $LD_LIBRARY_PATH
/opt/dba/perl-5.24.1:/opt/sybase/OC/OCS/lib:/opt/sybase/OC/OCS/lib3p:/opt/sybase/OC/OCS/lib3p64:/usr/lib:/usr/lib/lwp:/usr/lib:/usr/local/lib

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $LD_LIBRARY_PATH_64
/opt/dba/perl-5.24.1:/opt/sybase/OC/OCS/lib:/opt/sybase/OC/OCS/lib3p64:/usr/bin

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ echo $PERL
/opt/dba/perl-5.24.1/bin/perl

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ $PERL Makefile.PL
Sybase OpenClient 16.0 found.

By default DBD::Sybase 1.05 and later use the 'CHAINED' mode (where available)
when 'AutoCommit' is turned off. Versions 1.04 and older instead managed
the transactions explicitly with a 'BEGIN TRAN' before the first DML
statement. Using the 'CHAINED' mode is preferable as it is the way that
Sybase implements AutoCommit handling for both its ODBC and JDBC drivers.

Use 'CHAINED' mode by default (Y/N) [Y]:

Running in threaded mode - looking for _r libraries...

***NOTE***
There is an incompatibility between perl (5.8.x or later) built in threaded
mode and Sybase's threaded libraries, which means that signals delivered to
the perl process result in a segment violation.

I suggest building DBD::Sybase with the normal libraries in this case to get
reasonable behavior for signal handling.

Use the threaded (lib..._r) libraries [N]:

OK - I'll use the normal libs

Running in 64bit mode - looking for '64' libraries...
Found -lsybct64 for -lsybct
Found -lsybcs64 for -lsybcs
Found -lsybtcl64 for -lsybtcl
Found -lsybcomn64 for -lsybcomn
Found -lsybintl64 for -lsybintl
Found -lsybblk64 for -lsybblk
BLK api available - found: sybblk64
The DBD::Sybase module need access to a Sybase server to run the tests.
To clear an entry please enter 'undef'
Sybase server to use (default: SYBASE): dbat5
User ID to log in to Sybase (default: sa): n205306
Password (default: undef): abcdef

Sybase database to use on dbat5 (default: undef): master

* Writing login information, including password, to file PWD.


Using DBI 1.636 (for perl 5.024001 on sun4-solaris-thread-multi-64) installed in /opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::Sybase
Writing MYMETA.yml and MYMETA.json

sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ make
Skip blib/lib/DBD/Sybase.pm (unchanged)
Skip blib/lib/DBD/dbd-sybase.pod (unchanged)
Running Mkbootstrap for DBD::Sybase ()
chmod 644 "Sybase.bs"
gcc -c -I/opt/sybase/OC/OCS/include -DSYB_LP64 -I/opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI -D_REENTRANT -mcpu=v9 -m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -fPIC "-I/opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE" Sybase.c
In file included from /opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE/perl.h:5615:0,
from /opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI/DBIXS.h:23,
from Sybase.h:16,
from Sybase.xs:14:
Sybase.xs: In function ‘XS_DBD__Sybase__db_ping’:
Sybase.xs:83:32: warning: implicit declaration of function ‘syb_ping’ [-Wimplicit-function-declaration]
ST(0) = sv_2mortal(newSViv(syb_ping(dbh, imp_dbh)));
^
/opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE/embed.h:581:46: note: in definition of macro ‘sv_2mortal’
#define sv_2mortal(a) Perl_sv_2mortal(aTHX_ a)
^
Sybase.xs:83:24: note: in expansion of macro ‘newSViv’
ST(0) = sv_2mortal(newSViv(syb_ping(dbh, imp_dbh)));
^
Sybase.xs: In function ‘XS_DBD__Sybase__st_cancel’:
Sybase.xs:95:13: warning: implicit declaration of function ‘syb_st_cancel’ [-Wimplicit-function-declaration]
ST(0) = syb_st_cancel(sth, imp_sth) ? &PL_sv_yes : &PL_sv_no;
^
gcc -c -I/opt/sybase/OC/OCS/include -DSYB_LP64 -I/opt/dba/perl-5.24.1/lib/site_perl/5.24.1/sun4-solaris-thread-multi-64/auto/DBI -D_REENTRANT -mcpu=v9 -m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -fPIC "-I/opt/dba/perl-5.24.1/lib/5.24.1/sun4-solaris-thread-multi-64/CORE" dbdimp.c
rm -f blib/arch/auto/DBD/Sybase/Sybase.so
LD_RUN_PATH="/opt/sybase/OC/OCS/lib" gcc -L/opt/sybase/OC/OCS/lib -shared -m64 -L/usr/lib/sparcv9 -L/usr/gnu/lib -fstack-protector Sybase.o dbdimp.o -o blib/arch/auto/DBD/Sybase/Sybase.so \
-L/opt/sybase/OC/OCS/lib -lsybct64 -lsybcs64 -lsybtcl64 -lsybcomn64 -lsybintl64 -lsybblk64 -ldl -lm \

chmod 755 blib/arch/auto/DBD/Sybase/Sybase.so
"/opt/dba/perl-5.24.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Sybase.bs blib/arch/auto/DBD/Sybase/Sybase.bs 644
Manifying 1 pod document


sybase@clpsd00a0001:/dbdump/perl_modules/DBD-Sybase-1.16 ACP$ make test
Running Mkbootstrap for DBD::Sybase ()
chmod 644 "Sybase.bs"
PERL_DL_NONLAZY=1 "/opt/dba/perl-5.24.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/autocommit.t .. ok
t/base.t ........ ok
t/exec.t ........ ok
t/fail.t ........ ok
t/login.t ....... 2/6 DBD::Sybase::db ping failed: ct_cmd_alloc failed at t/login.t line 32.
t/login.t ....... ok
t/main.t ........ Failed 5/36 subtests
t/multi_sth.t ... ok
t/nsql.t ........ ok
t/place.t ....... ok
t/thread.t ...... ok
t/utf8.t ........ 1/11
# Failed test 'got expected row back from \#utf8test'
# at t/utf8.t line 91.
# Structures begin differing at:
# $got->[0]{ut} = '☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2'
# $expected->[0]{ut} = '☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2'

# Failed test 'got expected row back from \#utf8test'
# at t/utf8.t line 151.
# Structures begin differing at:
# $got->[0]{ut} = '☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2'
# $expected->[0]{ut} = '☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2☺ - smiley1 - ☻ - smiley2'
# Looks like you failed 2 tests of 11.
t/utf8.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/11 subtests
t/xblk.t ........ ok
t/xblob.t ....... ok

Test Summary Report
-------------------
t/main.t (Wstat: 139 Tests: 31 Failed: 0)
Non-zero wait status: 139
Parse errors: Bad plan. You planned 36 tests but ran 31.
t/utf8.t (Wstat: 512 Tests: 11 Failed: 2)
Failed tests: 4, 9
Non-zero exit status: 2
Files=13, Tests=247, 3 wallclock secs ( 0.21 usr 0.12 sys + 1.43 cusr 0.50 csys = 2.26 CPU)
Result: FAIL
Failed 2/13 test programs. 2/247 subtests failed.
*** Error code 255
make: Fatal error: Command failed for target `test_dynamic'



Mark Rehert

DBA

EIT | ETI | EIS | Enterprise Data Management (EDM) | Lending
MAC X3800-017 | 8480 Stagecoach Circle | Frederick, Maryland 21701
Tel: 240-651-2536 | Cell: 301-461-9020 | Fax: 240-651-2840

mark.rehert@wellsfargo.com<mailto:mark.rehert@wellsfargo.com>

I am a part-time employee. Below is my intended schedule for the next couple of weeks (Eastern Time).
5/28 – 6/1: Tue – Thr: 8:30 – 5:00
6/4 – 6/8: Mon: 10 – 2, Tue - Wed: 8:30 – 5:00, Thr: 10 – 2
6/11 – 6/15: Tue – Thr: 8:30 – 5:00


This transmission may contain information that is confidential and/or proprietary. If you are not the individual or entity to which it is addressed, note that any review, disclosure, copying, retransmission, or other use is strictly prohibited. If you received this transmission in error, please notify the sender immediately and delete the material from your system. This transmission is for informational purposes only and is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. Any information regarding specific investments or other products is not warranted for completeness or accuracy and is subject to change without notice.


Tim Bunce - RE: DBD-DBI Insert Binary Files and using Perl modulesin cPanel environment (5 messages)

$
0
0
none of the tests were able to add a value pair set to the database. They did execute but no real data was submited. The perl results were shown as the name of the file selected but no real insert. Looking in the database with PHPmyAdmin I feel embarrassed. I didn't see any real results.

worked

#!/usr/bin/perlml -wT
use cPanelUserConfig;
use CGI;
use warnings;
use strict;
use DBI;
use utf8;
my $q= new CGI;
print $q->header("text/plain");

my $dsn= "dbi:mysql:database=video;mysql_enable_utf8mb4=1";
# ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use
my $user= "test";
my $pass= 'password';
my ($dbh, $sth, @row);

$dbh= DBI->connect($dsn, $user, $pass, { PrintError => 0, RaiseError => 1, AutoCommit => 0 } ) or die "Cannot Connect: ".$DBI::errstr;

print "These are the results received\n";

my ($name, $value, @std, $num);

$num=0;
foreach $name ($q->param) {

print "$name: ";

foreach $value ($q->param($name) ) {
$std[$num]= $value;
print "$value\n";
$num= $num+1;
}

}

print "DB Connect Attempted...<br>\n";

#$q->$cgi->upload("file");

$sth= $dbh->prepare("insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])") or die "Error due to - $dbh->errstr";
#do statement can not be used with driver support placeholders hence the prepare statement must be used
$sth->execute($q->param("upload_file")) or die "Error due to - $dbh->errstr";

print "Statement Handle Executed...";

$sth->finish();
$dbh->disconnect();

exit;

worked

#!/usr/bin/perlml -wT
use cPanelUserConfig;
use CGI;
use warnings;
use strict;
use DBI;
use utf8;
my $q= new CGI;
print $q->header("text/plain");

my $dsn= "dbi:mysql:database=video;mysql_enable_utf8mb4=1";
# ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use
my $user= "test";
my $pass= 'password';
my ($dbh, $sth, @row);

$dbh= DBI->connect($dsn, $user, $pass, { PrintError => 0, RaiseError => 1, AutoCommit => 0 } ) or die "Cannot Connect: ".$DBI::errstr;

print "These are the results received\n";

my ($name, $value, @std, $num);

$num=0;
foreach $name ($q->param) {

print "$name: ";

foreach $value ($q->param($name) ) {
$std[$num]= $value;
print "$value\n";
$num= $num+1;
}

}

print "DB Connect Attempted...<br>\n";

#$q->$cgi->upload("file");

$sth= $dbh->prepare("insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])") or die "Error due to - $dbh->errstr";
#do statement can not be used with driver support placeholders hence the prepare statement must be used
$sth->execute(my $cgi->param("upload_file")) or die "Error due to - $dbh->errstr";

print "Statement Handle Executed...";

$sth->finish();
$dbh->disconnect();

exit;

worked

#!/usr/bin/perlml -wT
use cPanelUserConfig;
use CGI;
use warnings;
use strict;
use DBI;
use utf8;
my $q= new CGI;
print $q->header("text/plain");

my $dsn= "dbi:mysql:database=video;mysql_enable_utf8mb4=1";
# ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use
my $user= "test";
my $pass= 'password';
my ($dbh, $sth, @row);

$dbh= DBI->connect($dsn, $user, $pass, { PrintError => 0, RaiseError => 1, AutoCommit => 0 } ) or die "Cannot Connect: ".$DBI::errstr;

print "These are the results received\n";

my ($name, $value, @std, $num);

$num=0;
foreach $name ($q->param) {

print "$name: ";

foreach $value ($q->param($name) ) {
$std[$num]= $value;
print "$value\n";
$num= $num+1;
}

}

print "DB Connect Attempted...<br>\n";
my $cgi->param("upload_file");
#$q->$cgi->upload("file");

$sth= $dbh->prepare("insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])") or die "Error due to - $dbh->errstr";
#do statement can not be used with driver support placeholders hence the prepare statement must be used
$sth->execute() or die "Error due to - $dbh->errstr";

print "Statement Handle Executed...";

$sth->finish();
$dbh->disconnect();

exit;

worked

#!/usr/bin/perlml -wT
use cPanelUserConfig;
use CGI;
use warnings;
use strict;
use DBI;
use utf8;
my $q= new CGI;
print $q->header("text/plain");

my $dsn= "dbi:mysql:database=video;mysql_enable_utf8mb4=1";
# ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use
my $user= "test";
my $pass= 'password';
my ($dbh, $sth, @row);

$dbh= DBI->connect($dsn, $user, $pass, { PrintError => 0, RaiseError => 1, AutoCommit => 0 } ) or die "Cannot Connect: ".$DBI::errstr;

print "These are the results received\n";

my ($name, $value, @std, $num);

$num=0;
foreach $name ($q->param) {

print "$name: ";

foreach $value ($q->param($name) ) {
$std[$num]= $value;
print "$value\n";
$num= $num+1;
}

}

print "DB Connect Attempted...<br>\n";

$q->upload("file");
$sth= $dbh->prepare("insert into video (name, description, blobfile) values (?,?,?)") or die "Error due to - $dbh->errstr";
#do statement can not be used with driver support placeholders hence the prepare statement must be used
$sth->execute($std[0], $std[1], $std[2]) or die "Error due to - $dbh->errstr";

$sth->finish();
$dbh->disconnect();

exit;

worked

#!/usr/bin/perlml -wT
use cPanelUserConfig;
use CGI;
use warnings;
use strict;
use DBI;
use utf8;
my $q= new CGI;
print $q->header("text/plain");

my $dsn= "dbi:mysql:database=video;mysql_enable_utf8mb4=1";
# ;mysql_enable_utf8mb4=1 tells the perl server that the mysql utf must be enabled for use
my $user= "test";
my $pass= 'password';
my ($dbh, $sth, @row);

$dbh= DBI->connect($dsn, $user, $pass, { PrintError => 0, RaiseError => 1, AutoCommit => 0 } ) or die "Cannot Connect: ".$DBI::errstr;

print "These are the results received\n";

my ($name, $value, @std, $num);

$num=0;
foreach $name ($q->param) {

print "$name: ";

foreach $value ($q->param($name) ) {
$std[$num]= $value;
print "$value\n";
$num= $num+1;
}
print "$std[0], $std[1], $std[2]";
}
$q->upload("file");


print "DB Connect Attempted...<br>\n";

$sth= $dbh->prepare("insert into video (name, description, blobfile) values ($std[0], $std[1], $std[2])") or die "Error due to - $dbh->errstr";
#do statement can not be used with driver support placeholders hence the prepare statement must be used
$sth->execute() or die "Error due to - $dbh->errstr";

$sth->finish();
$dbh->disconnect();

exit;

worked


Wierd issue with printf and DBD::Pg (3 messages)

$
0
0
HI
If I use printf to round a numeric value before inserting into postgres
table it is altered to 1 rather than the value when it is put into a table

example
CREATE TABLE public.chksize
(
size numeric(10,2), #does not matter what field type
path1 character varying COLLATE pg_catalog."default"
)

this creates a value of 1 for every value

my $ins=$dbh->prepare("INSERT into chksize (size,path1) VALUES (?,?) ");
open my $list ,'chksizer.txt';
no strict 'refs';
my @list=(<$list>);
foreach my $k (@list){
chomp $k;
my ($size,$path)=split /,/,$k;
my $size1=printf('%.1f',$size/(1024*1024));
$ins->bind_param(1,$size1);
$ins->bind_param(2,$path);
$ins->execute;
}

without printf this inserts proper value

my $ins=$dbh->prepare("INSERT into chksize (size,path1) VALUES (?,?) ");
open my $list ,'chksizer.txt';
no strict 'refs';
my @list=(<$list>);
foreach my $k (@list){
chomp $k;
my ($size,$path)=split /,/,$k;
my $size1=$size/(1024*1024);
$ins->bind_param(1,$size1);
$ins->bind_param(2,$path);
$ins->execute;
}

Any ideas what is happening here?

thanks

Mike

Statically linking DBI and DBD::SQLite into my (Web)Perl (1 message)

$
0
0
Hello all,

I'm not sure if dbi-users is the correct mailing list for my question -
feel free to forward this mail to dbi-dev or whereever is more appropriate.

I'm building a statically linked Perl binary, and I want to include SQL
functionality. This is easy by statically linking DBI. But I've
encountered problems linking DBD::SQLite statically, because its
Makefile.PL uses DBI and wants to use and modify the postamble that
DBI::DBD provides.

My question is: Is there a recipe how I can link DBD::SQLite statically
into my Perl binary? Is there a way I can fake enough of an "installed
DBI" for my static Perl to get the Makefile.PL of a DBD to run, or
should I patch the Makefile.PL to use hardcoded values?

This is all for WebPerl [1] to provide a safe online Perl playground and
also to run Perl in your browser.

Thank you very much,
-max

[1] https://webperl.zero-g.net/

Announce: DBI 1.642 (1 message)

$
0
0
file: $CPAN/authors/id/T/TI/TIMB/DBI-1.642.tar.gz
size: 604581 bytes
md5: f2ba18b5cea1c8cb322a62be0a847f3d
sha1: 4838da411896707eb89acf63ae2d35c88ff841c7

=head2 Changes in DBI 1.642 - 28th October 2018

Fix '.' in @INC for proxy test under parallel load
thanks to H.Merijn Brand.
Fix driver-related croak() in DBI->connect to report the original DSN
thanks to maxatome #67

Introduce a new statement DBI method $sth->last_insert_id()
thanks to pali #64
Allow to call $dbh->last_insert_id() method without arguments
thanks to pali #64
Added a new XS API function variant dbd_db_do6()
thanks to Pali #61

Fix misprints in doc of selectall_hashref
thanks to Perlover #69
Remove outdated links to DBI related training resources. RT#125999

=cut

Many thanks to those who contributed to this release.

Enjoy!

Tim.

p.s. During testing it was discovered that the recent Clone-0.40 release
causes DBI test failures. There's already a Clone-0.41 release that works.
This is very unlikely to impact you. Many thanks to Slaven Rezić for his
testing and investigation https://rt.cpan.org/Ticket/Display.html?id=127501

ANNOUNCE: Informix Database Driver for Perl DBI Version 2018.1031(2018-10-31) released (1 message)

$
0
0
Informix Database Driver for Perl DBI Version 2018.1031 (2018-10-31) has
been uploaded to CPAN.

Informix Database Driver for Perl (also known as DBD::Informix) is
the driver code that enables Perl 5.008001 or later to access Informix
databases via the DBI module (but if you are not already using Perl
5.026002, or a later version, you should be planning to upgrade Perl).
You will need to install DBI version 1.607 or later as well (version 1.642,
or any later version, is recommended) before installing DBD::Informix. The
code for DBD::Informix is available for download via:

http://www.cpan.org/modules/by-category/07_Database_Interfaces
http://dbi.perl.org/

** When you successfully build this module, use the ItWorks (Perl)
** script to report your configuration to the maintenance team (meaning
** Jonathan Leffler) at dbd.informix@gmail.com.
** The ItWorks script does not send email to anybody; you have to do
** that yourself.

New in release 2018.1031
* Latest DBI is 1.642.
* Fix other botched version number references.
* Besides, Halloween is a good day for a release.
* Read the changes for the 2018.0511 release too.

New in release 2018.1029
* Minor tweaks to Announce and ChangeLog for general release.

New in release 2018.0513 (limited trial release):
* Revise guidance in Notes/nonroot.install for modern ExtUtils::MakeMaker.

New in release 2018.0511 (limited trial release):
* Remove support for versions of ESQL/C prior to 3.00 for Informix 11.10.
* Remove support for compilation with C4GL instead of ESQL/C.
* Rework the linking process to exploit 'esql -libs' always.
* Remove support for DG-UX and DEC OSF/1.
* Remove support for 'Windows NT' (t was never shown to work on XP, let
alone Vista, Windows 7, 8 or 10)
* Simplify support for HP-UX and Solaris.
* Stop using the esqlcc, esqlld, esqlsed scripts.
* Remove source code added solely to support unsupported versions of
ESQL/C.
* Remove many conditional compilation fragments for unsupported versions
of ESQL/C.
* Change work email address to jonathan.leffler@hcl.com

New in release 2015.1101:
* Trivial bug fix for the 2015.1031 release.
* The ghosties and ghoulies crept in!

New in release 2015.1031:
* This is basically a minor bug-fix release.
* RT#108030 about mismanaging the name of the Perl binary in Makefile.PL
is fixed.
* RT#108031 is about a missing (actually, misnamed) file in the MANIFEST.

New in release 2015.0826:
* Automatically deal with Perl and DBI minimum versions since the previous
releases had a mish-mash of version numbers scattered through the code.
* Fix DBD::Informix::TechSupport module, thereby fixing the TechSupport and
ItWorks scripts too.
* Note that with effect from the first release from 2016-01-01 onwards,
DBD::Informix will no longer support any version of ClientSDK prior to
version 3.50, the oldest version currently supported by IBM. The support
code for some of the older versions of ESQL/C will be removed over time.
You're welcome to try using older versions, but if anything goes wrong,
you will need to upgrade.

Support email address:
* This release is supported by Jonathan Leffler <dbd.informix@gmail.com>.
* You may also report your bugs via the CPAN resolution tracking system:
http://rt.cpan.org/
* Such bug reports can be sent by email to bug-DBD-Informix@rt.cpan.org;
they also get sent to dbd.informix@gmail.com, etc.

As always, see the ChangeLog file for details about what has changed.

Jonathan Leffler (jonathan.leffler@hcl.com, jonathan.leffler@gmail.com)

@(#)$Id: Announce,v 2018.6 2018/10/31 03:19:43 jleffler Exp $


--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2018.1031 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Generic way of fetching a list of databases (8 messages)

$
0
0
Hi all.

I have a project that has to support pretty much every major database
around, plus a number of more esoteric "big data" platforms as well. Until
now, I've had a bunch of methods, implementing fetching databases, schemas,
tables, etc, per database, with database-specific queries ( eg against
information_schema ).

Some of the newer databases I'm trying to support have very little
documentation, and in some cases no apparent way of fetching in the schema
via SQL. I've had a conversation with one of the tech support people for a
DB product who said that there were generic ODBC functions we can call for
this kind of thing. Is this the case?

I've done quite a bit of search, but can't find any docs that mention
fetching *databases* - either in ODBC docs or in Perl/DBI docs. The closest
I've found that *might* have worked was DBI's tables() method:
https://metacpan.org/pod/DBI#tables
... but:

- this doesn't work in cases where there is a separation between
hierarchies at the database level ( eg postgres only lists schemas and
tables in the current database )
- this isn't returning *anything* for me with any of the ODBC drivers I've
tried

So is it possible to retrieve a list of databases in a generic way? Failing
that, assuming that there *is* some ODBC call ( as suggested by one DB
vendor ) that I can use, is there some way of calling it from Perl with
DBD::ODBC?

Thanks :)

Dan
Viewing all 225 articles
Browse latest View live