-
Incident report
-
Resolution: Fixed
-
Minor
-
None
modify a web scenario. executed queries are a bit strange
a)
SELECT p.value_id,p.source FROM profiles p WHERE p.userid=1 AND p.idx='web.httpconf.applications' ORDER BY p.profileid
DELETE FROM profiles WHERE userid=1 AND idx='web.httpconf.applications'
SELECT p.value_id,p.source FROM profiles p WHERE p.userid=1 AND p.idx='web.httpconf.applications' ORDER BY p.profileid
just in case delete silently failed ?
b)
SELECT i.nextid FROM ids i WHERE i.nodeid=0 AND i.table_name='profiles' AND i.field_name='profileid'
UPDATE ids SET nextid=nextid+1 WHERE nodeid=0 AND table_name='profiles' AND field_name='profileid'
SELECT i.nextid FROM ids i WHERE i.nodeid=0 AND i.table_name='profiles' AND i.field_name='profileid'
INSERT INTO profiles (profileid, userid, idx, value_id, type) VALUES (139, 1, 'web.httpconf.applications', 356, 1)
wouldn't it be better to update the record instead of deleting it, updating ids table, then recreating it ?