----- Forwarded message from Dave Dyer <[email protected]> -----
Date: Tue, 01 Sep 2015 12:40:00 -0700
From: Dave Dyer <[email protected]>
To: [email protected]
Subject: perl DBI bug report
This query produces results with lots of trailing nulls
embedded in the "outcome" value. I suppose this might
be expected to do something odd at the sql engine level,
but embedding null characters, which do not occur in any
of the elements, can't be correct.
my $q = "select
matchgroup.status,player,points,tournament,outcome,played,"
. "
matchparticipant.comment,tournament_group,matchparticipant.uid"
. " from matchparticipant left join matchgroup "
. " on matchparticipant.tournament =
matchgroup.uid and matchgroup.name = matchparticipant.tournament_group "
. " where matchid=$qm "
# note that because of the particular structure
of this join query, $outcome seems to be padded with a lot of nulls
. " union select
matchgroup.status,-2,0,tournament,if(admin='winner',admin_winner,admin),played,"
. " matchrecord.comment,tournament_group,'A'"
. " from matchrecord left join matchgroup "
. " on matchrecord.tournament =
matchgroup.uid and matchgroup.name = matchrecord.tournament_group "
. " where matchid=$qm "
. " order by uid ";
----- End forwarded message -----