![]() |
2011-10-02
, 09:59
|
Posts: 176 |
Thanked: 190 times |
Joined on Jun 2011
@ Italy
|
#12
|
The Following User Says Thank You to blackjack4it For This Useful Post: | ||
![]() |
2011-10-02
, 13:27
|
Posts: 249 |
Thanked: 277 times |
Joined on May 2010
@ Brighton, UK
|
#13
|
CREATE TRIGGER gc_update_ev_add1 BEFORE INSERT ON Events FOR EACH ROW WHEN NEW.group_uid IS NOT NULL BEGIN INSERT OR IGNORE INTO GroupCache (event_id, service_id, group_uid, total_events, read_events, flags) VALUES (0, NEW.service_id, NEW.group_uid, 0, 0, 0); END;
CREATE TRIGGER gc_update_ev_add4 AFTER INSERT ON Events FOR EACH ROW WHEN NEW.group_uid IS NOT NULL BEGIN UPDATE GroupCache SET event_id = NEW.id, total_events = total_events + 1, read_events = read_events + NEW.is_read, flags = flags | NEW.flags WHERE group_uid = NEW.group_uid; END;
CREATE TRIGGER gc_update_ev_update AFTER UPDATE ON Events FOR EACH ROW WHEN NEW.group_uid IS NOT NULL BEGIN UPDATE GroupCache SET read_events = read_events - OLD.is_read + NEW.is_read, flags = (flags & (~OLD.flags)) | NEW.flags WHERE group_uid = NEW.group_uid; END;
const char * sqlUpdateGroupCache(
"INSERT OR REPLACE INTO groupcache "
"SELECT id, service_id, group_uid, total, readcount, mergedflags "
"FROM events e, "
"(SELECT max(start_time) as maxdate, group_uid as maxgid, count(group_uid) as total, total(is_read) as readcount, _OR(flags) as mergedflags "
"FROM events "
"GROUP BY maxgid) maxresults "
"WHERE group_uid = maxgid AND start_time=maxresults.maxdate "
"GROUP BY group_uid");
![]() |
2011-11-18
, 00:11
|
Posts: 85 |
Thanked: 97 times |
Joined on May 2011
|
#14
|
select * from events where is_read = 0
update "events" set "is_read" = 1 where "is_read" = 0
select * from events where remote_uid = ""
update "events" set "remote_uid" = "+12345678901" where "id" = 2233
select * from events where flags = "1"
update "events" set "flags" = "0" where "flags" = "1"
update "groupcache" set flags = "0" where flags != "0"
![]() |
2011-11-21
, 23:21
|
Posts: 140 |
Thanked: 20 times |
Joined on Apr 2011
|
#15
|
![]() |
2011-11-22
, 19:11
|
Posts: 85 |
Thanked: 97 times |
Joined on May 2011
|
#16
|
Wow, this is pretty nifty [and fu***n advanced] thread! I wished I could make a better sense of it and fix my N900 that get SMS messages completely messed up (sent sms lost, incoming sms in disarray and outgoing ones never marked as sent or delivered). N900+me=love/hate-relationship
Anyways, I want to learn and fix my /rtcom-evetlogger/ database, but I am not sure which of the suggestions posted here is the solution and all seem different.
On a specific note: I got Sqliteman, but how do I extract the home/user/.rtcomm-eventlogger/el-v1.db to my computer? Please step by step, including how to put it back.
I am a noob, but I want to learn and try fixing this. (Hey, I got sudo gainroot thing on my N900
Thank you in advance!
sudo gainroot
cp /home/user/.rtcom-eventlogger/el-v1.db /home/user/.rtcom-eventlogger/el-v1_backup.db
cp /home/user/.rtcom-eventlogger/el-v1.db /home/user/MyDocs/el-v1_backup.db
exit
sudo gainroot
cp /home/user/MyDocs/el-v1.db /home/user/.rtcom-eventlogger/el-v1.db
chown user:users /home/user/.rtcom-eventlogger/el-v1.db
chmod 644 /home/user/.rtcom-eventlogger/el-v1.db
ls -l /home/user/.rtcom-eventlogger/
exit
The Following 2 Users Say Thank You to computerinfo21 For This Useful Post: | ||
![]() |
2011-11-22
, 20:44
|
Posts: 140 |
Thanked: 20 times |
Joined on Apr 2011
|
#17
|
![]() |
2011-11-22
, 21:21
|
Posts: 140 |
Thanked: 20 times |
Joined on Apr 2011
|
#18
|
Thank you for great instructions on how to proceed, especially with clear steps for x terminal.
I was able to find loads of messages with "select * from events where is_read = 0" and some with "flag=1" but I don't seem to be able to figure out how to perform a correction step in Sqliteman. (Lol, never used or heard of it before, and just got it figured intuitively.)
![]() |
2011-11-22
, 22:08
|
Posts: 140 |
Thanked: 20 times |
Joined on Apr 2011
|
#19
|
![]() |
2011-11-23
, 17:45
|
Posts: 85 |
Thanked: 97 times |
Joined on May 2011
|
#20
|
All operations completed. Results: everything seems to be like before :-P
I can not yet attest to the "sent messages getting lost" or other issues that occur during usage, but the sms history is now repaired (!)for one of the important sms threads I inspected. Thanks!
p.s. Do you know how to force Nokia Ovi Suite to reload msgs from the device so that the phone database changes would get reflected on my PC? (Without deleting the Ovi database. I have old msgs that are no longer on the phone [I cleared all sms threads on my N900 sometime ago] and also other older Nokia both stored in Ovi.)
Sadly I still haven't found a reliable way to fix those issues... So if someone has got any ideas feel free to post those - and sorry I was so silent lately... time is pretty rare at the moment..