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

mysql_stmt_fetch_column fails when truncated data is first

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6
    • None
    • None
    • None
    • OS: Windows
      Arch: x64
      Compiler: MSVC++ 2017 (latest)
      Standard: C++17
      MariaDB version: 10.3.8 (Dockerized container, image mariadb:latest)
      MariaDB Connector/C: 3.0.6

    Description

      When using MariaDB Connector/C 3.0.1 or newer and there is truncated data (in first row) it will fail to fetch the column because

      stmt->state == MYSQL_STMT_USE_OR_STORE_CALLED
      

      When

      stmt->mysql->methods->db_stmt_fetch_to_bind(stmt, row)
      

      is called it won't set the state to MYSQL_STMT_USER_FETCHING (https://github.com/MariaDB/mariadb-connector-c/blob/master/libmariadb/mariadb_stmt.c#L1412).

      First I thought it is a bug in the library I use (sqlpp11) but Roland played with it a little bit and considered it a bug in C Connector which later I tested it and had the same results.

      In version 3.0.0-alpha calling

      mysql_stmt_fetch
      

      would set stmt->state to MYSQL_STMT_USER_FETCHING but newer versions won't do that and let it set to MYSQL_STMT_USE_OR_STORE_CALLED.

      Original issue is on GitHub (https://github.com/rbock/sqlpp11-connector-mysql/issues/39).

      Attachments

        Activity

          People

            georg Georg Richter
            WopsS Octavian Dima
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.