SC_recycle_statement(stmt);
MYLOG(0, "%s: ipar=%d, paramType=%d, fCType=%d, fSqlType=%d, cbColDef=" FORMAT_ULEN ", ibScale=%d,", func, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale);
- MYLOG(0, "rgbValue=%p(" FORMAT_LEN "), pcbValue=%p\n", rgbValue, cbValueMax, pcbValue);
+ MYPRINTF(0, "rgbValue=%p(" FORMAT_LEN "), pcbValue=%p\n", rgbValue, cbValueMax, pcbValue);
return SQL_SUCCESS;
}
break;
default:
SC_set_error(stmt, STMT_PROGRAM_TYPE_OUT_OF_RANGE, "Bind column 0 is not of type SQL_C_BOOKMARK", func);
-MYLOG(1, "Bind column 0 is type %d not of type SQL_C_BOOKMARK", fCType);
+MYLOG(1, "Bind column 0 is type %d not of type SQL_C_BOOKMARK\n", fCType);
ret = SQL_ERROR;
goto cleanup;
}
{
Int2 lf;
-MYLOG(1, "ARD_unbind_cols freeall=%d allocated=%d bindings=%p", freeall, self->allocated, self->bindings);
+MYLOG(1, "ARD_unbind_cols freeall=%d allocated=%d bindings=%p\n", freeall, self->allocated, self->bindings);
for (lf = 1; lf <= self->allocated; lf++)
reset_a_column_binding(self, lf);
if (freeall)
{
Int2 lf;
-MYLOG(1, "GDATA_unbind_cols freeall=%d allocated=%d gdata=%p", freeall, self->allocated, self->gdata);
+MYLOG(1, "GDATA_unbind_cols freeall=%d allocated=%d gdata=%p\n", freeall, self->allocated, self->gdata);
if (self->fdata.ttlbuf)
{
free(self->fdata.ttlbuf);
char *errmsg = NULL;
size_t errmsglen;
- MYLOG(1, "handle_pgres_error");
+ MYLOG(1, "handle_pgres_error\n");
if (res && pgres)
{
#endif /* _MSC_VER */
);
qlog(vermsg);
- MYLOG(0, "%s", vermsg);
+ MYLOG(0, "%s\n", vermsg);
qlog("Global Options: fetch=%d, unknown_sizes=%d, max_varchar_size=%d, max_longvarchar_size=%d\n",
ci->drivers.fetch_max,
ci->drivers.unknown_sizes,
{
if (sscanf(vp, "%hi", &shortv) != 1)
break;
- MYLOG(0, " %hi", shortv);
+ MYPRINTF(0, " %hi", shortv);
nval++;
if (nval < maxc)
short_array[i + 1] = shortv;
if (*vp == '\0')
break;
}
- MYLOG(0, ") nval = %i\n", nval);
+ MYPRINTF(0, ") nval = %i\n", nval);
if (maxc > 0)
short_array[0] = nval;
else
*((UCHAR *) rgbValue + bind_row) = atoi(neut_str);
- /*
- * MYLOG(0, "SQL_C_BIT: bind_row = %d val = %d, cb = %d,
- * rgb=%d\n", bind_row, atoi(neut_str), cbValueMax,
- * *((UCHAR *)rgbValue));
- */
+ MYLOG(99, "SQL_C_BIT: bind_row = " FORMAT_POSIROW " val = %d, cb = " FORMAT_LEN ", rgb=%d\n",
+ bind_row, atoi(neut_str), cbValueMax, *((UCHAR *)rgbValue));
break;
case SQL_C_STINYINT:
result = char2guid(neut_str, &g);
if (COPY_OK != result)
{
- MYLOG(0, "Could not convert to SQL_C_GUID");
+ MYLOG(0, "Could not convert to SQL_C_GUID\n");
return COPY_UNSUPPORTED_TYPE;
}
len = sizeof(g);
* digit is at calv[0]
*/
-MYLOG(1, " len2=%d", len);
+MYPRINTF(1, " len2=%d", len);
/* build the final output string. */
newlen = 0;
static void ARDFields_free(ARDFields * self)
{
-MYLOG(1, "ARDFields_free %p bookmark=%p", self, self->bookmark);
+MYLOG(1, "ARDFields_free %p bookmark=%p\n", self, self->bookmark);
if (self->bookmark)
{
free(self->bookmark);
self->bookmark = NULL;
}
-MYLOG(1, " hey");
/*
* the memory pointed to by the bindings is not deallocated by the
* driver but by the application that uses that driver, so we don't
targethd->desc_type = srchd->desc_type;
}
ard_src = &(src->ardf);
-MYLOG(1, " rowset_size=" FORMAT_LEN " bind_size=%d ope_ptr=%p off_ptr=%p\n",
+MYPRINTF(1, " rowset_size=" FORMAT_LEN " bind_size=%d ope_ptr=%p off_ptr=%p\n",
ard_src->size_of_rowset, ard_src->bind_size,
ard_src->row_operation_ptr, ard_src->row_offset_ptr);
ard_tgt = &(target->ardf);
-MYLOG(1, " target=%p", ard_tgt);
+MYPRINTF(1, " target=%p", ard_tgt);
ARDFields_copy(ard_src, ard_tgt);
-MYLOG(1, " offset_ptr=%p\n", ard_tgt->row_offset_ptr);
+MYPRINTF(1, " offset_ptr=%p\n", ard_tgt->row_offset_ptr);
break;
case SQL_ATTR_APP_PARAM_DESC:
if (!targethd->type_defined)
/* extra info */
hlen = strlen(connect_string);
nlen = MAX_CONNECT_STRING - hlen;
-MYLOG(1, "hlen=" FORMAT_SSIZE_T, hlen);
+MYLOG(1, "hlen=" FORMAT_SSIZE_T "\n", hlen);
if (!abbrev)
{
char protocol_and[16];
MYLOG(1, "i=%d", i);
if (apdopts->parameters[i].data_at_exec)
{
-MYLOG(1, " at exec buffer=%p", apdopts->parameters[i].buffer);
+MYPRINTF(1, " at exec buffer=%p", apdopts->parameters[i].buffer);
estmt->data_at_exec--;
estmt->current_exec_param = i;
estmt->put_data = FALSE;
SQLULEN offset = apdopts->param_offset_ptr ? *apdopts->param_offset_ptr : 0;
SQLLEN perrow = apdopts->param_bind_type > 0 ? apdopts->param_bind_type : apdopts->parameters[i].buflen;
-MYLOG(1, " offset=" FORMAT_LEN " perrow=" FORMAT_LEN, offset, perrow);
+MYPRINTF(1, " offset=" FORMAT_LEN " perrow=" FORMAT_LEN, offset, perrow);
*prgbValue = apdopts->parameters[i].buffer + offset + estmt->exec_current_row * perrow;
}
else
}
break;
}
-MYLOG(1, "\n");
+MYPRINTF(1, "\n");
}
retval = SQL_NEED_DATA;
{
char *escSchemaName;
- MYLOG(0, "%s: entering Foreign Key Case #2", func);
+ MYLOG(0, "%s: entering Foreign Key Case #2\n", func);
escFkTableName = simpleCatalogEscape((SQLCHAR *) fk_table_needed, SQL_NTS, conn);
schema_str(schema_needed, sizeof(schema_needed), szFkTableOwner, cbFkTableOwner, TABLE_IS_VALID(szFkTableName, cbFkTableName), conn);
escSchemaName = simpleCatalogEscape((SQLCHAR *) schema_needed, SQL_NTS, conn);
set_tuplefield_string(&tuple[FKS_TRIGGER_NAME], trig_args);
- MYLOG(0, " defer_type = %d\n", defer_type);
+ MYPRINTF(0, " defer_type = %d\n", defer_type);
set_tuplefield_int2(&tuple[FKS_DEFERRABILITY], defer_type);
if (pkey_alloced)
*/
if (NULL != fk_table_needed)
{
- MYLOG(0, "%s: entering Foreign Key Case #2", func);
+ MYLOG(0, "%s: entering Foreign Key Case #2\n", func);
escTableName = simpleCatalogEscape((SQLCHAR *) fk_table_needed, SQL_NTS, conn);
schema_str(schema_needed, sizeof(schema_needed), szFkTableOwner, cbFkTableOwner, TABLE_IS_VALID(szFkTableName, cbFkTableName), conn);
relqual = "\n and conrelid = c.oid";
}
}
-DLL_DECLARE int
-mylog(const char *fmt,...)
+static int
+mylog_misc(unsigned int option, const char *fmt, va_list args)
{
- va_list args;
+ // va_list args;
int gerrno;
-
- if (!mylog_on) return 0;
+ BOOL log_threadid = option;
gerrno = GENERAL_ERRNO;
ENTER_MYLOG_CS;
if (!start_time)
start_time = timeGetTime();
#endif /* LOGGING_PROCESS_TIME */
- va_start(args, fmt);
+ // va_start(args, fmt);
if (!MLOGFP)
{
if (MLOGFP)
{
+ if (log_threadid)
+ {
#ifdef WIN_MULTITHREAD_SUPPORT
#ifdef LOGGING_PROCESS_TIME
DWORD proc_time = timeGetTime() - start_time;
#if defined(POSIX_MULTITHREAD_SUPPORT)
fprintf(MLOGFP, "[%lu]", pthread_self());
#endif /* POSIX_MULTITHREAD_SUPPORT */
+ }
vfprintf(MLOGFP, fmt, args);
}
- va_end(args);
+ // va_end(args);
LEAVE_MYLOG_CS;
GENERAL_ERRNO_SET(gerrno);
return 1;
}
+
+DLL_DECLARE int
+mylog(const char *fmt,...)
+{
+ int ret = 0;
+ unsigned int option = 1;
+ va_list args;
+
+ if (!mylog_on) return ret;
+
+ va_start(args, fmt);
+ ret = mylog_misc(option, fmt, args);
+ va_end(args);
+ return ret;
+}
+
+DLL_DECLARE int
+myprintf(const char *fmt,...)
+{
+ int ret = 0;
+ va_list args;
+
+ va_start(args, fmt);
+ ret = mylog_misc(FALSE, fmt, args);
+ va_end(args);
+ return ret;
+}
+
static void mylog_initialize(void)
{
INIT_MYLOG_CS;
#endif
DLL_DECLARE int mylog(const char *fmt,...) __attribute__((format(printf, 1, 2)));
+DLL_DECLARE int myprintf(const char *fmt,...) __attribute__((format(printf, 1, 2)));
extern int qlog(char *fmt,...);
#ifdef __GNUC__
#define MYLOG(level, fmt, ...) (level < get_mylog() ? mylog((fmt), ##__VA_ARGS__) : 0)
+#define MYPRINTF(level, fmt, ...) (level < get_mylog() ? myprintf((fmt), ##__VA_ARGS__) : 0)
#elif defined WIN32 && _MSC_VER > 1800
#define MYLOG(level, fmt, ...) (level < get_mylog() ? mylog(fmt, __VA_ARGS__) : (printf || printf((fmt), __VA_ARGS__)))
+#define MYPRINTF(level, fmt, ...) (level < get_mylog() ? myprintf(fmt, __VA_ARGS__) : (printf || printf((fmt), __VA_ARGS__)))
#else
#define MYLOG(level, ...) (level < get_mylog() ? mylog(__VA_ARGS__) : 0)
+#define MYPRINTF(level, ...) (level < get_mylog() ? myprintf(__VA_ARGS__) : 0)
#endif /* __GNUC__ */
int get_qlog(void);
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLBindCol]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
RETCODE SQL_API
SQLCancel(HSTMT StatementHandle)
{
- MYLOG(0, "[SQLCancel]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
/* Not that neither ENTER_STMT_CS nor StartRollbackState is called */
/* SC_clear_error((StatementClass *) StatementHandle); maybe this neither */
if (SC_connection_lost_check((StatementClass *) StatementHandle, __FUNCTION__))
ConnInfo *ci = &(SC_get_conn(stmt)->connInfo);
UWORD flag = PODBC_SEARCH_PUBLIC_SCHEMA;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
- MYLOG(0, "[SQLConnect]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) hdbc;
- MYLOG(0, "[SQLDriverConnect]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) hdbc;
- MYLOG(0, "[SQLBrowseConnect]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
SQLCHAR *Description, SQLSMALLINT BufferLength2,
SQLSMALLINT *NameLength2)
{
- MYLOG(0, "[SQLDataSources]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
/*
* return PGAPI_DataSources(EnvironmentHandle, Direction, ServerName,
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLDescribeCol]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
- MYLOG(0, "[%s for %p]", func, ConnectionHandle);
+ MYLOG(0, "[%s for %p]\n", func, ConnectionHandle);
#ifdef _HANDLE_ENLIST_IN_DTC_
if (CC_is_in_global_trans(conn))
CALL_DtcOnDisconnect(conn);
StatementClass *stmt = (StatementClass *) StatementHandle;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
StatementClass *stmt = (StatementClass *) StatementHandle;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
SQLUSMALLINT *rowStatusArray = irdopts->rowStatusArray;
SQLULEN *pcRow = irdopts->rowsFetched;
- MYLOG(0, "[[%s]]", func);
+ MYLOG(0, "[[%s]]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
StatementClass *stmt = (StatementClass *) StatementHandle;
ConnectionClass *conn = NULL;
- MYLOG(0, "[SQLFreeStmt]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (stmt)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLGetCursorName]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLGetData]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
- MYLOG(0, "[SQLGetFunctions]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
- MYLOG(0, "[%s(30)]", func);
+ MYLOG(0, "[%s(30)]\n", func);
if ((ret = PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue,
BufferLength, StringLength)) == SQL_ERROR)
CC_log_error("SQLGetInfo(30)", "", conn);
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check((StatementClass *) StatementHandle, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLNumResultCols]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLParamData]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLPrepare]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLPutData]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLRowCount]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[SQLSetCursorName]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
SQLSMALLINT ParameterScale, PTR ParameterValue,
SQLLEN *StrLen_or_Ind)
{
- MYLOG(0, "[SQLSetParam]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
SC_clear_error((StatementClass *) StatementHandle);
/*
StatementClass *stmt = (StatementClass *) StatementHandle;
SQLCHAR *ctName = CatalogName, *scName = SchemaName, *tbName = TableName;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
StatementClass *stmt = (StatementClass *) StatementHandle;
SQLCHAR *ctName = CatalogName, *scName = SchemaName, *tbName = TableName;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
SQLCHAR *ctName = CatalogName, *scName = SchemaName, *tbName = TableName;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
*tbName = szTableName, *clName = szColumnName;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[SQLDescribeParam]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[SQLExtendedFetch]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
*pktbName = szPkTableName, *fkctName = szFkCatalogName,
*fkscName = szFkSchemaName, *fktbName = szFkTableName;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[SQLMoreResults]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) hdbc;
- MYLOG(0, "[SQLNativeSql]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[SQLNumParams]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
SQLCHAR *ctName = szCatalogName, *scName = szSchemaName,
*tbName = szTableName;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
*prName = szProcName, *clName = szColumnName;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
*prName = szProcName;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[SQLSetPos]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
*tbName = szTableName;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[SQLBindParameter]");
+ MYLOG(0, "[%s]\n", __FUNCTION__);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
RETCODE ret;
ConnectionClass *conn;
- MYLOG(0, "[[%s]]", func);
+ MYLOG(0, "[[%s]]\n", func);
switch (HandleType)
{
case SQL_HANDLE_ENV:
StatementClass *stmt = (StatementClass *) StatementHandle;
int BufferLength = 512; /* Is it OK ? */
- MYLOG(0, "[[%s]]", func);
+ MYLOG(0, "[[%s]]\n", func);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
StatementClass *stmt = (StatementClass *) StatementHandle;
RETCODE ret;
- MYLOG(0, "[[%s]]", func);
+ MYLOG(0, "[[%s]]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[[%s]]", func);
+ MYLOG(0, "[[%s]]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
CSTR func = "SQLEndTran";
RETCODE ret;
- MYLOG(0, "[[%s]]", func);
+ MYLOG(0, "[[%s]]\n", func);
switch (HandleType)
{
case SQL_HANDLE_ENV:
StatementClass *stmt;
ConnectionClass *conn = NULL;
- MYLOG(0, "[[%s]]", func);
+ MYLOG(0, "[[%s]]\n", func);
switch (HandleType)
{
{
RETCODE ret;
- MYLOG(0, "[[SQLGetDescField]]\n");
+ MYLOG(0, "[[%s]]\n", __FUNCTION__);
ret = PGAPI_GetDescField(DescriptorHandle, RecNumber, FieldIdentifier,
Value, BufferLength, StringLength);
return ret;
SQLLEN *Length, SQLSMALLINT *Precision,
SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
{
- MYLOG(0, "[[SQLGetDescRec]]\n");
+ MYLOG(0, "[[%s]]\n", __FUNCTION__);
MYLOG(0, "Error not implemented\n");
return SQL_ERROR;
}
{
RETCODE ret;
- MYLOG(0, "[[SQLGetDiagRec]]\n");
+ MYLOG(0, "[[%s]]\n", __FUNCTION__);
ret = PGAPI_GetDiagRec(HandleType, Handle, RecNumber, Sqlstate,
NativeError, MessageText, BufferLength, TextLength);
return ret;
RETCODE ret;
EnvironmentClass *env = (EnvironmentClass *) EnvironmentHandle;
- MYLOG(0, "[[SQLGetEnvAttr]] %d\n", Attribute);
+ MYLOG(0, "[[%s]] %d\n", __FUNCTION__, Attribute);
ENTER_ENV_CS(env);
ret = SQL_SUCCESS;
switch (Attribute)
{
RETCODE ret;
- MYLOG(0, "[[SQLGetConnectAttr]] %d\n", Attribute);
+ MYLOG(0, "[[%s]] %d\n", __FUNCTION__, Attribute);
CC_examine_global_transaction((ConnectionClass*) ConnectionHandle);
ENTER_CONN_CS((ConnectionClass *) ConnectionHandle);
CC_clear_error((ConnectionClass *) ConnectionHandle);
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
- MYLOG(0, "[[SQLSetConnectAttr]] %d\n", Attribute);
+ MYLOG(0, "[[%s]] %d\n", __FUNCTION__, Attribute);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
{
RETCODE ret;
- MYLOG(0, "[[SQLSetDescField]] h=%p rec=%d field=%d val=%p\n", DescriptorHandle, RecNumber, FieldIdentifier, Value);
+ MYLOG(0, "[[%s]] h=%p rec=%d field=%d val=%p\n", __FUNCTION__, DescriptorHandle, RecNumber, FieldIdentifier, Value);
ret = PGAPI_SetDescField(DescriptorHandle, RecNumber, FieldIdentifier,
Value, BufferLength);
return ret;
RETCODE ret;
EnvironmentClass *env = (EnvironmentClass *) EnvironmentHandle;
- MYLOG(0, "[[SQLSetEnvAttr]] att=%d," FORMAT_ULEN "\n", Attribute, (SQLULEN) Value);
+ MYLOG(0, "[[%s]] att=%d," FORMAT_ULEN "\n", __FUNCTION__, Attribute, (SQLULEN) Value);
ENTER_ENV_CS(env);
switch (Attribute)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
ENTER_STMT_CS((StatementClass *) hstmt);
SC_clear_error((StatementClass *) hstmt);
StartRollbackState(stmt);
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
CSTR func = "SQLGetConnectAttrW";
RETCODE ret;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
CC_examine_global_transaction((ConnectionClass *) hdbc);
ENTER_CONN_CS((ConnectionClass *) hdbc);
CC_clear_error((ConnectionClass *) hdbc);
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) hdbc;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
char *uval = NULL;
BOOL val_alloced = FALSE;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (BufferLength > 0 || SQL_NTS == BufferLength)
{
switch (FieldIdentifier)
SQLINTEGER blen = 0, bMax, *pcbV;
char *rgbV = NULL, *rgbVt;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
switch (iField)
{
case SQL_DESC_BASE_COLUMN_NAME:
SQLSMALLINT buflen, tlen;
char qstr_ansi[8], *mtxt = NULL;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
buflen = 0;
if (szErrorMsg && cbErrorMsgMax > 0)
{
SQLSMALLINT *rgbL, blen = 0, bMax;
char *rgbD = NULL, *rgbDt;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
SQLLEN *Length, SQLSMALLINT *Precision,
SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
{
- MYLOG(0, "[[SQLGetDescRecW]]\n");
+ MYLOG(0, "[[%s]]\n", __FUNCTION__);
MYLOG(0, "Error not implemented\n");
return SQL_ERROR;
}
UWORD flag = PODBC_SEARCH_PUBLIC_SCHEMA;
ConnInfo *ci;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) hdbc;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
RETCODE ret;
ConnectionClass *conn = (ConnectionClass *) hdbc;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
SQLSMALLINT *NameLength2)
{
CSTR func = "SQLDataSourcesW";
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
/*
return PGAPI_DataSources(EnvironmentHandle, Direction, ServerName,
BufferLength1, NameLength1, Description, BufferLength2,
SQLSMALLINT buflen, nmlen;
char *clName = NULL, *clNamet = NULL;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
StatementClass *stmt = (StatementClass *) StatementHandle;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
char *crName = NULL, *crNamet;
SQLSMALLINT clen, buflen;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (BufferLength > 0)
buflen = BufferLength * 3;
else
ENTER_CONN_CS(conn);
CC_set_in_unicode_driver(conn);
CC_clear_error(conn);
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if ((ret = PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue,
BufferLength, StringLength)) == SQL_ERROR)
CC_log_error("SQLGetInfoW", "", conn);
char *stxt;
SQLLEN slen;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
char *crName;
SQLLEN nlen;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
crName = ucs2_to_utf8(CursorName, NameLength, &nlen, FALSE);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
ConnectionClass *conn;
BOOL lower_id;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
ConnectionClass *conn;
BOOL lower_id;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
BOOL lower_id;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
BOOL lower_id;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
ConnectionClass *conn;
BOOL lower_id;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
SQLINTEGER buflen, olen;
ConnectionClass *conn = (ConnectionClass *) hdbc;
- MYLOG(0, "[%s}", func);
+ MYLOG(0, "[%s}\n", func);
CC_examine_global_transaction(conn);
ENTER_CONN_CS(conn);
CC_clear_error(conn);
ConnectionClass *conn;
BOOL lower_id;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
BOOL lower_id;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
conn = SC_get_conn(stmt);
lower_id = SC_is_lower_case(stmt, conn);
ctName = ucs2_to_utf8(szCatalogName, cbCatalogName, &nmlen1, lower_id);
BOOL lower_id;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
BOOL lower_id;
UWORD flag = 0;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
RETCODE ret;
StatementClass * stmt = (StatementClass *) StatementHandle;
- MYLOG(0, "[%s]", func);
+ MYLOG(0, "[%s]\n", func);
if (SC_connection_lost_check(stmt, __FUNCTION__))
return SQL_ERROR;
}
if (setval != vParam)
changed = TRUE;
- MYLOG(0, "-> " FORMAT_LEN "\n", setval);
+ MYPRINTF(0, "-> " FORMAT_LEN "\n", setval);
break;
case SQL_CURSOR_TYPE:
}
if (setval != vParam)
changed = TRUE;
- MYLOG(0, "-> " FORMAT_LEN "\n", setval);
+ MYPRINTF(0, "-> " FORMAT_LEN "\n", setval);
break;
case SQL_KEYSET_SIZE: /* ignored, but saved and returned */
#endif /* SQL_ATTR_CONNECTION_DEAD */
MYLOG(0, "CONNECTION_DEAD status=%d", conn->status);
*((SQLUINTEGER *) pvParam) = CC_not_connected(conn);
- MYLOG(0, " val=%d\n", *((SQLUINTEGER *) pvParam));
+ MYPRINTF(0, " val=%d\n", *((SQLUINTEGER *) pvParam));
break;
case SQL_ATTR_ANSI_APP:
reloid = greloid;
else if (reloid != greloid)
{
-MYLOG(1, " dohhhhhh");
+MYPRINTF(1, " DOHHH i=%d %u!=%u ", i, reloid, greloid);
multi_table = TRUE;
break;
}
}
}
}
-MYLOG(1, " multi=%d\n", multi_table);
+MYPRINTF(1, " multi=%d\n", multi_table);
return multi_table;
}
/*
else if (has_multi_table(stmt))
updatable = FALSE;
}
-MYLOG(0, "->%d\n", updatable);
+MYPRINTF(0, "->%d\n", updatable);
if (stmt->updatable < 0)
SC_set_updatable(stmt, updatable);
for (i = 0; i < num_fields; i++)
if (stmt->from_pos < 0 &&
(!strnicmp(pptr, "from", 4)))
{
- MYLOG(0, "First ");
+ MYLOG(0, "First From\n");
stmt->from_pos = pptr - stmt->statement;
}
-
- MYLOG(0, "FROM\n");
+ else
+ MYLOG(0, "FROM\n");
continue;
}
} /* in_select && unquoted && blevel == 0 */
int rtnctype = SQL_C_CHAR;
CSTR func = "PGAPI_GetDiagField";
- MYLOG(0, "%s entering rec=%d", func, RecNumber);
+ MYLOG(0, "%s entering rec=%d\n", func, RecNumber);
switch (HandleType)
{
case SQL_HANDLE_ENV:
/* otherwise same as column name -- FALL THROUGH!!! */
case SQL_DESC_NAME:
-MYLOG(1, "fi=%p", fi);
-if (fi)
-MYLOG(1, " (%s,%s)", PRINT_NAME(fi->column_alias), PRINT_NAME(fi->column_name));
+ MYLOG(1, "fi=%p (alias, name)=", fi);
+ if (fi)
+ MYPRINTF(1, "(%s,%s)\n", PRINT_NAME(fi->column_alias), PRINT_NAME(fi->column_name));
+ else
+ MYPRINTF(1, "NULL\n");
p = fi ? (NAME_IS_NULL(fi->column_alias) ? SAFE_NAME(fi->column_name) : GET_NAME(fi->column_alias)) : QR_get_fieldname(res, col_idx);
MYLOG(0, "%s: COLUMN_NAME = '%s'\n", func, p);
case SQL_C_VARBOOKMARK:
break;
default:
-MYLOG(1, "GetData Column 0 is type %d not of type SQL_C_BOOKMARK", target_type);
+MYLOG(1, "GetData Column 0 is type %d not of type SQL_C_BOOKMARK\n", target_type);
SC_set_error(stmt, STMT_PROGRAM_TYPE_OUT_OF_RANGE, "Column 0 is not of type SQL_C_BOOKMARK", func);
return SQL_ERROR;
}
MYLOG(1, "get " FORMAT_ULEN "th Valid data from " FORMAT_LEN " to %s [dlt=%d]", nth, sta, orientation == SQL_FETCH_PRIOR ? "backward" : "forward", res->dl_count);
if (0 == res->dl_count)
{
+ MYPRINTF(1, "\n");
if (SQL_FETCH_PRIOR == orientation)
{
if (sta + 1 >= (SQLLEN) nth)
{
*nearest = sta + 1 - nth;
delsta = (-1);
+ MYPRINTF(1, "deleted ");
for (i = res->dl_count - 1; i >=0 && *nearest <= deleted[i]; i--)
{
-MYLOG(1, "deleted[" FORMAT_LEN "]=" FORMAT_LEN "\n", i, deleted[i]);
+ MYPRINTF(1, "[" FORMAT_LEN "]=" FORMAT_LEN " ", i, deleted[i]);
if (sta >= deleted[i])
{
(*nearest)--;
delsta = i;
}
}
-MYLOG(1, "nearest=" FORMAT_LEN "\n", *nearest);
+ MYPRINTF(1, "nearest=" FORMAT_LEN "\n", *nearest);
if (*nearest < 0)
{
*nearest = -1;
}
else
{
+ MYPRINTF(1, "\n");
*nearest = sta - 1 + nth;
delsta = res->dl_count;
if (!QR_once_reached_eof(res))
if (0 == (keyset->status & (CURS_SELF_DELETING | CURS_SELF_DELETED | CURS_OTHER_DELETED)))
{
*nearest = i;
-MYLOG(1, " nearest=" FORMAT_LEN "\n", *nearest);
+MYPRINTF(1, " nearest=" FORMAT_LEN "\n", *nearest);
if (++count == nth)
return count;
}
if (0 == (keyset->status & (CURS_SELF_DELETING | CURS_SELF_DELETED | CURS_OTHER_DELETED)))
{
*nearest = i;
-MYLOG(1, " nearest=" FORMAT_LEN "\n", *nearest);
+MYPRINTF(1, " nearest=" FORMAT_LEN "\n", *nearest);
if (++count == nth)
return count;
}
}
*nearest = num_tuples;
}
-MYLOG(1, " nearest not found\n");
+MYPRINTF(1, " nearest not found\n");
return -(SQLLEN)count;
}
KeySet *keyset;
BOOL kres_is_valid;
-MYLOG(1, "DiscardRollback");
+MYLOG(1, "DiscardRollback\n");
if (QR_get_cursor(res))
{
CommitAdded(res);
int doubtp;
int j;
+ MYLOG(1, "");
for (i = 0, doubtp = 0; i < res->rb_count; i++)
{
keys.status = 0;
keys.offset = rollback[i].offset;
keys.oid = rollback[i].oid;
texist = tupleExists(stmt, &keys);
-MYLOG(1, "texist[%d]=%d", i, texist);
+MYPRINTF(1, "texist[%d]=%d", i, texist);
if (SQL_ADD == rollback[i].option)
{
if (texist)
if (doubtp == i)
doubtp = i + 1;
}
-MYLOG(1, " doubtp=%d\n", doubtp);
+MYPRINTF(1, " (doubtp=%d)", doubtp);
}
rollbp = i;
-MYLOG(1, " doubtp=%d,rollbp=%d\n", doubtp, rollbp);
+MYPRINTF(1, " doubtp=%d,rollbp=%d\n", doubtp, rollbp);
do
{
rollbps = rollbp;
continue;
else
{
-MYLOG(1, " (%u, %u)", wkey->blocknum, wkey->offset);
+MYPRINTF(1, " (%u, %u)", wkey->blocknum, wkey->offset);
wkey->blocknum = rollback[i].blocknum;
wkey->offset = rollback[i].offset;
wkey->oid = rollback[i].oid;
-MYLOG(1, "->(%u, %u)\n", wkey->blocknum, wkey->offset);
+MYPRINTF(1, "->(%u, %u)", wkey->blocknum, wkey->offset);
wkey->status &= ~KEYSET_INFO_PUBLIC;
if (SQL_DELETE == rollback[i].option)
wkey->status &= ~CURS_SELF_DELETING;
}
}
}
+ MYPRINTF(1, "\n");
res->rb_count = rollbp;
if (0 == rollbp)
{
else if (SC_get_IRDF(s->stmt)->rowsFetched)
*(SC_get_IRDF(s->stmt)->rowsFetched) = s->processed;
res->recent_processed_row_count = s->stmt->diag_row_count = s->processed;
-if (opts)
-{
-MYLOG(1, "processed=" FORMAT_POSIROW " ret=%d rowset=" FORMAT_LEN, s->processed, ret, opts->size_of_rowset_odbc2);
-MYLOG(1, "," FORMAT_LEN "\n", opts->size_of_rowset);
-}
+ if (opts) /* logging */
+ {
+ MYLOG(1, "processed=" FORMAT_POSIROW " ret=%d rowset=" FORMAT_LEN, s->processed, ret, opts->size_of_rowset_odbc2);
+ MYPRINTF(1, "," FORMAT_LEN "\n", opts->size_of_rowset);
+ }
return ret;
}
{
self->result = self->curres = NULL;
self->curr_param_result = 0;
- MYLOG(0, "SC_init_Result(%p)", self);
+ MYLOG(0, "SC_init_Result(%p)\n", self);
}
void
{
if (res != self->result)
{
- MYLOG(0, "SC_set_Result(%p, %p)", self, res);
+ MYLOG(0, "SC_set_Result(%p, %p)\n", self, res);
QR_Destructor(self->result);
self->result = self->curres = res;
if (NULL != res)
if (res != NULL)
{
BOOL valid = QR_has_valid_base(res);
-MYLOG(1, ":(%p)QR is %s", res, QR_has_valid_base(res) ? "valid" : "unknown");
+MYPRINTF(1, ":(%p)QR is %s", res, QR_has_valid_base(res) ? "valid" : "unknown");
if (valid)
{
}
if (!QR_get_cursor(res))
res->key_base = start;
-MYLOG(1, ":(%p)QR result=" FORMAT_LEN "(%s)", res, QR_get_rowstart_in_cache(res), QR_has_valid_base(res) ? "valid" : "unknown");
+MYPRINTF(1, ":(%p)QR result=" FORMAT_LEN "(%s)", res, QR_get_rowstart_in_cache(res), QR_has_valid_base(res) ? "valid" : "unknown");
}
stmt->rowset_start = start;
-MYLOG(1, ":stmt result=" FORMAT_LEN "\n", stmt->rowset_start);
+MYPRINTF(1, ":stmt result=" FORMAT_LEN "\n", stmt->rowset_start);
}
void
SC_inc_rowset_start(StatementClass *stmt, SQLLEN inc)
{
char * utf8str;
int len = 0;
-/*MYLOG(0, "ucs2_to_utf8 %p ilen=%d ", ucs2str, ilen);*/
+MYLOG(0, "ucs2_to_utf8 %p ilen=%d ", ucs2str, ilen);
if (!ucs2str)
{
}
if (ilen < 0)
ilen = ucs2strlen(ucs2str);
-MYLOG(0, " newlen=" FORMAT_LEN, ilen);
+MYPRINTF(0, " newlen=" FORMAT_LEN, ilen);
utf8str = (char *) malloc(ilen * 4 + 1);
if (utf8str)
{
if (olen)
*olen = len;
}
-MYLOG(0, " %s:olen=%d utf8str=%s\n", __FUNCTION__, len, utf8str ? utf8str : "");
+MYPRINTF(0, " %s:olen=%d utf8str=%s\n", __FUNCTION__, len, utf8str ? utf8str : "");
return utf8str;
}
SQLULEN rtn, ocount, wcode;
const UCHAR *str;
-/*MYLOG(0, "utf8_to_ucs2 ilen=%d bufcount=%d", ilen, bufcount);*/
+MYLOG(1, "utf8_to_ucs2 ilen=%d bufcount=%d", ilen, bufcount);
if (!utf8str)
return 0;
-/*MYLOG(0, " string=%s\n", utf8str);*/
+MYPRINTF(1, " string=%s\n", utf8str);
if (!bufcount)
ucs2str = NULL;
}
if (ocount < bufcount && ucs2str)
ucs2str[ocount] = 0;
-/*MYLOG(0, " ocount=%d\n", ocount);*/
+MYPRINTF(1, " ocount=%d\n", ocount);
return rtn;
}
MYLOG(0, " %s:ilen=" FORMAT_LEN " bufcount=" FORMAT_ULEN "\n", __FUNCTION__, ilen, bufcount);
if (!utf8str)
return 0;
-/*MYLOG(0, " string=%s\n", utf8str);*/
+MYLOG(99, " string=%s\n", utf8str);
if (!bufcount)
ucs4str = NULL;