Changeset: 072e88488c13 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=072e88488c13
Modified Files:
MonetDB.spec
Branch: default
Log Message:
Merge with Mar2011 branch.
diffs (63 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -287,7 +287,7 @@
%files client-tests
%defattr(-,root,root)
-%{_bindir}/odbcsample1
+# %{_bindir}/odbcsample1
%{_bindir}/sample0
%{_bindir}/sample1
%{_bindir}/sample2
@@ -295,7 +295,7 @@
%{_bindir}/sample4
%{_bindir}/smack00
%{_bindir}/smack01
-%{_bindir}/testgetinfo
+# %{_bindir}/testgetinfo
%{_bindir}/malsample.pl
%{_bindir}/sqlsample.php
%{_bindir}/sqlsample.pl
diff --git a/clients/odbc/driver/SQLExecute.c b/clients/odbc/driver/SQLExecute.c
--- a/clients/odbc/driver/SQLExecute.c
+++ b/clients/odbc/driver/SQLExecute.c
@@ -232,7 +232,16 @@
* initialized */
rec->sql_desc_length = ODBCDisplaySize(rec);
rec->sql_desc_display_size = rec->sql_desc_length;
- rec->sql_desc_octet_length = rec->sql_desc_length;
+ if (rec->sql_desc_concise_type == SQL_CHAR ||
+ rec->sql_desc_concise_type == SQL_VARCHAR ||
+ rec->sql_desc_concise_type == SQL_LONGVARCHAR) {
+ /* in theory, each character (really: Unicode
+ * code point) could need 6 bytes in the UTF-8
+ * encoding, plus we need a byte for the
+ * terminating NUL byte */
+ rec->sql_desc_octet_length = 6 * rec->sql_desc_length +
1;
+ } else
+ rec->sql_desc_octet_length = rec->sql_desc_length;
rec++;
}
diff --git a/clients/odbc/driver/SQLPrepare.c b/clients/odbc/driver/SQLPrepare.c
--- a/clients/odbc/driver/SQLPrepare.c
+++ b/clients/odbc/driver/SQLPrepare.c
@@ -253,7 +253,16 @@
* initialized */
rec->sql_desc_length = ODBCDisplaySize(rec);
rec->sql_desc_display_size = rec->sql_desc_length;
- rec->sql_desc_octet_length = rec->sql_desc_length;
+ if (rec->sql_desc_concise_type == SQL_CHAR ||
+ rec->sql_desc_concise_type == SQL_VARCHAR ||
+ rec->sql_desc_concise_type == SQL_LONGVARCHAR) {
+ /* in theory, each character (really: Unicode
+ * code point) could need 6 bytes in the UTF-8
+ * encoding, plus we need a byte for the
+ * terminating NUL byte */
+ rec->sql_desc_octet_length = 6 * rec->sql_desc_length +
1;
+ } else
+ rec->sql_desc_octet_length = rec->sql_desc_length;
}
/* update the internal state */
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list