1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-30713 field length handling for CONNECT engine

fp->field_length was unsigned and therefore the negative
condition around it.

Backport of cc182aca93 fixes it, however to correct the
consistent use of types pcf->Length needs to be unsigned
too.

At one point pcf->Precision is assigned from pcf->Length so
that's also unsigned.

GetTypeSize is assigned to length and has a length argument.
A -1 default value seemed dangerious to case, so at least 0
should assert if every hit.
This commit is contained in:
Daniel Black
2023-02-28 10:43:39 +11:00
committed by Andrew Hutchings
parent 3d27f6d7f4
commit da1c91fb92
5 changed files with 9 additions and 12 deletions

View File

@@ -466,7 +466,7 @@ bool TDBEXT::MakeSQL(PGLOBAL g, bool cnt)
if (Quote) {
// Tabname can have both database and table identifiers, we need to parse
if (res= strstr(buf, "."))
if ((res= strstr(buf, ".")))
{
// Parse schema
my_len= res - buf + 1;