Check return code of db_generate_bulk_request

When inserting data via parameter callback function, an error
will be raised.
This commit is contained in:
Georg Richter
2024-09-14 15:31:57 +02:00
parent e705d637ea
commit afb3ccd778
2 changed files with 17 additions and 0 deletions

View File

@ -1225,7 +1225,10 @@ MrdbCursor_execute_bulk(MrdbCursor *self)
mysql_stmt_bind_param(self->stmt, self->params);
if (!(buf= self->connection->mysql->methods->db_execute_generate_request(self->stmt, &buflen, 1)))
{
mariadb_throw_exception(self->stmt, NULL, 1, NULL);
goto error;
}
if ((rc= Mrdb_execute_direct(self, self->parseinfo.statement, self->parseinfo.statement_len)))
{