mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-19 01:50:49 +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;
|
jintArray ja;
|
||||||
jint *array;
|
jint *array;
|
||||||
|
int status = 0;
|
||||||
|
|
||||||
/* We have multiple statements without arguments ... so this
|
/* We have multiple statements without arguments ... so this
|
||||||
* is batchable.
|
* is batchable.
|
||||||
*/
|
*/
|
||||||
for (statement = 0; statement < numberOfStatements; statement++)
|
for (statement = 0; statement < numberOfStatements; statement++)
|
||||||
{
|
{
|
||||||
NSString *stmt = [statements objectAtIndex: statement++];
|
NSString *stmt = [statements objectAtIndex: statement];
|
||||||
jobject js;
|
jobject js;
|
||||||
|
|
||||||
js = (*env)->CallObjectMethod(env, ji->statement,
|
js = (*env)->CallObjectMethod(env, ji->statement,
|
||||||
|
@ -1806,7 +1807,8 @@ static id marker = @"End of statement data";
|
||||||
array = (*env)->GetIntArrayElements(env, ja, 0);
|
array = (*env)->GetIntArrayElements(env, ja, 0);
|
||||||
for (statement = 0; statement < numberOfStatements; statement++)
|
for (statement = 0; statement < numberOfStatements; statement++)
|
||||||
{
|
{
|
||||||
if (array[statement] < 0 && array[statement] != -2)
|
status = array[statement];
|
||||||
|
if (status < 0 && status != -2)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1820,8 +1822,8 @@ static id marker = @"End of statement data";
|
||||||
if (statement != numberOfStatements)
|
if (statement != numberOfStatements)
|
||||||
{
|
{
|
||||||
[NSException raise: NSGenericException
|
[NSException raise: NSGenericException
|
||||||
format: @"Problem with statement %d in batch",
|
format: @"Statement %d error %d in batch with %@",
|
||||||
statement];
|
statement, status, [statements objectAtIndex: statement]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue