Mail Archives: cygwin/2002/02/19/07:49:50
Hello Dani,
Sorry, but I don't know nothing about mysql programming and I can't
help. Still I think you have some kind of programming error, not a
bug in mysql or cygwin themselfs, though I don't have any time to
look at your code - you should find out yourself.
Still, for the record I am forwarding your mail to the cygwin mailing
list where possibly someone else would be kind to help you or give you
an advise, but I don't really think that this mail belongs there too :(
Monday, February 18, 2002, 9:45:51 PM, you wrote:
DP> I've trying lots of things and after 1 day with it, I've achieved to work
DP> part of the code. What I did? I just declared my array before a MYSQL_RES
DP> variable. I had:
DP> MYSQL_RES * result;
DP> char petition[500];
DP> And I changed to:
DP> char petition[500];
DP> MYSQL_RES * result;
DP> And also I did all the string work before the mysql stuff (connection call,
DP> query call,...). And, don't ask me why, it worked! (now it crashes in other
DP> function, in a mysql_query call).
DP> I have not a reasonable answer for this behaviour... I'm quite lost. I've
DP> asked this same question to the mysql-win32 list, and it seems not to be a
DP> mysql problem (according to this list).
DP> I have attached the code (it's in mysql_procs.c, but I have attached all the
DP> files involved-- In order to compile and run, you need Gtk-win32 library),
DP> but you must pardon me because it has been written in Spanish and so,
DP> variables and comments may bore you. The problem I related you was among
DP> the first lines of the code, but the last problem I told you was among the
DP> last lines.
DP> Finally, could I ask you for forward this message to the cygwin list? After
DP> the answers which claim that the error could be caused by mysql, I
DP> unsuscribed from cywgin list, and by now, I'm not suscribed (yet).
DP> Thanks,
DP> Dani P.
DP> ----- Original Message -----
DP> From: Pavel Tsekov <ptsekov AT syntrex DOT com>
DP> To: Dani P. <danielpa AT wanadoo DOT es>
DP> Cc: <cygwin AT cygwin DOT com>
DP> Sent: Monday, February 18, 2002 9:57 AM
DP> Subject: Re: Core dumped just only with strcat!
>> Just tried it - it doesn't dump core here. Is this snippet taken
>> from a larger source ? If so maybe it would be usefull to paste it
>> all. Maybe the core happens somewhere else...
>>
>> Still you can try to debug this by yourself - compile with -g
>> option and launch gdb. Then come back to the list if you suspect
>> a bug in cygwin and not your code :)
>>
>> Dani P. wrote:
>>
>> > Sorry, in my last posting there's an error in the piece of code:
>> >
>> >
>> >>char request[500];
>> >>request[0]=3D'\0'; <------ "3D" should not be here
>> >>strcat(request,"SELECT * FROM data");
>> >>
>> >
>> > I meant that this piece of code dumps a core, not the last posting.
>> >
>> > Thanks,
>> >
>> > Dani
>> >
>> >
>> > ----- Original Message -----
>> > From: Dani P. <danielpa AT wanadoo DOT es>
>> > To: <cygwin AT cygwin DOT com>
>> > Sent: Saturday, February 16, 2002 10:57 AM
>> > Subject: Core dumped just only with strcat!
>> >
>> >
>> >
>> >>I have installed recently cygwin in order to compile a piece of code
>> >>which compiled an d worked fine in Linux, using Gtk and MySQL libraries.
>> >>It compiles fine, but it dumps a core just only with a "strcat". I do
DP> the
>> >>following:
>> >>
>> >>char request[500];
>> >>request[0]=3D'\0';
>> >>strcat(request,"SELECT * FROM data");
>> >>
>> >>And in that last instruction, it dumps a core.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -