Closed hankh92 closed 3 years ago
Hi @hankh92,
Thank you for reporting this issue with analysis. I am able to reproduce the same. Your third approach seems good to me and I tried to implement the same in the attached v1 patch. It would be good if you could review that and share your feedback on the same.
Thanks and Regards, Suraj kharage FDW-378_v1.txt
Hi @hankh92,
We have fixed this issue under commit d83f62387c07c8546a5db98ac2c86aac64213c14, can you please verify the same by pulling the latest sources?
Thanks for reporting this and suggestions.
Hi, @surajkharage19 surajkharage19 Thanks for your fixing. I have reviewed and it is verified.
When select foreign table with bytea type, it ran to crash bug for example:
The problem is cause by the code block
Which cause the crash when fetch the 2nd row
When pfree(DatumGetPointer(dvalues[i]) try to free the pointer value from dvalues[i] while the dvalues[i] in case of BYTEAOID is
Which mean it point to the buffer inside mysql_fetch() internal buffer, the the free routine will free the buffer used to fetch next row from mysql library.
Then I think in this case we should choose between: