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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.11.10, 10.5.28, 10.6.21, 11.4.5
    • 10.11.12, 11.4.6, 11.8.2
    • 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

            People

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