Re: mysql C API hang
Erich Dollansky <[email protected]> Mon, 04 Apr 2005 10:28:28 +0800
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Organization | oceanare pte ltd |
| Message-ID | <[email protected]> |
Hi, Karl wrote: >>>sprintf(query,"update database.table set something='something else' > > where > >>>username='someone'"); >>>mysql_query(&mysql,query); >>> >> >>Could it be a memory problem? > > how can i test it? > Write all queries to a log file and / or print the length of each query if longer than 1KB to the screen or another log file. > >>WHat do you do with the connection after each update? > > mysql is always connected > I never left a connection open this long. > >>Where is 'query' stored? At the stack or the heap? > > char query [2048]; > shoult be long enough. > Should and is are two different things if you do not check the length of the input data. Erich -- MySQL Bugs Mailing List For list archives: http://lists.mysql.com/bugs To unsubscribe: http://lists.mysql.com/[email protected]