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

Using mysql_stmt_bind_result() in prepared queries



      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.


          Issue Links



              • Assignee:
                georg Georg Richter
                krlmlr Kirill Müller
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: