FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bug on 64Bit

 
Post new topic   Reply to topic     Forum Index -> DDBI
View previous topic :: View next topic  
Author Message
Krox



Joined: 01 May 2008
Posts: 2
Location: Germany

PostPosted: Thu May 01, 2008 4:24 pm    Post subject: bug on 64Bit Reply with quote

I think I found a bug and partially solved it, but I'll begin from the beginning. I started getting a segfault everytime I did a SELECT command with more then one column. After some testing I found, that some structs have the wrong size on 64 Bit, so I compared mysql.h and imp.d and in fact, I found differences:

The fields "length" and "max_length" of the struct MYSQL_FIELD are 64Bit on x86-64, so I changed it from uint to size_t. I think at least the first six elements of st_mysql_options have a similar problem. Probably there are more, I haven't checked it all yet.

Now I don't get a segfault anymore, but there is some other strange behavior, so I didn't solved the whole problem yet.

Before I forget: DDBI is a great work, but doesn't seem very active. I hope it wont die?

Krox
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu May 01, 2008 5:15 pm    Post subject: Reply with quote

Hi Krox,

we are at least a few who follows it such that bugs can be fixed - please post a ticket with a patch if possible. Further development has been somewhat low lately though.
Back to top
View user's profile Send private message
Krox



Joined: 01 May 2008
Posts: 2
Location: Germany

PostPosted: Fri May 02, 2008 4:33 am    Post subject: Reply with quote

Okay, I've now gone through all the structs in dbi/mysql/imp.d and corrected the stuff as far as I could. See the ticket for details and the patched file. Sry, that it isn't a diff-file, but i wasn't sure, how to use diff the right may, actually thats my first contribution to another open source project Very Happy

With the patch, I don't get a segfault anymore, but the values I get for everything except the first column are simply wrong. Maybe, I'll take a second look at that when I have enough time.
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu May 08, 2008 1:46 am    Post subject: Reply with quote

Thanks! Will look to have it committed soon.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DDBI All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group