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

mariadb-10.2.14/client/mysqladmin.cc:1586]: (style) Suspicious condition

    XMLWordPrintable

Details

    Description

      [mariadb-10.2.14/client/mysqladmin.cc:1586]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

      Source code is

        if ((length=(uint) strlen(buff) > ex_val_max_len[row]) && ex_status_printed)
      

      Maybe better code

        if ((length=(uint) strlen(buff)) > ex_val_max_len[row] && ex_status_printed)
      

      UPDATE
      This is clearly operator precedence bug and should be resolved in this MDEV.
      However, additional testing is needed for vertical option mysqladmin -E extended-status for mysqladmin, that is currently not working.
      Validate the result with horizontal output mysqladmin --relative --sleep=1 extended-status | grep -v " 0 ", that should work.
      Decide should we patch this feature or remove it, since it is not reported as non-working as part of new MDEV.

      Attachments

        Activity

          People

            TheLinuxJedi Andrew Hutchings (Inactive)
            dcb David Binderman
            Votes:
            0 Vote for this issue
            Watchers:
            7 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.