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

Macro SET_CLIENT_STMT_ERROR doesn't support mariadb specific client errors

Details

    Description

      Connector/C doesn't support mariadb client specific error numbers (>= CER_MIN_ERROR) in macro SET_CLIENT_STMT_ERROR, since this macro uses ER() macro. Therefore a crash will occur if the error code exceeds CR_MAX_ERROR.

      Attachments

        Issue Links

          Activity

            georg Georg Richter created issue -
            georg Georg Richter made changes -
            Field Original Value New Value
            Affects Version/s 3.1.19 [ 28415 ]
            georg Georg Richter made changes -
            Fix Version/s 3.1.20 [ 28527 ]
            georg Georg Richter made changes -
            Component/s Error handling [ 19007 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            dritter David Ritter added a comment - - edited

            The commit message for the change that addressed this notes

            • SET_CLIENT_STMT_ERROR now maps to stmt_set_error and accepts variadic arguments

            This does have the side effect (not sure if it's intended or not) of now requiring the C++11 standard (previously the client could be used with C++03 but variadic argument usage breaks that) in order to compile cleanly (and break builds where warnings are treated as errors)

            As I noted, I'm not sure if this is intentional or not, but if so perhaps the new C++ language requirement for the client should be noted.

            dritter David Ritter added a comment - - edited The commit message for the change that addressed this notes SET_CLIENT_STMT_ERROR now maps to stmt_set_error and accepts variadic arguments This does have the side effect (not sure if it's intended or not) of now requiring the C++11 standard (previously the client could be used with C++03 but variadic argument usage breaks that) in order to compile cleanly (and break builds where warnings are treated as errors) As I noted, I'm not sure if this is intentional or not, but if so perhaps the new C++ language requirement for the client should be noted.
            dritter David Ritter made changes -
            georg Georg Richter added a comment -

            Hi David,

            thanks for your comment - I already planned to remove the macro and replace it with the function call.

            georg Georg Richter added a comment - Hi David, thanks for your comment - I already planned to remove the macro and replace it with the function call.

            People

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