Skip to Content.
Sympa Menu

en - [sympa-users] Sympa 5.3.4, get_which_db and Oracle (FetchHashKeyName, NAME_lc)

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Michael Redinger <address@concealed>
  • To: address@concealed
  • Subject: [sympa-users] Sympa 5.3.4, get_which_db and Oracle (FetchHashKeyName, NAME_lc)
  • Date: Mon, 11 Feb 2008 12:40:01 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I found a problem with Sympa 5.3.4 and Oracle (and even a dirty
workaround ...):

I noted that "my lists" was always empty.
I found that fetchrow_hashref in get_which_db returns the database
columns all upper case - even when the query is lower case.
After fixing this, the "my lists" list looks ok.

Having a look at the code (and doing some debugging), I found that the
select statement in get_which_db looks fine:

$statement = sprintf "SELECT list_subscriber, robot_subscriber,
bounce_subscriber, reception_subscriber, topics_subscriber,
include_sources_subscriber, subscribed_subscriber, included_subscriber
FROM subscriber_table WHERE user_subscriber = %s",$dbh->quote($email);

The rows are then fetched with
while ($l = $sth->fetchrow_hashref) {
...

However, the keys returned are:
LIST_SUBSCRIBER
BOUNCE_SUBSCRIBER
...

The next line therefore obviousely fails:
my ($name, $robot) = ($l->{'list_subscriber'}, $l->{'robot_subscriber'});


I therefore edited SQLSource.pm and added
$dbh->{'FetchHashKeyName'}='NAME_lc';
at line 185 (after the DBI->connect).

After this, everything works fine.

Looking at the DBI documentation,this should be the default - obviousely
it is not.


However, this is a rather ugly solution ...
How should this done correctly (eg. can I add this to db_options)?

Thanks,
Michael


- --
Michael Redinger
Zentraler Informatikdienst (Central IT Services)
Universitaet Innsbruck
Technikerstrasse 13 Tel.: ++43 512 507 2335
6020 Innsbruck Fax.: ++43 512 507 949 02335
Austria Mail: address@concealed
BB98 D2FE 0F2C 2658 3780 3CB1 0FD7 A9D9 65C2 C11D
http://homepage.uibk.ac.at/~c102mr/mred-pubkey.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHsDQRD9ep2WXCwR0RAmmsAKCHxwEPB6JznmhpM/jo1eiL7ddYpwCgkv5R
KB/KI+R2cBW3w+5NVOJMFuw=
=WdbO
-----END PGP SIGNATURE-----



Archive powered by MHonArc 2.6.19+.

Top of Page