There is one parameter set for the entire batch, so the parameter array theoretically has to span statements. The ee reads the exact number of parameters for each batched statement sequentially from a single common serialized parameter buffer.

I seem to have missed the junit tests for AdHoc batches -- I should find these tests and clone them to use parameters in multiple statements to verify this logic.