[bug-Class-DBI@xx.xxxx.xxx: [cpan #6435] LiveObject caching may return wrong results for compound primary keys]

[prev] [thread] [next] [Date index for 2004/05/28]

From: Tony Bowden
Subject: [bug-Class-DBI@xx.xxxx.xxx: [cpan #6435] LiveObject caching may return wrong results for compound primary keys]
Date: 05:49 on 28 May 2004
--zx4FCpZtqtKETZ7O
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


Tony


--zx4FCpZtqtKETZ7O
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <www-data@xxxxxx.xxxxxxxxxx.xxx>
X-Original-To: tony+tmtm-tony@xxxx.xxxxx.xxx
Delivered-To: tony+tmtm-tony@xxxx.xxxxx.xxx
Received: by soto.kasei.com (Postfix, from userid 107)
	id 03D451CD9A; Thu, 27 May 2004 08:22:01 +0100 (BST)
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170])
	by soto.kasei.com (Postfix) with SMTP id F2A031CCC1
	for <tony@xxxx.xxx>; Thu, 27 May 2004 08:21:59 +0100 (BST)
Received: (qmail 4714 invoked by uid 225); 27 May 2004 07:21:59 -0000
Delivered-To: TMTM@xxxx.xxx
Received: (qmail 4700 invoked by alias); 27 May 2004 07:21:58 -0000
X-Spam-Status: No, hits=0.0 required=7.0
	tests=
X-Spam-Check-By: la.mx.develooper.com
Received: from pallas.eruditorum.org (HELO pallas.eruditorum.org) (63.251.136.85)
  by la.mx.develooper.com (qpsmtpd/0.27.1) with ESMTP; Thu, 27 May 2004 00:21:58 -0700
Received: by pallas.eruditorum.org (Postfix, from userid 33)
	id 20B0784C11B; Thu, 27 May 2004 03:21:33 -0400 (EDT)
Subject: [cpan #6435] LiveObject caching may return wrong results for compound primary keys 
From: "Guest via RT" <bug-Class-DBI@xx.xxxx.xxx>
Reply-To: bug-Class-DBI@xx.xxxx.xxx
In-Reply-To: <rt-6435@cpan>
Message-ID: <rt-6435-19301.11.7312465762735@xxxx.xxx>
Precedence: bulk
X-RT-Loop-Prevention: cpan
RT-Ticket: cpan #6435
Managed-by: RT 2.0.15 (http://bestpractical.com/rt/)
RT-Originator: 
Date: Thu, 27 May 2004 03:21:33 -0400 (EDT)
To: undisclosed-recipients: ;
X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.10


This message about Class-DBI was sent to you by guest <> via rt.cpan.org

Full context and any attached attachments can be found at:
<URL: https://rt.cpan.org/Ticket/Display.html?id=6435 >

Class::DBI 0.96
Perl 5.8.0
RedHat 2.4.21-15.ELsmp
Apache 2.0.46
mod_perl 1.99

I have not run into this (I'm not using compound primary keys) and it's a bit constrived, but if you have a compound primary key consisting of two strings fields A and B, the following two distinct records would be considered the same in LiveObject caching:

A="foo|B=bar"
B="baz"

A="foo"
B="bar|B=baz"

Solution: Use something other than a "|" as the key separator ("\0" might be a good candidate).

--zx4FCpZtqtKETZ7O--

[bug-Class-DBI@xx.xxxx.xxx: [cpan #6435] LiveObject caching may return wrong results for compound primary keys]
Tony Bowden 05:49 on 28 May 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52