2 messages in com.mysql.lists.mysqlmysql_query memory
FromSent OnAttachments
Melanie Ware10 Mar 2004 07:51 
Sasha Pachev10 Mar 2004 15:43 
Subject:mysql_query memory
From:Melanie Ware (war@hotmail.com)
Date:03/10/2004 07:51:12 AM
List:com.mysql.lists.mysql

I am using mysql 4.0.17 on Red Hat Linux.

I am using the C API to access mysql

The application I am writing should parse a xml file and write details to the mysql database.

The xml elements as they are read are fed into a simple data structure. On the completion of the structure details the datbase should be checked for a prior entry.

This works successfully for the first 3 entries. The 4th. entry executes the SELECT statement but appears to wipe the structure contents

The code is as follows.

select_query = "SELECT file_id FROM File WHERE file_name = 'RPCMap.h'";

mysql_query (conn, select_query);

I know that the line containing the mysql_query statement destroys the struture data content because I have used gdb to print the structure values as I step through the code.

Thanks

Melly