From 08352d8a5d9e6e2fa70fcdae6772c394ac85d044 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:07:17 +0000 Subject: [PATCH] chore: Update vendored sources to duckdb/duckdb@c0f29465624aaa1472ee05d4723415cfa1bfbdf9 (#419) Improve logic for remote extension install on Windows (duckdb/duckdb#13929) Co-authored-by: krlmlr --- .../function/table/version/pragma_version.cpp | 6 +++--- .../src/main/extension/extension_install.cpp | 21 ++++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index 8a7011866..aabdeef76 100644 --- a/src/duckdb/src/function/table/version/pragma_version.cpp +++ b/src/duckdb/src/function/table/version/pragma_version.cpp @@ -1,5 +1,5 @@ #ifndef DUCKDB_PATCH_VERSION -#define DUCKDB_PATCH_VERSION "1-dev122" +#define DUCKDB_PATCH_VERSION "1-dev124" #endif #ifndef DUCKDB_MINOR_VERSION #define DUCKDB_MINOR_VERSION 1 @@ -8,10 +8,10 @@ #define DUCKDB_MAJOR_VERSION 1 #endif #ifndef DUCKDB_VERSION -#define DUCKDB_VERSION "v1.1.1-dev122" +#define DUCKDB_VERSION "v1.1.1-dev124" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "b369bcb4e0" +#define DUCKDB_SOURCE_ID "c0f2946562" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/main/extension/extension_install.cpp b/src/duckdb/src/main/extension/extension_install.cpp index 4c21da043..b0ca9fb77 100644 --- a/src/duckdb/src/main/extension/extension_install.cpp +++ b/src/duckdb/src/main/extension/extension_install.cpp @@ -268,15 +268,20 @@ static unique_ptr DirectInstallExtension(DatabaseInstance const string &local_extension_path, ExtensionInstallOptions &options, optional_ptr context) { - string file = fs.ConvertSeparators(path); - - // Try autoloading httpfs for loading extensions over https - if (context) { - auto &db = DatabaseInstance::GetDatabase(*context); - if (StringUtil::StartsWith(path, "https://") && !db.ExtensionIsLoaded("httpfs") && - db.config.options.autoload_known_extensions) { - ExtensionHelper::AutoLoadExtension(*context, "httpfs"); + string extension; + string file; + if (fs.IsRemoteFile(path, extension)) { + file = path; + // Try autoloading httpfs for loading extensions over https + if (context) { + auto &db = DatabaseInstance::GetDatabase(*context); + if (extension == "httpfs" && !db.ExtensionIsLoaded("httpfs") && + db.config.options.autoload_known_extensions) { + ExtensionHelper::AutoLoadExtension(*context, "httpfs"); + } } + } else { + file = fs.ConvertSeparators(path); } // Check if file exists