SETUP1)I'm using your latest version, the one posted up on saturday. Both dll files are in my projects folder. I'm using A7.07.4b, C-script, and Mysql 5.1
2) My system has 7 applications that connect to the Database, each under a different username but same password.
3) The queries, when they work, work fine
PROBLEMS1) HOWEVER, I'm getting an intermittent error where I connect to the database (I can see my user connected on the MySql Administrator) but when the application runs, it crashes because mysql_rownum() returns zero and this is later used as a get call.
Code:
num_rows = mySQL_RowNumber(); <--- num_rows == 0 on failure
randomize();
//get Id from Id_List
id_chose = int(random(num_rows)); <--- id_chose == 0 on failure
mySQL_GetStr(Physics1_ID,0,id_chose); <--- CRASH
2) This error does not happen all the time and sometimes it happens with different applications (though it seems to occur more often to applications/connections that connect later to the database).
3) We never encountered this problem with A6.6
SOLUTIONIn every case, if I go into the MySql Administrator, delete the offending user, and remake him, on the next run it will work (until it or another application fails).
SUMMARY Intermittently (ie: we can reproduce the error on demand), the user will connect to the DB but the mysql_rownumber will return a zero down the line. Upon deletion and recreation of the user (same name; same password), the mysql_rownumbers() works fine again.
COMMENTThis sounds similar to the problem Samb was having with mysql_rownumbers(). Samb, if you get the crash, try what I did and redo the user. See if that clears it up. I would be nice to have the same error across the board.
Any idea what could be causing this?
UPDATEI am definitely getting an error with mysql_rownumbers(). I leave my application running after a successful load in. It runs and runs mysql_rownumbers several times. Then all of the sudden the system crashes when this call is made:
Code:
diag("mysql row 1");
mySQL_execQuery(sql_cmd);
diag("mysql row 1.1");
if (mySQL_RowNumber() == 1)
{
diag("mysql row 1.2");
mySQL_getStr(id, 0, 0);
diag("mysql row 1.3");
playerType = mySQL_getVal(1, 0);
}
diag("mysql row 2");
We get to 1.1 but do not get to 1.2 or 2.0. Hence the crash is distinctly when the mysql_rownumbers() call is made.