Changeset: d0a19781c93c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d0a19781c93c
Modified Files:
        clients/mapiclient/mclient.c
        sql/backends/monet5/sql_result.c
Branch: default
Log Message:

Take care of proper OID literal rendering


diffs (42 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -1149,6 +1149,7 @@ SQLrenderer(MapiHdl hdl, char singleinst
                         strcmp(s, "tinyint") == 0 ||
                         strcmp(s, "bigint") == 0 ||
                         strcmp(s, "wrd") == 0 ||
+                        strcmp(s, "oid") == 0 ||
                         strcmp(s, "smallint") == 0 ||
                         strcmp(s, "double") == 0 ||
                         strcmp(s, "float") == 0 ||
diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -1171,8 +1171,10 @@ static int
 export_length( stream *s, int mtype, int eclass, int digits, int scale, int 
tz, bat bid, ptr p) 
 {
        int ok = 1;
-       size_t count = 0;
+       size_t count = 0, incr =0;;
 
+       if (mtype == TYPE_oid) 
+               incr =2;
        mtype = ATOMstorage(mtype);
        if (mtype == TYPE_str) {
                if (eclass == EC_CHAR) {
@@ -1219,6 +1221,7 @@ export_length( stream *s, int mtype, int
                                } else { /* TYPE_lng */
                                        count = bat_max_lnglength(b);
                                }
+                               count += incr;
                                BBPunfix(b->batCacheid);
                        } else {
                                assert(b);
@@ -1246,6 +1249,7 @@ export_length( stream *s, int mtype, int
                                if (val < 0) count++;
                                while (val /= 10) count++;
                                count++;
+                               count += incr;
                        } else {
                                count = 0;
                        }
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to