Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

corrupted DB: table data len 8 #51

Closed
lunny opened this issue Apr 28, 2014 · 4 comments
Closed

corrupted DB: table data len 8 #51

lunny opened this issue Apr 28, 2014 · 4 comments
Assignees

Comments

@lunny
Copy link

lunny commented Apr 28, 2014

CREATE TABLE IF NOT EXISTS no_id_user (user string, remain int, total int);

CREATE UNIQUE INDEX UQE_no_id_user_user ON no_id_user (user);

DELETE FROM no_id_user WHERE user == "xlw";

INSERT INTO no_id_user (user, remain, total) VALUES ("xlw", 20, 100);

SELECT no_id_user.user, no_id_user.remain, no_id_user.total FROM no_id_user WHERE user == "xlw" LIMIT 1;
Lunny:ql lunny$ ql ql.db "SELECT no_id_user.user, no_id_user.remain, no_id_user.total FROM no_id_user"
2014/04/28 16:11:02 corrupted DB: table data len 8
@cznic cznic self-assigned this Apr 28, 2014
@cznic
Copy link
Owner

cznic commented Apr 28, 2014

Cannot reproduce:

~$ cd ~/tmp
~/tmp$ rm -f ql.db
~/tmp$ ql 'CREATE TABLE IF NOT EXISTS no_id_user (user string, remain int, total int);'
~/tmp$ ql 'CREATE UNIQUE INDEX UQE_no_id_user_user ON no_id_user (user);'
~/tmp$ ql 'DELETE FROM no_id_user WHERE user == "xlw";'
~/tmp$ ql 'INSERT INTO no_id_user (user, remain, total) VALUES ("xlw", 20, 100);'
~/tmp$ ql 'SELECT no_id_user.user, no_id_user.remain, no_id_user.total FROM no_id_user WHERE user == "xlw" LIMIT 1;'
2014/04/28 10:09:25 unknown field no_id_user.user
~/tmp$ ql 'SELECT user, remain, total FROM no_id_user WHERE user == "xlw" LIMIT 1;'
"xlw", 20, 100
~/tmp$ 

I will try to run more tests with -race etc. If you find a more reliable reproduction case please share it. Thanks.

cznic pushed a commit that referenced this issue Apr 28, 2014
@cznic
Copy link
Owner

cznic commented Apr 28, 2014

I have added a test for this issue. Fixed a new found bug in DB.Info, but I don't know if it can be related. Anyway, please test the last commit.

I have run the test case under a race detector several times and it always passed OK. I guess the bug is real, but I need a way to trigger it to be able to fix it.

cznic pushed a commit that referenced this issue Apr 28, 2014
@cznic
Copy link
Owner

cznic commented Apr 28, 2014

@lunny
Please test also latest commit 73aa065, thank you.

@cznic
Copy link
Owner

cznic commented May 5, 2014

@lunny

Cannot reproduce + no feedback -> #Timeout

@cznic cznic closed this as completed May 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants