2)Fix some memory leaks.
3)Change some bogus error messages.
/* this is an array of eight integers */
short *short_array = (short *) ( (char *) rgbValue + rgbValueOffset);
- len = 16;
+ len = 32;
vp = value;
nval = 0;
- for (i = 0; i < 8; i++)
+mylog("index=(");
+ for (i = 0; i < 16; i++)
{
if (sscanf(vp, "%hd", &short_array[i]) != 1)
break;
+mylog(" %d", short_array[i]);
nval++;
/* skip the current token */
if (*vp == '\0')
break;
}
+mylog(") nval = %d\n", nval);
- for (i = nval; i < 8; i++)
+ for (i = nval; i < 16; i++)
{
short_array[i] = 0;
}
RETCODE result;
char *table_name;
char index_name[MAX_INFO_STRING];
-short fields_vector[8];
+short fields_vector[16];
char isunique[10], isclustered[10];
SDWORD index_name_len, fields_vector_len;
TupleNode *row;
}
/* bind the vector column */
result = SQLBindCol(hindx_stmt, 2, SQL_C_DEFAULT,
- fields_vector, 16, &fields_vector_len);
+ fields_vector, 32, &fields_vector_len);
if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
stmt->errormsg = indx_stmt->errormsg; /* "Couldn't bind column in SQLStatistics."; */
stmt->errornumber = indx_stmt->errornumber;
(fUnique == SQL_INDEX_UNIQUE && atoi(isunique))) {
i = 0;
/* add a row in this table for each field in the index */
- while(i < 8 && fields_vector[i] != 0) {
+ while(i < 16 && fields_vector[i] != 0) {
row = (TupleNode *)malloc(sizeof(TupleNode) +
(13 - 1) * sizeof(TupleField));
QR_set_message(self, "Error closing cursor.");
return FALSE;
}
+ QR_Destructor(res);
/* End the transaction if there are no cursors left on this conn */
if (CC_cursor_count(self->conn) == 0) {
QR_set_message(self, "Error ending transaction.");
return FALSE;
}
+ QR_Destructor(res);
}
}
if (icol >= cols) {
stmt->errornumber = STMT_INVALID_COLUMN_NUMBER_ERROR;
- stmt->errormsg = "Invalid column number in DescribeCol.";
+ stmt->errormsg = "Invalid column number in ColAttributes.";
SC_log_error(func, "", stmt);
return SQL_ERROR;
}
if (icol >= cols) {
stmt->errornumber = STMT_INVALID_COLUMN_NUMBER_ERROR;
- stmt->errormsg = "Invalid column number in DescribeCol.";
+ stmt->errormsg = "Invalid column number in ColAttributes.";
SC_log_error(func, "", stmt);
return SQL_ERROR;
}
conn = SC_get_conn(self);
if ( ! CC_is_in_autocommit(conn) && CC_is_in_trans(conn)) {
- CC_send_query(conn, "ABORT", NULL);
+ QResultClass *res = CC_send_query(conn, "ABORT", NULL);
+ QR_Destructor(res);
CC_set_no_trans(conn);
}
break;