Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 19 Feb 2002 12:44:24 +0100 From: Pavel Tsekov X-Mailer: The Bat! (v1.53d) UNREG / CD5BF9353B3B7091 Reply-To: Pavel Tsekov Organization: Syntrex, Inc. X-Priority: 3 (Normal) Message-ID: <5810594954.20020219124424@syntrex.com> To: "Dani P." CC: cygwin AT cygwin DOT com Subject: Re[2]: Core dumped just only with strcat! In-Reply-To: <004601c1b8bd$4aa8f100$0100a8c0@daniel> References: <003501c1b6d0$5f9c0dc0$0100a8c0 AT daniel> <003b01c1b6d0$d0959000$0100a8c0 AT daniel> <3C70C1E3 DOT 2050908 AT syntrex DOT com> <004601c1b8bd$4aa8f100$0100a8c0 AT daniel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 DP> To: Dani P. DP> Cc: 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. >> > To: >> > 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/