readCString reads a null-terminated string from reader
(r *bytes.Reader)
| 880 | var queryRowsAff int64 |
| 881 | var queryFinalErr error |
| 882 | c.logWorkerStatementStarted(workerStatement) |
| 883 | defer func() { |
| 884 | c.logWorkerStatementFinished(workerStatement, queryStart, queryRowsAff, queryFinalErr) |
| 885 | }() |
| 886 | |
| 887 | // The statement context is created above the multi-statement branch; see |
| 888 | // the comment there. queryContextInner(false): no disconnect monitor. Like |
| 889 | // the cursor path, the monitor's bufio Peek would race the message loop's |
| 890 | // own reads — the extended protocol pipelines Parse/Bind/Execute/Sync, so |
| 891 | // bytes for the next message are often already buffered. Disconnect still |
| 892 | // cancels via c.ctx. |
| 893 | |
| 894 | if !returnsResults { |
| 895 | // Open cursors pin the session's single DuckDB connection — release |
| 896 | // them before a transaction-end statement needs it. |
| 897 | c.closeCursorsAtTxEnd(cmdType) |
| 898 |
no test coverage detected