MDEV-13988 connect.drop-open-error fails
PCOLRES::Length is the length in characters, not in bytes (because it's printed as length in "VARCHAR(N)"). So convert it into characters using cs->mbmaxlen.
This commit is contained in:
parent
431607237d
commit
ea78c5744b
@ -933,8 +933,9 @@ PQRYRES MYSQLC::GetResult(PGLOBAL g, bool pdb)
|
|||||||
|
|
||||||
crp->Prec = (crp->Type == TYPE_DOUBLE || crp->Type == TYPE_DECIM)
|
crp->Prec = (crp->Type == TYPE_DOUBLE || crp->Type == TYPE_DECIM)
|
||||||
? fld->decimals : 0;
|
? fld->decimals : 0;
|
||||||
crp->Length = MY_MAX(fld->length, fld->max_length);
|
CHARSET_INFO *cs= get_charset(fld->charsetnr, MYF(0));
|
||||||
crp->Clen = GetTypeSize(crp->Type, crp->Length);
|
crp->Clen = GetTypeSize(crp->Type, fld->length);
|
||||||
|
crp->Length = fld->length / (cs ? cs->mbmaxlen : 1);
|
||||||
uns = (fld->flags & (UNSIGNED_FLAG | ZEROFILL_FLAG)) ? true : false;
|
uns = (fld->flags & (UNSIGNED_FLAG | ZEROFILL_FLAG)) ? true : false;
|
||||||
|
|
||||||
if (!(crp->Kdata = AllocValBlock(g, NULL, crp->Type, m_Rows,
|
if (!(crp->Kdata = AllocValBlock(g, NULL, crp->Type, m_Rows,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user