You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2012/12/30 17:28:12 UTC
[jira] [Resolved] (ROL-1953) mysql roller_permission insert
statements not defined correctly in 400-to-500-migration.vm and
400-to-500-migration.sql file
[ https://issues.apache.org/jira/browse/ROL-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Glen Mazza resolved ROL-1953.
-----------------------------
Resolution: Fixed
Fix Version/s: 5.0.2
5.1
Instructions added for possible workaround if concatenated key values get too large.
> mysql roller_permission insert statements not defined correctly in 400-to-500-migration.vm and 400-to-500-migration.sql file
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: ROL-1953
> URL: https://issues.apache.org/jira/browse/ROL-1953
> Project: Roller
> Issue Type: Bug
> Components: Installation
> Affects Versions: 5.0
> Environment: any
> Reporter: Harsh Gupta
> Assignee: Roller Unassigned
> Fix For: 5.1, 5.0.2
>
>
> Here select statement is a combination of w.id and w.username whereas the column where it has to insert is roller_permission's id column that doesn't have enough length to fit in.
> concat function is incorrectly used here according to me and if i just use select w.id , upgrade works for me
> insert into roller_permission (id,username,actions,objectid,objecttype,pending,datecreated)
> select concat(w.id, u.username) , u.username, 'edit_draft', w.handle, 'Weblog', 0, current_timestamp
> from rolleruser as u, website as w, roller_user_permissions as p
> where p.user_id = u.id and p.website_id = w.id and permission_mask = 1;
> insert into roller_permission (id,username,actions,objectid,objecttype,pending,datecreated)
> select concat(w.id, u.username) , u.username, 'author', w.handle, 'Weblog', 0, current_timestamp
> from rolleruser as u, website as w, roller_user_permissions as p
> where p.user_id = u.id and p.website_id = w.id and permission_mask = 2;
> insert into roller_permission (id,username,actions,objectid,objecttype,pending,datecreated)
> select concat(w.id, u.username) , u.username, 'admin', w.handle, 'Weblog', 0, current_timestamp
> from rolleruser as u, website as w, roller_user_permissions as p
> where p.user_id = u.id and p.website_id = w.id and permission_mask = 3;
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira