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

mysql_stmt_fetch_column() should work without mysql_stmt_store_result()

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.3.3, 3.0.2
    • 2.3.4, 3.0.3
    • None
    • None
    • Ubuntu Linux, test compiled from source, run against MySQL 5.7.19

    Description

      It seems that fetching columns of blob or varchar type via mysql_stmt_fetch_column() requires a call to mysql_stmt_store_result() after mysql_stmt_execute(). Otherwise all attempts to fetch the data result in CR_NO_DATA. This is different in the MySQL C connector, and I don't see why I need to bring the entire result set to the client just to make available all blobs in a row. (At least this is how I understand the documentation.) This might severely impact the performance of the new RMariaDB database backend for R.

      Removing all calls to mysql_stmt_store_result() from the tests gives two failures, see [1] for a patch:

      1. port: 0
      2. socketname: (null)
        1..13
      3. Testing against MySQL Server 5.7.19-0ubuntu0.17.04.1
      4. Host: Localhost via UNIX socket
      5. Client library: 10.2.6
      6. Error: (/home/muelleki/git/mariadb-connector-c/unittest/libmariadb/fetch.c: 241)
        not ok 1 - test_fetch_seek
      7. truncation: 1
      8. Error: (/home/muelleki/git/mariadb-connector-c/unittest/libmariadb/fetch.c: 316)
        not ok 2 - test_fetch_offset
        ok 3 - test_fetch_column
        ok 4 - test_fetch_nobuffs
        ok 5 - test_fetch_null
        ok 6 - test_fetch_date
        ok 7 - test_fetch_str
        ok 8 - test_fetch_long
        ok 9 - test_fetch_short
        ok 10 - test_fetch_tiny
        ok 11 - test_fetch_bigint
        ok 12 - test_fetch_float
        ok 13 - test_fetch_double
      9. close default
      10. Failed 2 tests!

      [1] https://github.com/krlmlr/mariadb-connector-c/commit/5db25b0e0448046adec7bdf8ee8cbf47228be5ac

      Attachments

        Issue Links

          Activity

            People

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