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

Add feature to skip specific paramset(s) in bulk operation

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.2
    • 3.0.3
    • None
    • None

    Description

      ODBC specs allows application to tell Connector to ignore any particular parameter set. In such case in order to be able to use MariaDB bulk functionality, the connector has to create arrays for all columns parameter values with skipped values for all such paramsets, or it has to split bulk operation in few, dividing parameter arrays by elements, that have to be ignored.

      It looks fairly easy to add such functionality to C/C, while that would simplify the code in C/ODBC significantly.

      I have attached 2 diffs with variants of the problems solution.

      skip_paramset_2.diff introduces stmt attribute for application to supply array of short values determining whether each particular paramset has to be processed or skipped. Values are short for selfish ODBC reasons - corresponding array is of short values in ODBC specs.

      skip_paramset_1.1.diff introduces special indicator value, that can be put in any parameter indicators array. The pro here is that connector and application does not need additional data structures for that. Con is that it is kinda ugly interface. And probably that require some changes in other protocol implementing connectors and/or in the server - they should at least should know that value, if not add the support of it. That can be, however, mitigated by assigning to the new indicator value from some designated sub-range of indicator values, that is for, say, "client side" and/or "connector-specific" indicators. I don't think we will ever need anything close to 255 indicator values.

      I think that stmt attribute approach is better. Giving diff with indicator just because it was my initial idea, and I did it anyway.

      p.s. Sorry, the diff also contains one (Windows specific) warning and one typo correction

      Attachments

        Activity

          People

            georg Georg Richter
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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