Skip to content

feat(db): implement MySQL BLOB parameter binding #450

Description

@GaspardKirira

Summary

Implement Blob parameter binding in the MySQL driver.

SQLite already supports BLOB parameters, while the MySQL driver currently rejects them.

Current behavior

DbValue supports vix::db::Blob.

SQLiteStatement::bind() binds BLOB data through SQLite.

MySQLStatement::bind() throws DBError when the value contains a Blob.

Expected behavior

MySQL prepared statements must accept binary data through the existing Blob and blob() APIs.

Binary payloads must preserve embedded zero bytes and arbitrary byte values.

Scope

  • Implement native MySQL binary parameter binding.
  • Support empty BLOB values.
  • Support data containing embedded zero bytes.
  • Add MySQL integration tests.
  • Verify resource ownership during binding.
  • Preserve the existing public DB API.

Suggested files

  • modules/db/src/mysql/MySQLDriver.cpp
  • modules/db/tests/mysql_driver_test.cpp

Acceptance criteria

  • Empty BLOB values can be inserted and retrieved.
  • Binary data containing zero bytes round-trips correctly.
  • Large test payloads within reasonable integration-test limits work.
  • Binding failures are reported as DBError.
  • SQLite BLOB behavior remains unchanged.
  • Existing public APIs remain unchanged.

Non-goals

This issue does not include:

  • streaming multi-gigabyte objects;
  • file-to-BLOB convenience APIs;
  • BLOB compression;
  • ORM binary field mapping.

Suggested labels

  • scope:db
  • type:feature
  • tests
  • help wanted
  • status:ready

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededscope:dbDatabase driversstatus:readyIssue is fully specified and ready for implementationtestsTests, CI coverage and validationtype:featureNew functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions