mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-15 16:11:42 +00:00
Improve batching debug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@24430 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
977cc2af29
commit
e5aed160c1
1 changed files with 6 additions and 4 deletions
10
JDBC.m
10
JDBC.m
|
@ -1786,13 +1786,14 @@ static id marker = @"End of statement data";
|
|||
{
|
||||
jintArray ja;
|
||||
jint *array;
|
||||
int status = 0;
|
||||
|
||||
/* We have multiple statements without arguments ... so this
|
||||
* is batchable.
|
||||
*/
|
||||
for (statement = 0; statement < numberOfStatements; statement++)
|
||||
{
|
||||
NSString *stmt = [statements objectAtIndex: statement++];
|
||||
NSString *stmt = [statements objectAtIndex: statement];
|
||||
jobject js;
|
||||
|
||||
js = (*env)->CallObjectMethod(env, ji->statement,
|
||||
|
@ -1806,7 +1807,8 @@ static id marker = @"End of statement data";
|
|||
array = (*env)->GetIntArrayElements(env, ja, 0);
|
||||
for (statement = 0; statement < numberOfStatements; statement++)
|
||||
{
|
||||
if (array[statement] < 0 && array[statement] != -2)
|
||||
status = array[statement];
|
||||
if (status < 0 && status != -2)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -1820,8 +1822,8 @@ static id marker = @"End of statement data";
|
|||
if (statement != numberOfStatements)
|
||||
{
|
||||
[NSException raise: NSGenericException
|
||||
format: @"Problem with statement %d in batch",
|
||||
statement];
|
||||
format: @"Statement %d error %d in batch with %@",
|
||||
statement, status, [statements objectAtIndex: statement]];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue