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

Refactor connect to use libcurl instead of cpprestsdk/curl

Details

    Description

      Current status and problem description
      Starting from 10.2.37 Connect SE uses curl, introduced by Olivier Bertrand, commit 8c617e99015c.
      Connect SE is also able to run using cpprestsdk.

      Neither these options are preferable because:

      • cpprestsdk that has to be built by the user as a separate library.
      • curl shouldn't have to be exec'ed. There is a dedicated libcurl library that we can link to.

      We should make use of libcurl, just like the S3 Storage Engine does, via libmarias3.

      Task:

      • Remove cpprest, curl exec calls and optimize code to use libcurl only.
      • Remove the use of exec(curl) binary and use the library call directly.
      • Mark new package dependency of libcurl in RPM/DEB files.
      • Identify how Windows binaries are impacted
      • Ensure connect.rest test case passes.

      After task is implemented, update documentation pages:
      [1] https://mariadb.com/kb/en/connect-files-retrieved-using-rest-queries/
      [2] https://mariadb.com/kb/en/connect-making-the-getrest-library/ [deprecate]

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            Using libcurl wil fix MDEV-26727 and need to revert MDEV-30509 / pr2466

            danblack Daniel Black added a comment - Using libcurl wil fix MDEV-26727 and need to revert MDEV-30509 / pr2466

            After doing tests on Windows - as explained in MDBF-644 comment with linked libcurl we got failed test

            connect.rest                             w1 [ fail ]
                    Test ended at 2024-02-12 13:39:21
             
            CURRENT_TEST: connect.rest
            worker[01] mysql-test-run: WARNING: Process [mysqld.1 - pid: 3216, winpid: 3216] died after mysql-test-run waited 0 seconds for C:/Users/Administrator/Desktop/anel/bld/mysql-test/var/1/run/mysqld.1.pid to be created.
            

            Environment variable for libcurl-x64.dll are set as I'm being said.

            anel Anel Husakovic added a comment - After doing tests on Windows - as explained in MDBF-644 comment with linked libcurl we got failed test connect.rest w1 [ fail ] Test ended at 2024-02-12 13:39:21   CURRENT_TEST: connect.rest worker[01] mysql-test-run: WARNING: Process [mysqld.1 - pid: 3216, winpid: 3216] died after mysql-test-run waited 0 seconds for C:/Users/Administrator/Desktop/anel/bld/mysql-test/var/1/run/mysqld.1.pid to be created. Environment variable for libcurl-x64.dll are set as I'm being said.

            People

              danblack Daniel Black
              anel Anel Husakovic
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.