I have a complex web application consisting of several programs totalling about 100k lines of C code that has been running successfully under Linux.
To improve security, I want to port the application to MacOS X, where considerably less effort goes into designing security breaches. When I try compiling my programs on MacOS X, they compile fine, but in many cases I am getting a "Commands out of Sync" error when previously I had no errors. They seem to fail consistently in the same place, but I'm having a really tough time telling why they're failing. The problem seems to happen in the following circumstances: * I have nested queries - that is, I run one query in a loop, and have the results from that query drive another. For instance, select id from menu where title = 'test' and then select id, title from submenu where menu_id = [menu ID from first query] * It appears to be linked to a function I have where I use mysql_fetch_fields or mysql_fetch_field to get all the field names in a query. At first I thought there might be some kind of cleanup required for those functions, but I could not find it. What I did notice was that switching from mysql_fetch_fields to mysql_fetch_field was able to solve the problem in some, but not all, cases. * My SQL query function that I use for all queries returning values uses mysql_store_result. I never use the use_result function, so that can be ruled out as a reason for the problem. I was wondering in what way this type of thing would work differently in MacOS X versus Linux, and what sorts of solutions I should look to to trouble shoot the problem. I have written mySQL C programs in MacOS X before, and none of them have given me this kind of difficulty. In fact, I normally have no trouble moving the programs between Linux, MacOS X and Irix ... except now. I have used the same basic functions in other projects and they have worked fine on all platforms, so I'm baffled as to what I might have done wrong here. One other thing that changed is that I'm accessing the mySQL database server remotely from the MacOS X box, while leaving the actual database on the Linux box, which for now is still running the working copy of the web application. Would that make any difference? Can anyone point me in the right direction or suggest some ways to approach the problem? Many thanks. D -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]