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

mysql_stmt_store_result returns empty error

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.10
    • Fix Version/s: 3.0.11, 3.1.3
    • Labels:
      None

      Description

      The mysql_stmt_store_result function can return an error, even though mysql_stmt_errno(), mysql_stmt_sqlstate(), and mysql_stmt_error() do not actually contain information about an error. This may be related to running stored procedures that contain a cursor.

      To reproduce, load the attached schema:

      sudo mysql -u root db1 < cursortest.sql
      

      And then build the attached program:

      g++ -ggdb -c $(mariadb_config --cflags) cursortest.cpp
      g++ -o cursortest cursortest.o $(mariadb_config --libs)
      

      And then run the program.

      At that point, you should see an empty error:

      $ ./cursortest
      Query: CALL testCursor()
      Failed to store result. Error 0 (00000):
      Result set #1 had 0 rows
      Received 1 result sets
      Query: CALL testNoCursor()
      Segmentation fault
      

      See CONC-425 about the segmentation fault.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                georg Georg Richter
                Reporter:
                GeoffMontee Geoff Montee
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: