Fix CTAS from prepared statement which contains modifying DML
The commit bad6ceb replaced the isCTAS boolean field in the Query structure
with a parentStmtType uint8, but forgot to change its read/write from
READ_BOOL_FIELD/WRITE_BOOL_FIELD to READ_UINT_FIELD/WRITE_UINT_FIELD and
READ_UINT8_FIELD/WRITE_UINT8_FIELD. This patch fixes that bug as well.
The commit 93abe74 added conditions on modifying DMLs, but left the previous
assert, which does not allow CTAS. At the same time, when executing CTAS from
prepared statements which containes modifying DML, this assert should allow
such case. This patch solves the problem.
The commit 19cd1cf introduced an incorrect field reading order in the
_readQuery function. This patch fixes that issue as well.
Fix CTAS from prepared statement which contains modifying DML
The commit bad6ceb replaced the isCTAS boolean field in the Query structure with a parentStmtType uint8, but forgot to change its read/write from READ_BOOL_FIELD/WRITE_BOOL_FIELD to READ_UINT_FIELD/WRITE_UINT_FIELD and READ_UINT8_FIELD/WRITE_UINT8_FIELD. This patch fixes that bug as well.
The commit 93abe74 added conditions on modifying DMLs, but left the previous assert, which does not allow CTAS. At the same time, when executing CTAS from prepared statements which containes modifying DML, this assert should allow such case. This patch solves the problem.
The commit 19cd1cf introduced an incorrect field reading order in the _readQuery function. This patch fixes that issue as well.