int mysql_class::execute_query(wxString query)
{
int result = 1;
count_rows = 0;
count_cols = 0;
//const char* real_query;
//real_query = (const char*)malloc(length_query);
//real_query = query.c_str();
result = mysql_real_query(conn, query, (unsigned long)query.Length());
if(result == 0)
{
count_cols = mysql_field_count(conn);
if(count_cols == 0)
count_rows = mysql_affected_rows(conn);
else
{
res = mysql_store_result(conn);
use_result = true;
count_rows = mysql_num_rows(res);
count_cols = mysql_num_fields(res);
fd = mysql_fetch_fields(res);
data_row=mysql_fetch_row(res);
current_row = 0;
}
}
//free((void*)real_query);
query.Clear();
return result;
}
Work of this function from exe the program does not cause problems,
But at use built - in LUA the interpreter
It is not cleared used for query memory.
Why?
And how it to avoid?
It is beforehand grateful for the answer.
The program can be found here
http://saxi.nm.ru/BaseEdit.zip
http://saxi.nm.ru
Edited 1 time(s). Last edit at 09/23/2005 02:46AM by max .