From 0df4eb82a0e3ff844e373d7c9f9c6c813925e2ac Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <freddy77@gmail.com>
Date: Tue, 9 Jul 2019 09:26:43 +0100
Subject: [PATCH] tds: Make sure UDT has varint set to 8

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
 src/tds/data.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tds/data.c b/src/tds/data.c
index c10ebe1ca..0c5e90f95 100644
--- a/src/tds/data.c
+++ b/src/tds/data.c
@@ -1425,6 +1425,7 @@ tds_clrudt_get_info(TDSSOCKET * tds, TDSCOLUMN * col)
 	tds_get_string(tds, tds_get_usmallint(tds), NULL, 0);
 
 	col->column_size = 0x7ffffffflu;
+	col->column_varint_size = 8;
 
 	return TDS_SUCCESS;
 }
@@ -1432,6 +1433,7 @@ tds_clrudt_get_info(TDSSOCKET * tds, TDSCOLUMN * col)
 TDS_INT
 tds_clrudt_row_len(TDSCOLUMN *col)
 {
+	col->column_varint_size = 8;
 	/* TODO save other fields */
 	return sizeof(TDSBLOB);
 }
