Uploaded image for project: 'MariaDB Connector/C++'
  1. MariaDB Connector/C++
  2. CONCPP-98

sql::Properties crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.1.1
    • Component/s: General
    • Labels:
      None
    • Environment:
      Windows 11 64Bit

      Description

      My program crashes after i call driver->connect using sql::Properties

         try {
              sql::Driver *driver = sql::mariadb::get_driver_instance();
              sql::SQLString url("jdbc:mariadb://127.0.0.1:3306/test");
              sql::Properties properties({{"user", "root"}, {"password", ""}});
              std::unique_ptr<sql::Connection> conn(driver->connect(url, properties));
              conn->close();
          }
          catch(sql::SQLException &e) {
              std::cerr << "Error Connecting to MariaDB Platform: " << e.what() << std::endl;
              return 1;
          }
      

      but it doesn't crash if i use this code

         try {
              sql::Driver *driver = sql::mariadb::get_driver_instance();
              sql::SQLString url("jdbc:mariadb://127.0.0.1:3306/test");
              std::unique_ptr<sql::Connection> conn(driver->connect(url, "root", ""));
              conn->close();
          }
          catch(sql::SQLException &e) {
              std::cerr << "Error Connecting to MariaDB Platform: " << e.what() << std::endl;
              return 1;
          }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ZTz ZTzTopia
            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.