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