Date index for Jul 2003
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [achievo] Problem with project ID being 0 when adding new projects
--On Wednesday, July 02, 2003 22:14 +0200 Ivo Jansch <ivo dot
If that is the case, then you must make sure the database user has the
global 'lock tables' privilege. In MySQL 3 this wasn't necessary.
Another weirdness we notice now, is that when registering time now, the
screen in the browser refreshes, but no data actually gets inserted.
I restarted MySQL with the -l option, logging to a file. As you can see,
the INSERT query is there, using 5338 as the nextid value (from the
db_sequence table for hours).
However looking at the hours nextid value in the db_sequence table, that
value stays at 5338, so obviously the INSERT failed.
I did a bit of experimenting, and took our current database (Which we are
running Achievo 8.4) on, and used that with Achievo 9.4 after upgrading, to
see if there was any difference, and the same problem was evident. I also
took our current 8.4 installation, and pointed it to the Achievo demo
database, and the problem wasn't there. So it has something to do with our
current data set.
A bit back and forth, pointing different Achievo installations between the
demo database and our live data set, and I came up with the following:
(I even dumped the data, and restored it to another database name on the
server, to rule out MySQL doing funny things)
problem 8.0 files 8.4 live database
problem 8.4 files 8.4 live database
problem 9.4 files 8.4 live database upgraded to 9.4
no problem 8.0 files 8.4 demo database
no problem 8.4 files 8.4 demo database
no problem 9.4 files 8.4 demo database upgraded to 9.4
In atkconf.inc I enabled $config_debug, and did the time registration
again, and got the following output:
dbg: [ dot
authorizationtype: db, scheme: group)
dbg: [+00.00040s] atkSecurityManager() constructing class auth_pop3
dbg: [+00.09111s] creating sessionManager (namespace: default)
dbg: [+00.09163s] ATKLEVEL : 0
dbg: [+00.09250s] Using session for authentication / user = kim
dbg: [+00.09367s] atkmysqldb.query(): SELECT theme from employee where
userid='kim'
dbg: [+00.09738s] Constructing a new node - hours
dbg: [+00.12689s] atkmysqldb.query(): SELECT week, userid FROM hours_lock
WHERE (userid = 'kim' OR userid = '*') AND week = '200327'
dbg: [+00.14153s] atkmysqldb.query(): SELECT * FROM accessright WHERE
node='hours' AND action IN ('admin','*') ORDER BY action DESC
dbg: [+00.15721s] atkmysqldb.query(): SELECT phase.id, phase.name,
project.name as projectname FROM project,phase,hours WHERE
phase.id=hours.phaseid AND userid='kim' AND phase.status='active' AND
project.status='active' AND phase.projectid=project.id ORDER BY
hours.entrydate DESC LIMIT 0, 100
dbg: [+00.22148s] atkmysqldb.query(): SELECT id, name, description,
remarkrequired, billable FROM activity, phase_activity WHERE
phase_activity.phaseid = 27 AND activity.id = phase_activity.activityid
ORDER BY name
dbg: [+00.22638s] atkmysqldb.query(): SELECT id, name, description,
remarkrequired, billable FROM activity, phase_activity WHERE
phase_activity.phaseid = 92 AND activity.id = phase_activity.activityid
ORDER BY name
dbg: [+00.23081s] atkmysqldb.query(): SELECT id, name, description,
remarkrequired, billable FROM activity, phase_activity WHERE
phase_activity.phaseid = 105 AND activity.id = phase_activity.activityid
ORDER BY name
dbg: [+00.25608s] atkmysqldb.query(): SELECT hours.id,hours.phaseid,B.name
AS al_A,A.name AS al_B,C.name AS
al_C,hours.activityid,hours.remark,hours.time FROM hours JOIN activity C
LEFT JOIN phase A ON A.id=hours.phaseid LEFT JOIN project B ON
B.id=A.projectid WHERE userid='kim' AND activitydate='2003-07-02' AND
C.id=hours.activityid LIMIT 0, 50
dbg: [+00.29949s] atkmysqldb.query(): SELECT COUNT(*) as count FROM hours
JOIN activity C LEFT JOIN phase A ON A.id=hours.phaseid LEFT JOIN project B
ON B.id=A.projectid WHERE userid='kim' AND activitydate='2003-07-02' AND
C.id=hours.activityid
dbg: [+00.34000s] atkmysqldb.query(): SELECT * FROM accessright WHERE
node='hours' AND action IN ('edit','*') ORDER BY action DESC
dbg: [+00.34371s] atkmysqldb.query(): SELECT * FROM accessright WHERE
node='hours' AND action IN ('delete','*') ORDER BY action DESC
dbg: [+00.35418s] Disconnecting from database...
dbg: [+00.35440s] disconnected from the database
I don't see the INSERT query any where. What can I do to see why the INSERT
query fails?
--
Thanks,
Kim Pedersen
tail -f mysql.log
030702 17:41:30 3 Connect achievo dot
3 Init DB achievo8
3 Query SELECT theme from employee where
userid='kim'
3 Init DB achievo8
3 Query SELECT
week, userid
FROM
hours_lock
WHERE
(userid = 'kim' OR userid = '*')
AND
week = '200327'
3 Init DB achievo8
3 Init DB achievo8
3 Field List hours
3 Init DB achievo8
3 Query SELECT * FROM accessright WHERE
node='hours' AND action IN ('add','*') ORDER BY action DESC
3 Init DB achievo8
3 Init DB achievo8
3 Field List activity
3 Init DB achievo8
3 Query SELECT
activity.id,activity.name,activity.description,activity.remarkrequired FROM
activity WHERE id=8 ORDER BY name
3 Init DB achievo8
3 Query SELECT
week, userid
FROM
hours_lock
WHERE
(userid = 'kim' OR userid = '*')
AND
week = '200327'
3 Init DB achievo8
3 Init DB achievo8
3 Query lock tables db_sequence write
3 Query SELECT nextid FROM db_sequence WHERE
seq_name = 'hours'
3 Query UPDATE db_sequence SET nextid = '5338'
WHERE seq_name = 'hours'
3 Init DB achievo8
3 Query unlock tables
3 Init DB achievo8
3 Query INSERT INTO hours
(id,activitydate,userid,phaseid,activityid,remark,time,entrydate) VALUES
('5338','2003-07-02','kim','27','8','Telephone support call blablba this is
a test','15','2003-07-02')
3 Init DB achievo8
3 Query SELECT theme from employee where
userid='kim'
3 Init DB achievo8
3 Query SELECT
week, userid
FROM
hours_lock
WHERE
(userid = 'kim' OR userid = '*')
AND
week = '200327'
3 Init DB achievo8
3 Init DB achievo8
3 Field List hours
3 Init DB achievo8
3 Query SELECT * FROM accessright WHERE
node='hours' AND action IN ('admin','*') ORDER BY action DESC
3 Init DB achievo8
3 Query SELECT phase.id, phase.name,
project.name as projectname FROM project,phase,hours WHERE
phase.id=hours.phaseid AND userid='kim' AND phase.status='active' AND
project.status='active' AND phase.projectid=project.id ORDER BY
hours.entrydate DESC LIMIT 0, 100
3 Init DB achievo8
3 Query SELECT id, name, description,
remarkrequired, billable FROM activity, phase_activity WHERE
phase_activity.phaseid = 27 AND activity.id = phase_activity.activityid
ORDER BY name
[SNIP A BUNCH OF DROP DOWN BOX ENTRIES FOR BREVITYS SAKE]
3 Init DB achievo8
3 Query SELECT
hours.id,hours.activitydate,hours.phaseid,B.name AS al_A,A.name AS
al_B,C.name AS al_C,hours.activityid,hours.remark,hours.time FROM hours
JOIN activity C LEFT JOIN phase A ON A.id=hours.phaseid LEFT JOIN project
B ON B.id=A.projectid WHERE activitydate >= '2003-06-30' AND activitydate
<= '2003-07-06' AND userid='kim' AND C.id=hours.activityid
3 Init DB achievo8
3 Query SELECT * FROM accessright WHERE
node='hours' AND action IN ('lock','*') ORDER BY action DESC