Changeset: dda5ef4e9848 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/dda5ef4e9848
Modified Files:
sql/backends/monet5/vaults/odbc/odbc_loader.c
Branch: Mar2025
Log Message:
Revert using utf8towchar(). It is not working as expected.
diffs (50 lines):
diff --git a/sql/backends/monet5/vaults/odbc/odbc_loader.c
b/sql/backends/monet5/vaults/odbc/odbc_loader.c
--- a/sql/backends/monet5/vaults/odbc/odbc_loader.c
+++ b/sql/backends/monet5/vaults/odbc/odbc_loader.c
@@ -18,7 +18,7 @@
#include "mal_exception.h"
#include "mal_builder.h"
#include "mal_client.h"
-#include "mutils.h" /* utf8towchar(), wchartoutf8() */
+// #include "mutils.h" /* utf8towchar(), wchartoutf8() */
#include "sql_decimal.h" /* decimal_from_str() */
#ifdef _MSC_VER
@@ -377,12 +377,12 @@ odbc_query(int caller, mvc *sql, sql_sub
}
SQLSMALLINT len = 0;
- wchar_t * odbc_con_Wstr = utf8towchar(odbc_con_str);
- if (odbc_con_Wstr != NULL) {
- ret = SQLDriverConnectW(dbc, NULL, (SQLWCHAR *) odbc_con_Wstr,
SQL_NTS, NULL, 0, &len, SQL_DRIVER_NOPROMPT);
- /* we no longer need odbc_con_Wstr */
- free(odbc_con_Wstr);
- } else
+// wchar_t * odbc_con_Wstr = utf8towchar(odbc_con_str);
+// if (odbc_con_Wstr != NULL) {
+// ret = SQLDriverConnectW(dbc, NULL, (SQLWCHAR *) odbc_con_Wstr,
SQL_NTS, NULL, 0, &len, SQL_DRIVER_NOPROMPT);
+// /* we no longer need odbc_con_Wstr */
+// free(odbc_con_Wstr);
+// } else
ret = SQLDriverConnect(dbc, NULL, (SQLCHAR *) odbc_con_str,
SQL_NTS, NULL, 0, &len, SQL_DRIVER_NOPROMPT);
if (trace_enabled)
printf("After SQLDriverConnect(%s) returned %d\n",
odbc_con_str, ret);
@@ -400,12 +400,12 @@ odbc_query(int caller, mvc *sql, sql_sub
goto finish;
}
- wchar_t * query_Wstr = utf8towchar(query);
- if (query_Wstr != NULL) {
- ret = SQLExecDirectW(stmt, (SQLWCHAR *) query_Wstr, SQL_NTS);
- /* we no longer need query_Wstr */
- free(query_Wstr);
- } else
+// wchar_t * query_Wstr = utf8towchar(query);
+// if (query_Wstr != NULL) {
+// ret = SQLExecDirectW(stmt, (SQLWCHAR *) query_Wstr, SQL_NTS);
+// /* we no longer need query_Wstr */
+// free(query_Wstr);
+// } else
ret = SQLExecDirect(stmt, (SQLCHAR *) query, SQL_NTS);
if (trace_enabled)
printf("After SQLExecDirect(%s) returned %d\n", query, ret);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]