Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-35953

mysql_stmt_errno() returns 0 after an error in mysql_stmt_execute()

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.6.21, 10.11.10, 11.4.5
    • 10.11, 11.4, 11.8
    • Prepared Statements
    • None

    Description

      In my program, I use the C mariadb connector and since my upgrade of MariaDB server to the 10.11.10 version I noticed this:

      if (mysql_stmt_execute(stmt)) {
       int32_t err_code = mysql_stmt_errno(stmt);
        if (err_code == 0) {
          logger->info("This should not happen, but we are here...");
        }
      }
      

      I'm not sure the err_code is always 0. I know it is 0 when the statement is an INSERT and there are operations on the table like some repartitionning...

      I also noticed this when I insert a row in a table that doesn't exist.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Georg Richter made transition -
            Open Needs Feedback
            1d 1h 16m 2
            Sergei Golubchik made transition -
            Needs Feedback Open
            17d 1h 16m 2
            Sergei Golubchik made transition -
            Open Confirmed
            59s 1

            People

              serg Sergei Golubchik
              David David Boucher
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.