MySQL 8.0.18, client version: 8.0.18, database access component version: 7.3.1-b99a7ce8
I run the query: "SHOW ENGINE INNODB STATUS"
And then, I am trying to get the "status" field by bytes (var tb = query.FieldByName('Status').AsBytes)
Instead of the 9-something thousand bytes, I get 80 in the array.
The trimming happens at TZAbstractRODataSet.GetFieldData, line 2787
Code: Select all
2784 begin
2785 blen := blen shl 1;
2786 if blen >= NativeUint(Field.DataSize-2) then
2787 blen := NativeUint(Field.DataSize-2);
2788 Move(P^, Pointer(Buffer)^, blen);
2789 PWord(PAnsiChar(Buffer)+blen)^ := 0;
2790 end;
Then, the problem comes. Field.FSize is 40, so Field.DataSize returns 82. As blen is far greater than this amount it is simply trimmed at 82 - 2 = 80 byte(s), which is 40 characters in Unicode.
I know that this is not a real table, but shouldn't the correct metadata be returned by the SQL server anyway?