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

Using mysql_stmt_bind_result() in prepared queries

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.0, 3.0.1, 3.0.2, 2.3.4, 3.0.3
    • 3.0.3, 2.3.5
    • None
    • Ubuntu 17.10, gcc 7, compiling from source

    Description

      The test for CONC-281 contains no call to mysql_stmt_bind_result(), adding it breaks the test: https://github.com/krlmlr/mariadb-connector-c/tree/b-test-string-constant. However, this seems to be the recommended way to find out the length of the data if it is not known beforehand: https://dev.mysql.com/doc/refman/5.7/en/mysql-stmt-fetch.html

      The problem seems to be present in 2.3.4 and in the 3.0 branch, and it carries over to RMariaDB. I have a patch that removes the call to mysql_stmt_bind_result(), it works with the current master of Connector/C but fails with everything else:

      1. master of RMariaDB:

      • works with libmysqlclient
      • works with libmariadbclient 2.3.4
      • breaks with current libmariadbclient 3.0.x

      2. patched RMariaDB, https://github.com/r-dbi/RMariaDB/pull/81:

      • breaks with libmysqlclient
      • breaks with libmariadbclient 2.3.4
      • works with current libmariadbclient 3.0.x

      I haven't found anything related to this change in the release notes. Please advise.

      For the future: Would you consider adding tests for RMariaDB compiled against your latest development versions to your automated test system? This will ensure smooth operation of RMariaDB, and also adds another rich test suite for Connector/C.

      Attachments

        Issue Links

          Activity

            People

              georg Georg Richter
              krlmlr Kirill Müller
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.