Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-244

Check the version of libmariadb.so during module initialization

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.5
    • 1.1.6
    • Installation
    • None
    • Posix

    Description

      If MariaDB Connector/Python was built with minimum required version of Connector/C, it still might fail during module initialization or when executing connect() method if an older unsupported Connector/C client library will be loaded from default location.

      Instead of we should raise an exception during module initialization:

      if (mysql_get_client_version() < MARIADB_PACKAGE_VERSION_ID)
          {
            char errmsg[255];
       
            snprintf(errmsg, 254, "MariaDB Connector/Python was build with MariaDB Connector/C %s, "
                     "while the loaded MariaDB Connector/C library has version %s.",
                     MARIADB_PACKAGE_VERSION, mysql_get_client_info());
            PyErr_SetString(PyExc_ImportError, errmsg);
            goto error;
          }
      
      

      Attachments

        Issue Links

          Activity

            People

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