summaryrefslogtreecommitdiff
path: root/storage/connect/tabfmt.cpp
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-19 20:55:37 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-19 20:55:37 +0200
commitc07325f932abef2032b2e56532f6cb615e2a1161 (patch)
tree754ca158e45ebc014e5cbeaf4c3e7581f9575d76 /storage/connect/tabfmt.cpp
parent7f8187bc432f79afe4c0549d68845a68e6c159ab (diff)
parent2ae83affef5a4d89f38272db31a400f968279a7a (diff)
downloadmariadb-git-c07325f932abef2032b2e56532f6cb615e2a1161.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'storage/connect/tabfmt.cpp')
-rw-r--r--storage/connect/tabfmt.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp
index 63fa2a63668..02720a3089a 100644
--- a/storage/connect/tabfmt.cpp
+++ b/storage/connect/tabfmt.cpp
@@ -1485,8 +1485,8 @@ void CSVCOL::ReadColumn(PGLOBAL g)
/***********************************************************************/
void CSVCOL::WriteColumn(PGLOBAL g)
{
- char *p, buf[64];
- int flen;
+ char *p;
+ int n, flen;
PTDBCSV tdbp = (PTDBCSV)To_Tdb;
if (trace(2))
@@ -1508,13 +1508,14 @@ void CSVCOL::WriteColumn(PGLOBAL g)
/*********************************************************************/
/* Get the string representation of the column value. */
/*********************************************************************/
- p = Value->ShowValue(buf);
+ p = Value->GetCharString(Buf);
+ n = strlen(p);
if (trace(2))
- htrc("new length(%p)=%d\n", p, strlen(p));
+ htrc("new length(%p)=%d\n", p, n);
- if ((signed)strlen(p) > flen) {
- sprintf(g->Message, MSG(BAD_FLD_LENGTH), Name, p, flen,
+ if (n > flen) {
+ sprintf(g->Message, MSG(BAD_FLD_LENGTH), Name, p, n,
tdbp->RowNumber(g), tdbp->GetFile(g));
throw 34;
} else if (Dsp)