Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 92331
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.08260



Subject: update test failing due to parens with SQL-Abstract-1.77
Date: Tue, 21 Jan 2014 12:42:42 +0000
To: bug-DBIx-Class [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
With SQL-Abstract-1.77 installed, DBIx-Class now fails a test that previously passed with SQL-Abstract-1.75 installed: t/resultset/update_delete.t ......................... 12/? # Failed test 'Correct update-SQL with multicolumn in support' # at t/resultset/update_delete.t line 122. # SQL expressions differ # got: UPDATE fourkeys SET read_count = read_count + 1 WHERE ( ( foo, bar, hello, goodbye ) IN ( (SELECT me.foo, me.bar, me.hello, me.goodbye FROM fourkeys me LEFT JOIN fourkeys_to_twokeys fourkeys_to_twokeys ON ( fourkeys_to_twokeys.f_bar = me.bar AND fourkeys_to_twokeys.f_foo = me.foo AND fourkeys_to_twokeys.f_goodbye = me.goodbye AND fourkeys_to_twokeys.f_hello = me.hello ) WHERE ( ( fourkeys_to_twokeys.pilot_sequence != ? AND ( ( bar = ? OR bar = ? ) AND ( foo = ? OR foo = ? ) AND ( goodbye = ? OR goodbye = ? ) AND ( hello = ? OR hello = ? ) AND sensors != ? ) ) )) ) ) # expected: UPDATE fourkeys # SET read_count = read_count + 1 # WHERE ( # (foo, bar, hello, goodbye) IN ( # SELECT me.foo, me.bar, me.hello, me.goodbye # FROM fourkeys me # LEFT JOIN fourkeys_to_twokeys fourkeys_to_twokeys ON # fourkeys_to_twokeys.f_bar = me.bar # AND fourkeys_to_twokeys.f_foo = me.foo # AND fourkeys_to_twokeys.f_goodbye = me.goodbye # AND fourkeys_to_twokeys.f_hello = me.hello # WHERE fourkeys_to_twokeys.pilot_sequence != ? AND ( bar = ? OR bar = ? ) AND ( foo = ? OR foo = ? ) AND ( goodbye = ? OR goodbye = ? ) AND ( hello = ? OR hello = ? ) AND sensors != ? # ) # ) # # differing in : # OP [-PAREN] != [SELECT] in # left: ( SELECT me.foo, me.bar, me.hello, me.goodbye FROM fourkeys me LEFT JOIN fourkeys_to_twokeys fourkeys_to_twokeys ON fourkeys_to_twokeys.f_bar = me.bar AND fourkeys_to_twokeys.f_foo = me.foo AND fourkeys_to_twokeys.f_goodbye = me.goodbye AND fourkeys_to_twokeys.f_hello = me.hello WHERE fourkeys_to_twokeys.pilot_sequence != ? AND ( bar = ? OR bar = ? ) AND ( foo = ? OR foo = ? ) AND ( goodbye = ? OR goodbye = ? ) AND ( hello = ? OR hello = ? ) AND sensors != ? ) # right: SELECT me.foo, me.bar, me.hello, me.goodbye # # Looks like you failed 1 test of 32. t/resultset/update_delete.t ......................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/32 subtests The two SQL statements shown differ only in parens and whitespace. SQL::Abstract::Test, which implements this test, says it ignores insignificant parens. Apparently it's disagreeing with some other module about the significance of some of the parens. -zefram
On Tue Jan 21 13:42:56 2014, zefram@fysh.org wrote: Show quoted text
> The two SQL statements shown differ only in parens and whitespace. > SQL::Abstract::Test, which implements this test, says it ignores > insignificant parens. Apparently it's disagreeing with some other > module > about the significance of some of the parens.
This is a combination of a logical inconsistency in SQLA::Test (since fixed in https://github.com/dbsrgits/sql-abstract/commit/7d273452) and a stupid implementation error in DBIC (since patched in https://github.com/dbsrgits/dbix-class/commit/1d1ccc94#diff-2). Available on CPAN as DBIx-Class-0.08250_04 and very soon as 0.08251 (one blocker left).