Skip to content

Conversation

@lawrinn
Copy link
Contributor

@lawrinn lawrinn commented Nov 3, 2025

This is required for MariaDB bulk execution using COM_STMT_BULK_EXECUTE command.

mysql-simple PR is to follow.

I'm submitting this pull request on behalf of my employer, MariaDB corporation

Added StmtBulkExecuteParamsFlags bitflags for packet's bulk flags and
MariadbBulkIndicator enum to define possible paramater value indicators.

Added ComStmtBulkExecuteRequestBuilder class to build
COM_STMT_BULK_EXECUTE packet representation in ComStmtBulkExecuteRequest
class implementing packet data serialization.
@lawrinn
Copy link
Contributor Author

lawrinn commented Nov 3, 2025

I see that compilation failed in the actions. I'll fix this. Locally it compiles for me.

Btw we have the ticket for this task in our Jira, and we have tickets for everything we are planning atm to implement and contribute.

}
}

pub fn next(&mut self) -> () {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please document the meaning of all the public functions?

.0
.contains(StmtBulkExecuteParamsFlags::SEND_TYPES_TO_SERVER)
{
for param in &self.params[0] {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. This will panic if SEND_TYPES_TO_SERVER is set and the params is empty that seems reachable from ComStmtBulkExecuteRequestBuilder 🤔

self.paramset.clear();
self.payload_len = 0;
}
pub fn add_row(&mut self, params: &[Value]) -> bool {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be add_row(&mut self, params: Vec<Value>) I believe, to avoid unnecessary clone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants