You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Harsh Gupta (JIRA)" <ji...@apache.org> on 2012/11/29 09:08:58 UTC
[jira] [Created] (ROL-1953) mysql roller_permission insert
statements not defined correctly in 400-to-500-migration.vm and
400-to-500-migration.sql file
Harsh Gupta created ROL-1953:
--------------------------------
Summary: 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
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