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

DBD::SQLAnywhere SEGV when Oracle handle exists (7 messages)

$
0
0
DBD::SQLAnywhere seems to work ok for Sybase IQ, but if I first create a
DBD:Oracle handle, the SQLAnywhere connect hangs for a while, and
eventually segfaults. FYI on redhat Linux.

DBD::mysql new development release, test our unicode improvements! (1 message)

$
0
0
(if you rather read a website than plain text, this is also on my
site: https://huntingbears.nl/2017/03/02/dbdmysql-even-more-utf8-issues-fixed-super-ci/)

In my previous mail
(https://huntingbears.nl/2016/12/14/dbdmysql-all-your-utf-8-bugs-are-belong-to-us/)
I explained how many utf-8 related issues are now fixed in the latest
DBD::mysql development release, and I asked for feedback and testing
from our users.

Even better utf-8 handling
----------------------------------
I'm happy to inform you that, thanks to your feedback, we've now
released yet another development version, with even more UTF8 issues
fixed. Tanabe Yoshinori reported that column names and database
warnings were not properly encoded and prolific contributor Pali Rohár
fixed that issue, and much more.

Serialization issue under taint mode
----------------------------------------------
One other issue which was reported by amavisd users has to do with how
perl stores values internally under taint mode, which is the default
way amavisd is run. This is now fixed, see for more information
https://github.com/perl5-dbi/DBD-mysql/issues/78

Extreme CI testing setup
--------------------------------
And Pali also modified our Travis setup so we now do continuous
integration testing not only on many different perl versions, but also
using many different MySQL and MariaDB versions. This uncovered many
smaller and larger issues and we can compile again all the way back
with MySQL against version 4 if you would want that (and we had
multiple people wanting that and filing bug reports for this in the
past). See our .travis.yml file here:
https://github.com/perl5-dbi/DBD-mysql/blob/master/.travis.yml

This also lead to Pali discovering a use-after-free security issue in
libmysqlclient which was fixed in MySQL 5.6 and up but still present
in 5.5 and also in MariaDB. It got assigned CVE identifier
CVE-2017-3302 -
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-3302 - see
for more info this thread on oss-security:
http://www.openwall.com/lists/oss-security/2017/02/11/11 .

Your feedback is welcome!
----------------------------------
Find the full change log below; when all is well on Wednesday 8th of
March we'll release the stable version 4.042, including all these
changes, as well as the changes from the previous post.

You can leave your feedback via the DBI-users mailing list:
http://lists.perl.org/list/dbi-users.html or using our GitHub page:
https://github.com/perl5-dbi/DBD-mysql/


2017-02-28 change log of version 4.041_2
----------------------------------------------------------
* Statement handle now also has mysql_sock attribute, just as database handle.
(by Pali)
* Fix type conversions for magic types. Issue reported by Dmitriy Yatsenko and
Giovanni Bechis, fix by Pali.
https://lists.amavis.org/pipermail/amavis-users/2016-December/004674.html
https://github.com/perl5-dbi/DBD-mysql/issues/78
* Fix UTF8-encoding of table names, field names, warnings and error messages.
Reported by Tanabe Yoshinori, fix by Pali.
https://rt.cpan.org/Public/Bug/Display.html?id=120141
* Fix mysql_auto_reconnect when using mysql_server_prepare (pali). Reported by
Vladimir Marek.
https://github.com/perl5-dbi/DBD-mysql/pull/95
* Improve regex for removing database from dsn (pali)
https://rt.cpan.org/Public/Bug/Display.html?id=118837
* Locate MySQL libs using Devel::CheckLib (pali)
* Support async on Windows (pali)
* Fix test suite on range of older and newer MySQL and MariaDB versions
(https://github.com/perl5-dbi/DBD-mysql/pull/87)
* Fix compilation on MySQL 4.1 (pali)
* Do not leak dangling pointer to mysql result (pali)
* Fix logic when assigning to variable bind_comment_placeholders (pali)
* mysql_fd() still returned file descriptor after closing connection.
Reported by Larry Leszczynski, fixed by Pali Rohár.
(https://rt.cpan.org/Public/Bug/Display.html?id=110983)
* 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.
* Fix support for magic scalars (pali)
(https://github.com/perl5-dbi/DBD-mysql/pull/76)

(Fwd) Oracle.pm (7 messages)

$
0
0
----- Forwarded message from Gowtham <shiningstargautam@gmail.com> -----

Date: Mon, 6 Mar 2017 15:40:59 -0600
From: Gowtham <shiningstargautam@gmail.com>
To: Tim.Bunce@pobox.com
Subject: Oracle.pm

Hi Tim,

I feel that you are the right person to check this with.

I am trying to understand the code on Oracle.pm (DBD::Oracle) to debug my perl code which tries to make a connection to an Oracle DB. My code exits on the below piece of code on debug mode and i am unable to establish the reason for it.
DBD::Oracle::db::_login($dbh,$dbname,$user,$auth,$attr) or return undef;

I am unable to find the definition for the subroutine _login() which will help me to understand the reason for returning 'undef'. Could you please kindly advice me.

Correct me if i have reached a wrong email.

Thanks - Gautam

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

Re: [Dbix-class] Strangely does DBIx change table names from MySQL? (1 message)

$
0
0
DBIC by default follows the convention that table names reflect the entity name in singular. If It detects table names in plural It uses a Lingua::* module to deduce the apropriate singular name, and names the clases with It.

In your case, the table names IS "people", but the generated class name IS "Person", the singular for people.

Admittedly yours IS a bit of an extreme case :-)

This behaviour can be changed, see the docs for DBIC::Schema::Loader and search for an option named like "*inflect*" or something similar (I'm on my cellphone and can't search at the moment :-)

BR
J.

--
Jorge González Villalonga
Ingeniero de Sistemas / Systems Engineer
Red Hat Certified Engineer #140-183-666
Móvil / Cell: (+34) 672 173 200

-----Original Message-----
From: Rajeev Prasad <rp.neuli@yahoo.com>
To: "DBIx::Class User and Developer List" <dbix-class@lists.scsys.co.uk>, "dbi-users@perl.org" <dbi-users@perl.org>, Mysql Mailing List <mysql@lists.mysql.com>, "mysql-index@lists.mysql.com" <mysql-index@lists.mysql.com>
Sent: vie., 10 mar. 2017 17:49
Subject: [Dbix-class] Strangely does DBIx change table names from MySQL?

Hello,
Note: this question is also posted on Stack Overflow, a few minutes back.

|
| While using ./create-schema-mydb.pl I realized that the table name "People" is changed to "Person" in DBIx. I am not sure how? or why?
It is not even a reserved word.

in MySQL:people innoDB utf8

create-schema script:$ cat ./create-schema-mydb.pl
#!/usr/bin/perl

use strict;
use warnings;

use DBIx::Class::Schema::Loader qw/make_schema_at/;

make_schema_at(
"Mydb::Schema",
{debug => 0, dump_directory => "../db/",
generate_pod => 0,},
["dbi:mysql:mydb:localhost:3306", 'mydb', 'password'],
);


It shows up like this after create-schema... note the change in name from People to Person, but inside the .pm file table name is retained as People !!!
Result$ cat Person.pm
use utf8;
package Mydb::Schema::Result::Person;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use base 'DBIx::Class::Core';
__PACKAGE__->table("people");
__PACKAGE__->add_columns(
"pplid",
{
data_type => "smallint",
extra => { unsigned => 1 },
is_auto_increment => 1,
is_nullable => 0,
},
...
...

only relevant portion shown above...


Thank you.

Rajeev
|

Re: DBD::SQLAnywhere SEGV when Oracle handle exists (1 message)

$
0
0
The issue was the libclntsh that Oracle was loading conflicted with
SQLAnywhere , updating Oracle libs and recompiling DBD::Oracle fixes it.
On Mar 7, 2017 2:10 PM, "Douglas Wilson" <douglasg.wilson@gmail.com> wrote:

> That does work, but I can't consider it a practical solution for this.
> Through print/warns, I've determined it craps out at
> sacapi->api.sqlany_connect(...), in dbdimp.c, but that's about as far as
> I can get.
>
> I will probably go back to using DBD::Sybase for IQ connections.
> On Mar 7, 2017 10:11 AM, "Martin J. Evans" <bohica@ntlworld.com> wrote:
>
>> On 06-Mar-17 5:38 PM, Douglas Wilson wrote:
>>
>>> After some searching, I tried using the ora_connect_with_default_signals
>>> with INT and CHLD, and tried setting BEQUEATH_DETACH=yes in a local
>>> sqlnet.ora, but still same result.
>>>
>>
>> Try reversing the order in which you connect - if you can.
>>
>>
>> On Mar 4, 2017 5:17 AM, "Martin J. Evans" <bohica@ntlworld.com
>>> <mailto:bohica@ntlworld.com>> wrote:
>>>
>>> On 02-Mar-17 10:54 PM, Douglas Wilson wrote:
>>>
>>> DBD::SQLAnywhere seems to work ok for Sybase IQ, but if I first
>>> create a
>>> DBD:Oracle handle, the SQLAnywhere connect hangs for a while, and
>>> eventually segfaults. FYI on redhat Linux.
>>>
>>>
>>> I don't have the info to hand right now but I've heard similar
>>> reports before. I think it had something to do with the method used
>>> to connect to Oracle and if that method is chosen it captures
>>> SIGCHLD and maybe another signal as well.
>>>
>>> Martin
>>> --
>>> Martin J. Evans
>>> Wetherby, UK
>>>
>>>
>>

DBD::Pg version 3.6.0 released (1 message)

$
0
0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


Version 3.6.0 of DBD::Pg, the Perl DBI driver for PostgreSQL, is
now available. This release fixes some bugs, adds some new
functions, and makes some behavior changes with regards to
returned data types. Also note that the canonical git repo is now:
git://github.com/bucardo/dbdpg.git

Version 3.6.0 of DBD::Pg can be downloaded here:

http://search.cpan.org/dist/DBD-Pg/

Checksums:

f1c4819acb15c2e2e5650e3571f74ba9 DBD-Pg-3.6.0.tar.gz
3e02e946253fd62d48868a9bdd12a9c7a4d7208e DBD-Pg-3.6.0.tar.gz

Complete list of changes:

Version 3.6.0 Released April 17, 2017 (git tag 3.6.0)

- Make sure we do not inadvertently modify the string passed to prepare() when
doing the new backslash escape manipulation.
[Greg Sabino Mullane]
(CPAN ticket #114000)

- Fix bug where $DBD::Pg::DBDPG_DEFAULT not picked up as a magic
string first time it is used in a script.
[Greg Sabino Mullane]
(CPAN ticket #112309)

- Fix UTF8 flag handling in pg_(get|put)copydata
[Dagfinn Ilmari Mannsåker]

- Fix UTF8 double-encoding with pg_enable_utf8 = 0
[Serge Pushkin]
(CPAN ticket #103137)

- Fix bug in quote_name which would fail to quote in some circumstances
(Github Issue #22)

- Allow clean parsing of new Postgres X.Y version format
[Erik Rijkers er at xs4all.nl]

- Add pg_canonical_ids() and pg_canonical_names(), which returns information
about each column in the result set.
[Warstone warstone at list.ru]
(CPAN ticket #106858)

- Map SQL_NUMERIC to PG_NUMERIC (instead of PG_FLOAT8)
[Alice Maz alice at alizemaz.com]
(CPAN ticket #120358)

- Force real, float, and double precision into SvNVs
[Greg Sabino Mullane]
(CPAN ticket #113683 and other places)

- Support for number of rows greater than an "int". Requires support for same
from a future version of libpq before it will work completely.
[Greg Sabino Mullane]
(CPAN ticket #102444)

- Fix skipped test counts in Win32 builds
[Andy Grundman]

- Allow tests to work against Postgres 8.4 by tweaking client_encoding calls.
[Pavel Raiskup praiskup at redhat.com]
(CPAN ticket #116179)

- Silence warnings in t/02attribs.t and t/04misc.t
[Dagfinn Ilmari Mannsåker]

- Support binary COPY format
[Dagfinn Ilmari Mannsåker]

- Ensure tests do not use $ENV{PGSERVICE} or $ENV{PGDATABASE}
[Erik Rijkers]

- Switched canonical repo to git://github.com/bucardo/dbdpg.git

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 201704251244
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAlj/fVUACgkQvJuQZxSWSsiCiQCfeq/X1zzYKX85LXulAawhYs0w
w3cAoLwcp0cUvB32xeUZ4GQDH0vwZg5D
=5C26
-----END PGP SIGNATURE-----

Announce: DBI 1.637 (1 message)

$
0
0
file: $CPAN/authors/id/T/TI/TIMB/DBI-1.637.tar.gz
size: 596423 bytes
md5: fdcb1739c923300de7bc5250c1c75337
sha1: 183ba1542a7499b508568c1765a4a1bcc4b4bbc9

=head2 Changes in DBI 1.637

Fix use of externally controlled format string (CWE-134) thanks to pali #44
This could cause a crash if, for example, a db error contained a %.
https://cwe.mitre.org/data/definitions/134.html
Fix extension detection for DBD::File related drivers
Fix tests for perl without dot in @INC RT#120443
Fix loss of error message on parent handle, thanks to charsbar #34
Fix disappearing $_ inside callbacks, thanks to robschaber #47

Allow objects to be used as passwords without throwing an error, thanks to demerphq #40
Allow $sth NAME_* attributes to be set from Perl code, re #45
Added support for DBD::XMLSimple thanks to nigelhorne #38

Documentation updates:
Improve examples using eval to be more correct, thanks to pali #39
Add cautionary note to prepare_cached docs re refs in %attr #46
Small POD changes (Getting Help -> Online) thanks to openstrike #33
Adds links to more module names and fix typo, thanks to oalders #43
Typo fix thanks to bor #37

=cut

Many thanks to those who contributed to this release.

Enjoy!

Tim.

Best Practice Using Galera Cluster (1 message)

$
0
0
We have just set up a Galera Cluster on three geographically diverse servers.

How should we modify Perl clients to take advantage of this?

The DBD::mysql manual page gives no indication that we can specify a
cluster (or multiple hosts) instead of a host. I have concluded that
we need to modify client code to handle failures and retries on
different hosts.

Any suggestions otherwise?

--
Garry Williams

DBD::Oracle BLOB updates on multiple rows (1 message)

$
0
0
Hi,?

Running an update like below with DBD::Oracle that updates 2 rows with the same BLOB value bound as ORA_BLOB fails with the following inside oci8.c


if (row_count > 1)
return oci_error(sth, errhp, OCI_ERROR, "LOB refetch attempted for multiple rows");

and I'm having a hard time understanding why it isn't possible to do something like this?


UPDATE tbl SET blobcol=? WHERE id IN (?,?)


I've found advise saying I should bind the parameter as SQLT_BIN (which is the same as ORA_RAW, both have the value 23) and I'm wondering if anyone can explain what is going on here? RAW and BLOB are different data types with different storage mechanisms in Oracle so it feels strange to bind it as SQLT_BIN when the column is a BLOB. It seems to work ok when binding with SQLT_BIN but I would appreciate some clarification on that this is the right way to do it.


If I hack oci8.c and literally remove the above if statement the UPDATE goes through but seemingly produces a broken result where only the last row gets the correct BLOB value and the preceding rows now contain an empty BLOB (i.e. if they had a previous value it gets wiped out).


Just trying to understand what is special about BLOBs in this case. It feels like a perfectly normal use case to be able to update more than one row in a single statement regardless of column data types.


Thanks & kind regards,


/ Marcus

DBD::mysql path forward (23 messages)

$
0
0
Hi all,

After talking to Pali and looking at how other drivers have handled the
issue, the best way forward will be to deal with solving the UTF-8 issue
correctly as was attempted in May. This will be a problem for some, but
only due to having to been accustomed to a work-around that relies on a
intermittent and buggy implementation. The plan is to give ample time to
let people prepare and comment as well as give them a chance to try the
changes and adjust prior to stable release. I'm going to look through
the mailing list and find particularly those who had problems back in
May and June when we tried this before and work with them in advance of
the change.

DBD::mysql should be on par with all the other DBD drivers and allow
transparent usage regardless of backing RDBMS, and this really is the
only way. It will also allow for other fixes to proceed and the driver
to continue improving and supporting all versions and enhancements of
MySQL and MariaDB.

Please do give us your thoughts on this as we want to be as helpful and
transparent as possible.

Thank you!

Patrick

Perl DBI libraries for connecting 12c (9 messages)

$
0
0
‰PNG

IHDR((Œþ¸msRGB®Îé pHYs%%IR$ðtEXtSoftwareMicrosoft Officeí5qÒIDATXG½XÛnW]3Ûqì8v„‚P‘h!P¤"Q©í´R«þA¥~âoúÔÇö©ªZ¨PUå¦4%Hœ8Žßïӵϙ™Œ;©N4{æäœuÖÞ{í½mݾ}·êW®±ïã+˜‘,l/u‡ÃŠë={íüðLû¾u«~ýúø¦q–PbÎ;ær`÷ôÖR€yž`;lã[˜8ÃÇaqu?s~¬FÈlöûŽå!È~ÉYõ%‘[ÈñLÛªyÉ]Že]ÄäÁx—+Œa@5’ÜrZ¸´`šYáô¨ß w>?&÷
œM!à ¼ÓÄò†ÈQún’©t"‚S©8N¤bˆñ{µÝC¾ÜÂv­…v‹¾"`CcR܌{pë¸kN³qœJá³å,®Ÿ™Ål"Šý&î®íáîË"6Z5mzƒ’µ5.[tìîCÜ2‘Ë&ðùù9|qiחfã³B­Ë0±[o£Üè Ê««þÇñϐ̮T‘+ŒH’½÷OLãæ¹,®œžQàdœLÆø=…g;3x»ßÀZ¯®˜úôbÁ@,jâôLO&‘Œù<€s–ÒqÅîI¾uÐ`Ȓyˆ@|‰Löè[]Z½?"‹h‰´‰)dT>w¤ˆû6:=D7+HÇ£˜c€D#ê|¾Z¬au·†Fs§ëDò$ßsÝg@F´; 7¹&åäE¡†;«»dÒÆeFsš~¹Yiáח{xðö¯K´Øû¿qÙæ8¢uJ›8$Pµ^ª+ÆÞ”›¸¼ÂnUšx¸UÆ3‚¯0‚8ƒ»(p”@ž‰6Ê]e ²/(¢æk×±%ü{â¿"ºB™3FSÊ$ٓ›n2Ê­.žïTµ‰Éì~³ƒF›`çðê³óEeå̚KNE•¦¨2­Ãè?hvq ‡ì8¹÷*:§ÎPRÎÍN!=e)"ÔAY_`ñσj›YFóò\Yú©Œ27ÎÓZ< €ZäK3S|/#Ì^<¼0_m135±]i£Äƒ·%ï».á3ý!@y©ßPRòõÊVgTT˟Éçó|ÿhŠu(w6ƒo®ÁGKiõ}m¯ŽßÖKØ';æ§qu1\&j¹&æz-‚,Ö:x²]Á½W%üE×Ù$ضbt0€Ž2Hô"ʟ.Ïá“\fÀ‰ç§cøy­è˜˜ç¼›¹,E]ÏûB~‚sö]ꨜ9¢¥î‚b9„°/Ì6Éz^´ULæóÇ#2#î0®_Öìk[¨y¾#,$ã<T–æê«“1æê1C=?7­ÖŸ\/5ú"|(ŠõjÉãÆgòΕù,ÏücÕ»†äï=š»AÓEÉJ†¾(ºšˆjà|Ââ%*Å­!näU„΢ƒ};’° ÏDJ^Q+Ñ·žR
ô·Ù\YLáÆ{–Ô¢zD<=QlG¸ßuTÀÖæp¬m¼Ød¦¹¿QŠxš/£P%Àx„*0EFõYŽåó3ÑHù.;Câ
À]šöÁ›Üý·ˆ_²“E³.Qv¶)Q’NEüÝ¡ÜóïABXmw•‰×y'ŽÕi©w´ØÓ')¡ÞחC(qÔQM—ÓJ•ûhSN:njà.¡°“>EÛÚQ˜rÓt|á‰D±ä\Õ¶Š"s°CaP0uÝ|¢«j ç
€MM `ÐÍƒÌ `€Z4¾ñŽÚàÿ<ó4o„‰;ÌHEÕ#ý4Ÿ©àˆÖÄy޼¸à$cHߝò‰´¼“u%/#Š÷Ghª }Šhžo_Wbdÿ^×ÿîhÉÏSJò'›£áÆKžÉ;Ҩ֘8ÏíQœ>¥"-D¡ÊŸOö U‹ý1W©ÄU«;´é`_ÑeЛƒ~ø;ß7öN*åùk¾¿Œ·åcæ±5Ð͐Sòãxú…ùYºÆdÌô°Hµ³Z¨³ wzHÖâò³«tf¬ë":5íòî5Jª6…4q`!câ<sÅu¥gy¼UÁ“|Õkþd¥é4»àÓ¨ÝêAýü& ÜîJ¿ë«œékbü!趕|tžúwµ®­Í8ìß
“°í/iôþzç|͞ Y^IwÅÞp1T¹‹NšçбȨNÀeN͵»üiZ”¶øà¼.ðWyg“@d£Aå6è<¿)¼Gq{jœmïðIIþAj»¬ÙrüœóºgÐy°yUqh³ñ¶÷a›[ÿ¢X!T{*uIEND®B`‚

Oracle TAF, FCF and FAN support (1 message)

$
0
0
I'm working with Oracle in a series of payments applications mostly done in Perl that run 24x7.

We're trying to set up our environment to enable database changes (both patching and application changes) in place, transparently to clients/customers/users.


I am using the TAF support built into DBD::Oracle (thanks to the people who did that work) to detect successful failovers, set an environment variable and then croak. I have a subclass of ModPerl::PerlRun looking for that environment variable so if there's an application error because of a server failover, it can re-run the CGI script with the new DB connection.

I am wondering however, if it would be possible to set up FAN support. Reading between the lines of the Oracle docs, I believe that it might be possible to set up an OCI connection pool on the client side that the server would communicate with directly, such that OCI would call the TAF handler with an OCI_FO_END event after a failover.



Has anyone done something like that?



Thanks in advance,



Christopher Everett







U.S. BANCORP made the following annotations
---------------------------------------------------------------------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.

---------------------------------------------------------------------

I probably mentioned this the last time I installed DBD:Oracle but Icouldn't find it... (1 message)

$
0
0
Oracle’s latest instant client for 64-bit linux puts the demo.mk file in /usr/share/oracle/12.2/client64/demo

The DBD::Oracle installer only looks in /usr/share/oracle/12.2/client64/ to find it and thus installing from cpan fails.

Dunno if this is really a reportable bug or not. I just put a symlink to it in the expected directory and everything worked just fine.

--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs


minor changes in a parser (2 messages)

$
0
0
‰PNG

IHDR‰sRGB®ÎégAMA±üa pHYsÃÃÇo¨d9IDAT8O}T[l”Eþþùÿ½_Ú-t[7»-µDk¥4¥­¨5ƒ‰A ‰#ÑßD¼<”Jb$“>˜ Äh¢ñˆ<”B+JÙVÐÒu·-{q·ÛîvÿËxfښ%ˆ“=ÙùÏÌ|sæ|ß9Jì¹V^åvÃä
–Æ¿“eÇÒ?è'‡Ü²¼¯Ü?mã^§F©S/›&û¾¡h*T‡
S (
¸Å¡çgå·æñJŸB由®vžJ%ÁêPùtöڌbQ‹xU³Ù±IãηÇò¹áÐl˜œ™Aý{ÝäO!}´ÕÁ•2åôðÕ{{yéLöÃø;ƒÈ¶í´²øžR:ÅnÇð/ÝLÀítJâ¯8¢£“r>Ø\ƒ`]=RÓCý<øÌF\xs;бÁȊ<Œõߝ„ÝWëÇáöçŸÀ[€ÛíY,€H<Dž†"X_O"@Bå…DÝͨnl”ar9kÃØp⌌`x׸Æ~E*ªº¶À)!à¶/⼏ìyª×/9R¸¡óÂT6u 2’,Ò-Èäòhÿú8üMkð{ïgÈ~u<²
ëOœ½Ÿ±2fTbÉ D›1L÷ˆ›˜e"=rQª.7,0s³øó›£0çæÀKE¬~÷}p:?þåA‰!HÔ%ÚÕځâµ+4'iЂnrbW“wçÇÿh®ÈäÁý2WùTZZºŽºá}($÷2! ¦ªhxõ5$“IèóyÌStQx󋘛C>vÜf§Ð™ÇæõBõ‰ˆ@Ñ»èۅüÂÔ×#=Öuð5=ŽÊæµHß½µnÚ?텙Ïáç[éù,¦Êj’&DM: t<‰Ì¥‹˜8fwÀ,Ÿl©ãU¢h í9kjáZ±öê,ÌLáì¶MPé Bù½gP¤Bsz6C2Øü²Rä“5mêL?ο½?lîDzô@‰Î!{û&LÚhpë^£ˆE¤Ì_ æó˹A>aŒrFµl#«RW“€+ZÚ°æ£ý(.”`PâMò?&ÀÄ:+ä²H'0Ü^Twn„>›4b×2ÐüÖn¬ý¸óT¦nÈÜ=Ȭ¥5å—}{yË®ÝÐIùÙkôÌã(Ëáç»x´‰ÂW‘¾r§vR-ûˆIÊك†,
ýÎ-;°Ó磣°9™ƒˆY÷A7ÂÏFÁNŒöõâê‘>ØIäˍ㿀է®ö$†¨M1ÙU¢_¡\šT¯Ç¿‡B:­%YyÃÜè—:墁å&XÏf7‡ÏCuRiQùNaœžj¯àò‘CHÄ~‚‡ú¤Fò0ÒdÙ¾ÅÜ †5ÊÚ÷|õ2ÓÐe7-›p0ŠœS—ÒTEÔ¡EžÊ÷ˆù’Súÿ¿èUÃmn,%IEND®B`‚

DBD::mysql next steps (1 message)

$
0
0
Greetings all!

Michiel and I have been talking, weighing options of what course to take in
dealing with moving forward-- with the goal of both offering both stability
and the choice to have the latest functionality and bug fixes as well as
give contributors the opportunity to be part of overall improvements to the
driver.

What we are going to do is:

Add to the connection the ability to turn on proper UTF handling with
'mysql_enable_proper_unicode'. This gives the user volition the option to knowingly
toggle whether they want the new functionality and understand that
data structures returned or accepted by the driver might be different
than without this setting.

The other options had their merits, but we think this will solve the issue
while keeping the driver unified and prevent divergence.

Thank you for your input over the last couple months-- we look forward to
moving ahead!

Patrick and Michiel


MySQL IV vs PV (2 messages)

$
0
0
Is there anything in a db handle or statement handle one use to know
whether the running instance of DBD::MySQL will return integer columns
as IV?

I'm adding some code to a layer atop DBI which will force IV (via +=0),
but want to avoid doing that were it is not required.

The particular code path serializes the returned rows via JSON::XS,
hense the need.

-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 0x997A9F17ED7DAEA6

installing DBD::mysql without mysql on the local host (2 messages)

$
0
0
Howdy,

I have a situation where a data feed for a postgres system is disappearing
at the end of the month. I get the same data feed to a MySQL server every
day. I need to use the MySQL databases to update postgres tables.

To do so I need the DBD::mysql driver. My problem is I am in an environment
where DP and system admins do not see eye to eye. My simple solution would
be to install MySQL drivers into either the system perl or to do a complete
perl install into a private directory. But the admins consider this system
frozen and will provide no support and are concerned about any changes to a
production system.

I have permission to install DBD::MySQL into a private directory so I can
access the remote MySQL server. But the admins are not going to go along
with installing the MySQL server.

My question is how to install DBD::MySql into a local directory by itself
without access to the mysql_config application. My postgres host is a
Gentoo 4.12.12 system. MySQL server is a gentoo 4.14 server.

When compiling from source I'm asked for the mysql_config program and the
location of mysql.h. Can I not copy these from my remote MySQL server just
to get the installation up?

TIA for any assistance.

Oracle encoding query (4 messages)

$
0
0
I have an Oracle databse with NLS_CHARACTERSET US7ASCII

I have a table "land", like

create table land (
c_land number (4) not null,
zoekarg varchar2 (5),
land varchar2 (40),
diac number (1),
d_in number (8),
d_end number (8),
opm varchar2 (150),
mut number (1),
icao varchar2 (3),
land_u varchar2 (80)
);

In there the field "land" has the content *without* special characters,
like

Zuidrhodesie

the special characters are stored elsewhere, indicated by the field diac

The field land_u contains the extended land *with* diacriticals, like

Zuidrhodesië
^

in UTF-8 encoding. Note that this is possible because of US7ASCII

what is stored in the database is

Zuidrhodesi\303\253

using perl to extract that makes displaying those values easy, but I
have no idea how I can get programs like SQL Developer to show that
content the way it is intended

Is there an oracle function I could use to convert byte-encode UTF-8
to something SQL developer "understands"

select utf8_bytes_to_utf16_for_sql_developer (land_u) from land;

any hint is welcome. Currently SQL Developer will show

Zuidrhodesi��

where the trailing �'s are both \x0fffd (\N{REPLACEMENT CHARACTER}),
which is not really helpful

I have been playing with several variants of

select convert (land_u, 'AL16UTF16', 'UTF8') from land where c_land = 7072;

but I didn't get SQL Developer to show the ë

--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.27 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/

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

$
0
0
Dear DBI people -

I am trying to port some old perl code to a new box. (see Details below) Needless to say the original box and code works fine, but the new box (and old code) does not.
Specifically what I am seeing is that when I select slightly over a million records from a specific join of two tables (to be dumped one row at a time into a TSV file) we get strange ORA-NNNNN errors that don't really make any sense in this context.
The Same database and same table works fine on the original box with the large number of records. 2 million records always causes errors but two groups of 1million (divided up by ROWNUM - the EXACT same rows) causes no errors. I am using a test database with little activity do I am reasonably certain that the queries deal with the same rows.
So I am thinking the problem is data volume and not any specific piece of data (originally I thought it might be an odd string/data related error, but I am starting to think it is a memory leak of some kind).
The error always happens inside of fetchrow_array - and "$dbh->trace( 4 , $filename )" shows that the error originates inside the DBD::Oracle module while reading field 3 of 6.
Researching the ORA-NNNNNN error gives a perfectly sane description that makes no sense at all in the context of reading a specific field.

We are going thru an Audit and tightening up security so there are some things (like REAL hostnames and REAL column/table names) that I cannot share - but I will try to share as much as I can.

The Host I am calling "prod" below is the only one NOT exhibiting this issue.

Things I want to try -

1) recompile the DBD::Oracle module on Host "sandbox" with "perl Makefile.PL -g" and then use Valgrind. I haven't used Valgrind before, but I guess it is time to learn.
2) Anything else this list suggests.

Details:

Host: prod
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Perl: 5.8.8 built for x86_64-linux
DBI: 1.53
DBD::Oracle: 1.19
Oracle: 10.2.0.1.0

Host: dev
OS: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Perl: 5.16.1 built for x86_64-linux
DBI: 1.631
DBD::Oracle: 1.74
Oracle: 11.2.0.3.0

Host: prodnew
OS: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Perl: 5.16.1 built for x86_64-linux
DBI: 1.631
DBD::Oracle: 1.70
Oracle: 11.2.0.1.0

Host: sandbox
OS: CentOS Linux release 7.4.1708 (Core)
Perl: 5.16.3 built for x86_64-linux-thread-multi
DBI: 1.637
DBD::Oracle: 1.74
Oracle: 12.1.0.2.0

--
Brian Fennell, Software Engineer | Radial
O: 610 491 7308 | M: 484 354 1699
fennellb@radial.com

The information contained in this electronic mail transmission is intended only for the use of the individual or entity named in this transmission. If you are not the intended recipient of this transmission, you are hereby notified that any disclosure, copying or distribution of the contents of this transmission is strictly prohibited and that you should delete the contents of this transmission from your system immediately. Any comments or statements contained in this transmission do not necessarily reflect the views or position of Radial or its subsidiaries and/or affiliates.

>++++++++++[>++++++++++>++++++++++>++++++++++>+++++++++++>+++++++++++>++++++++++>+++++++++++>+++++++++++><<<<<<<<<-]>-->++>+>>>+>-->--><<<<<<<<<>.>.>.>.>.>.>.>.

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

$
0
0
Thanks for the reply, Howard,

I am using the exact same database - a test database that has copies of the production data put into it once a day - besides that it doesn't change much (if at all) during the day.

The SQL I am using doesn't leave out a "bad guy" - I thought of that and actually had an off-by-one gap in some of my early tests. Closed that hole by changing a ">" to a ">=".

Here is the SQL (with the original table and field names changed to allow for sharing

SELECT
d.ROW_NUMBER,
d.f1,
d.f2,
d.f3,
d.f4,
d.f5
FROM
(
SELECT /*+ FULL(A) PARALLEL(A 6) */
rownum ROW_NUMBER,
A.field1 f1 ,
A.field2 f2,
A.field3 f3,
A.field4 f4,
B.field5 f5
FROM
tableA A,
tableB B
WHERE
B.field6 IN ( 'TOK3', 'TOK4', 'TOK5' )
AND B.field7 LIKE 'A%'
AND B.field8 IN ('TOK1', 'TOK2')
AND B.fkfield1 = A.field1
ORDER BY
1, 2, 3, 4, 5
) d
WHERE
d.row_number < 2020000
AND d.row_number >= 1000000

-----Original Message-----
From: Howard, Chris [mailto:HowardC@prpa.org]
Sent: Monday, December 18, 2017 9:21 AM
To: Fennell, Brian <fennellb@radial.com>; dbi-users@perl.org
Subject: RE: Hunting down (possible) memory leak in DBD::Oracle ** EXTERNAL **

Same database... do you mean the actual very same data source?

What is the Oracle error?

To eliminate problems based on data (implicit conversions, that kind of thing) can you do a run from row 500,000 to 1,500,000 ? (I think you have this covered, but maybe that row right at the breaking spot is somehow a bad guy.)




-----Original Message-----
From: Fennell, Brian [mailto:fennellb@radial.com]
Sent: Saturday, December 16, 2017 3:19 PM
To: dbi-users@perl.org
Subject: Hunting down (possible) memory leak in DBD::Oracle ** EXTERNAL **

Dear DBI people -

I am trying to port some old perl code to a new box. (see Details below) Needless to say the original box and code works fine, but the new box (and old code) does not.
Specifically what I am seeing is that when I select slightly over a million records from a specific join of two tables (to be dumped one row at a time into a TSV file) we get strange ORA-NNNNN errors that don't really make any sense in this context.
The Same database and same table works fine on the original box with the large number of records. 2 million records always causes errors but two groups of 1million (divided up by ROWNUM - the EXACT same rows) causes no errors. I am using a test database with little activity do I am reasonably certain that the queries deal with the same rows.
So I am thinking the problem is data volume and not any specific piece of data (originally I thought it might be an odd string/data related error, but I am starting to think it is a memory leak of some kind).
The error always happens inside of fetchrow_array - and "$dbh->trace( 4 , $filename )" shows that the error originates inside the DBD::Oracle module while reading field 3 of 6.
Researching the ORA-NNNNNN error gives a perfectly sane description that makes no sense at all in the context of reading a specific field.

We are going thru an Audit and tightening up security so there are some things (like REAL hostnames and REAL column/table names) that I cannot share - but I will try to share as much as I can.

The Host I am calling "prod" below is the only one NOT exhibiting this issue.

Things I want to try -

1) recompile the DBD::Oracle module on Host "sandbox" with "perl Makefile.PL -g" and then use Valgrind. I haven't used Valgrind before, but I guess it is time to learn.
2) Anything else this list suggests.

Details:

Host: prod
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Perl: 5.8.8 built for x86_64-linux
DBI: 1.53
DBD::Oracle: 1.19
Oracle: 10.2.0.1.0

Host: dev
OS: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Perl: 5.16.1 built for x86_64-linux
DBI: 1.631
DBD::Oracle: 1.74
Oracle: 11.2.0.3.0

Host: prodnew
OS: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Perl: 5.16.1 built for x86_64-linux
DBI: 1.631
DBD::Oracle: 1.70
Oracle: 11.2.0.1.0

Host: sandbox
OS: CentOS Linux release 7.4.1708 (Core)
Perl: 5.16.3 built for x86_64-linux-thread-multi
DBI: 1.637
DBD::Oracle: 1.74
Oracle: 12.1.0.2.0

--
Brian Fennell, Software Engineer | Radial
O: 610 491 7308 | M: 484 354 1699
fennellb@radial.com

The information contained in this electronic mail transmission is intended only for the use of the individual or entity named in this transmission. If you are not the intended recipient of this transmission, you are hereby notified that any disclosure, copying or distribution of the contents of this transmission is strictly prohibited and that you should delete the contents of this transmission from your system immediately. Any comments or statements contained in this transmission do not necessarily reflect the views or position of Radial or its subsidiaries and/or affiliates.

>++++++++++[>++++++++++>++++++++++>++++++++++>+++++++++++>+++++++++++>++++++++++>+++++++++++>+++++++++++><<<<<<<<<-]>-->++>+>>>+>-->--><<<<<<<<<>.>.>.>.>.>.>.>.


*** This email is from an EXTERNAL sender *** Use caution before responding. DO NOT open attachments or click links from unknown senders or unexpected email. If this email appears to be sent from a Platte River Power Authority employee or department, verify its authenticity before acting or responding. Contact the IT Help Desk with any questions.
Viewing all 225 articles
Browse latest View live