Skip to content

Commit

Permalink
chore: Update vendored sources to duckdb/duckdb@c0f2946 (#419)
Browse files Browse the repository at this point in the history
Improve logic for remote extension install on Windows (duckdb/duckdb#13929)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and krlmlr authored Sep 25, 2024
1 parent c462e69 commit 08352d8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down
21 changes: 13 additions & 8 deletions src/duckdb/src/main/extension/extension_install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,20 @@ static unique_ptr<ExtensionInstallInfo> DirectInstallExtension(DatabaseInstance
const string &local_extension_path,
ExtensionInstallOptions &options,
optional_ptr<ClientContext> 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
Expand Down

0 comments on commit 08352d8

Please sign in to comment.