First and foremost:
Windows 7 - .56c-Nightly Build 2681 2/6/2016
Okay, so I have TWO functions, whose names have been changed for simplicity... also, it is assumed that I have a working and established MySQL database connection with the following tables:
"testing" and "accounts"
The "accounts" table was created (last week) to mirror the accounts from Sphere and also keep an updated web-accessible record of last used IPs, last connect time, passwords, etc... it's also used as a web-based account registration system. PHP form --> MySQL table --> Sphere, via various scripts. This table currently has two rows, both containing data for the two accounts that I have in Sphere.
The "testing" table was created later (today) to debug the issue at hand. This table contains 9 rows of data, some empty entries included just to see if Sphere will handle it. The columns are named "data1" "data2" etc... and the rows have basic strings like "hello" and "fdhsjfa478343".
On to the functions:
Code:
[function function2]
db.query "select * from testing"
[function function1]
db.query "select * from accounts"
function2 gives me no console activity, so I did this:
Code:
[function function2]
db.query "select * from testing"
for x 0 <eval <db.row.numrows> -1>
serv.log @TEST: Row # <dlocal.x> - data = <db.row.<dlocal.x>.2>
endfor
Running the above command gives me a nice clean loop through the data in column 2, including some empties. No console errors.
Back to function1, still looking like this:
Code:
[function function1]
db.query "select * from accounts"
and this is what I get....
Code:
23:01:DEBUG:__ thread (3772) __ | # | _____ function _____________ | ticks passed from previous function start ______
23:01:DEBUG:>> 3772 | 0 | CServer::OnTick | +0
23:01:DEBUG:>> 3772 | 1 | CServer::OnConsoleCmd | +0
23:01:DEBUG:>> 3772 | 2 | CServer::r_Verb | +0
23:01:DEBUG:>> 3772 | 3 | CScriptObj::r_Call | +0
23:01:DEBUG:>> 3772 | 4 | CScriptObj::OnTriggerRun | +0
23:01:DEBUG:>> 3772 | 5 | CServer::r_Verb | +0
23:01:DEBUG:>> 3772 | 6 | CScriptObj::r_Verb | +0 <-- exception catch point (below is guessed and could be incorrect!)
23:01:DEBUG:>> 3772 | 7 | CGFile::Close | +0
23:01:CRITICAL:(sphere_sql_functions.scp,47)"Access Violation" (0x16cf44), in CScriptObj::Verb()
23:01:DEBUG:command 'db.query' args '"select * from accounts' [0297B680]
If I run the FOR loop on "accounts" table, I get a return on the FIRST row only, the above error still happens, and then my FOR loop is broken... even tried adding more rows to the mix, and the loop breaks after the first row is returned.
BOTH tables were created using PHPMyAdmin... I have renamed columns, tables, rows, even renamed data to take out all special characters and try to get the two similar in the sense that they both contain simple columns and rows of data... each and EVERY time I run these tests, each and every WAY I can possibly think of, I get the same results... Sphere hates the table I need to use, and likes the table that I don't.
Edit: I also forgot to mention that this does not happen with the pre-release executable.
-NW