I have a problem with
mysql_fetch_field_row (mysql_get_field). In all queries
when I try to use this function more than one time I get
segmentation fault.
I've already found
thread about the same problem, but there is no solution found.
OS: Ubuntu 10.10 x64 [also tried on
Ubuntu 10.10 x32]
MySQL version: 5.1.54-1ubuntu4
Server version: 0.3d RC9
Plugin version: R6-2
Query:
Код:
SELECT `id`, `column1`, `column2` FROM `table` WHERE `column3`=0
PAWN code:
pawn Код:
mysql_query("SELECT `id`, `column1`, `column2` FROM `table` WHERE `column3`=0");
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_get_field("column1",tmp);
if(strval(tmp) > 0)
{
mysql_get_field("id",tmp);
// some stuff
mysql_get_field("column2",tmp);
}
}
mysql_free_result();
Debug.txt:
Код:
[10:28:54] ---------------------------
[10:28:54] MySQL Debugging activated (11/20/11)
[10:28:54] ---------------------------
[10:28:54]
[10:28:54] >> mysql_set_charset( Connection handle: 1 )
[10:28:54] >> mysql_query( Connection handle: 1 )
[10:28:54] CMySQLHandler::Query(SET NAMES 'cp1251') - Successfully executed.
[10:28:54] >> mysql_query( Connection handle: 1 )
[10:28:54] CMySQLHandler::Query(UPDATE `table2` SET `somecolumn` = 0) - Successfully executed.
[10:28:54] >> mysql_query( Connection handle: 1 )
[10:28:54] CMySQLHandler::Query(SELECT `id`, `column1`, `column2` FROM `table` WHERE `column3`=0) - Successfully executed.
[10:28:54] >> mysql_store_result( Connection handle: 1 )
[10:28:54] CMySQLHandler::StoreResult() - Result was stored.
[10:28:54] >> mysql_retrieve_row( Connection handle: 1 )
[10:28:54] >> mysql_fetch_field_row( Connection handle: 1 )
[10:28:54] CMySQLHandler::FetchField("column1") - 1309637542
[10:28:54] >> mysql_fetch_field_row( Connection handle: 1 )
There is nothing significant in
server_log.txt. Server just crashes with message "Segmentation fault" in shell.
Does anyone know how to solve it? Thanks in advance.
P.S. Also tried to use mysql-client libraries from Mow's
post, but it stills segfaulting.