25.09.2011, 19:13
I tried the current version of that plugin.
Sending queries to the MySQL-Server works. But reading the field data sends my server to death.
That is my test code:
The server crashs where it should execute mysql_fetch_field(). I can see "num fields: 5" but not "field 1: ...".
Debug output of the MySQL plugin:
Are there any solutions for that problem?
Sending queries to the MySQL-Server works. But reading the field data sends my server to death.

That is my test code:
Код:
new query[256];
format(query, sizeof(query), "SELECT * FROM `positions` WHERE `Name` = '%s'", name);
mysql_query(query);
mysql_store_result();
if (mysql_retrieve_row())
{
printf("num fields: %d", mysql_num_fields());
new value[256];
mysql_fetch_field(1, value);
printf("field 1: %s", value);
}
Debug output of the MySQL plugin:
Код:
[21:24:10] >> mysql_query( Connection handle: 1 ) [21:24:10] CMySQLHandler::Query(SELECT * FROM `positions` WHERE `Name` = 'test') - Successfully executed. [21:24:10] >> mysql_store_result( Connection handle: 1 ) [21:24:10] CMySQLHandler::StoreResult() - Result was stored. [21:24:10] >> mysql_retrieve_row( Connection handle: 1 ) [21:24:10] >> mysql_num_fields( Connection handle: 1 ) [21:24:10] CMySQLHandler::NumFields() - Returned 5 field(s) [21:24:10] >> mysql_fetch_field( Connection handle: 1 )

