Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-809

Refactoring Parameter Binding Logic

    XMLWordPrintable

Details

    Description

      The current parameter binding implementation (responsible for populating the request buffer during standard and bulk execution) was originally adapted from PHP’s mysqlnd extension. It requires refactoring to address the following issues:

      • Correct pack_len for Temporal Types: Ensure the pack_len for Date and Time types is correctly set to the size of the internal C structure (e.g., sizeof(MYSQL_TIME)).
      • Eliminate Redundant Reallocations: Optimize buffer management to avoid frequent and unnecessary memory reallocations during the binding process.
      • Deterministic Memory Allocation: Implement logic to calculate the exact required memory size for parameters upfront, ensuring a more efficient "allocate-once" strategy.
      • Support for Missing Types: Identify and implement handling for MariaDB-specific parameter types that were previously ignored due to limitations in PHP’s type system.

      Update: For bulk execution this approach is counterproductive: parameter callbacks would need to be executed twice, increasing overhead and potentially reducing performance.

      Attachments

        Activity

          People

            georg Georg Richter
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.