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

sql::Properties crash

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Done
    • 1.0.1
    • 1.1.1
    • General
    • None
    • 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

            Unassigned Unassigned
            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.