My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 268: upgrade016_017_mysql.sql incorrectly populates changes.change_key
  Back to list
Status:  Released
Owner:  code-rev...@gtempaccount.com
Closed:  Oct 2012


Sign in to add a comment
 
Reported by code-rev...@gtempaccount.com, Sep 24, 2009
Reported by Benjamin Gilbert <bgilbert@backtick.net> on Wed Aug 26 10:10:21 PDT 2009
Source: JIRA GERRIT-269
Affected Version: 2.0.19.1
Environment: MySQL 5.0.75 from Ubuntu Jaunty

The statement:

UPDATE changes SET change_key = 'I' || (SELECT p.revision FROM patch_sets p
WHERE p.change_id = changes.change_id AND p.patch_set_id = 1);

in upgrade016_017_mysql.sql always sets change_key to either 0 or 1, since ||
is the logical-OR operator.  I think you want:

UPDATE changes SET change_key = CONCAT('I', (SELECT p.revision FROM patch_sets
p WHERE p.change_id = changes.change_id AND p.patch_set_id = 1));
Sep 24, 2009
#1 code-rev...@gtempaccount.com
Comment by Shawn Pearce <sop@google.com> on Wed Aug 26 10:14:06 PDT 2009

Fixed by Ib9b35b6928d3c4113052d6e6c7ff2c910f669b98
Sep 24, 2009
#2 code-rev...@gtempaccount.com
Update by Shawn Pearce <sop@google.com> on Wed Aug 26 10:14:06 PDT 2009

Fixed in version 2.0.20.
Status: Fixed
Sep 25, 2009
#3 code-rev...@gtempaccount.com
(No comment was entered for this change.)
Labels: FixedIn-2.0.20
Oct 21, 2012
#4 sop@google.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting