Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "2-dev56"
#define DUCKDB_PATCH_VERSION "2-dev63"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 4
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.4.2-dev56"
#define DUCKDB_VERSION "v1.4.2-dev63"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "f707ac5f0a"
#define DUCKDB_SOURCE_ID "50f3d64620"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/duckdb/src/include/duckdb/main/capi/capi_internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ struct PreparedStatementWrapper {
//! Map of name -> values
case_insensitive_map_t<BoundParameterData> values;
unique_ptr<PreparedStatement> statement;
bool success = true;
ErrorData error_data;
};

struct ExtractStatementsWrapper {
Expand Down
1 change: 1 addition & 0 deletions src/duckdb/src/include/duckdb/planner/bound_statement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#pragma once

#include "duckdb/common/string.hpp"
#include "duckdb/common/unique_ptr.hpp"
#include "duckdb/common/vector.hpp"

namespace duckdb {
Expand Down
11 changes: 9 additions & 2 deletions src/duckdb/src/main/capi/prepared-c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ duckdb_state duckdb_prepare(duckdb_connection connection, const char *query,

const char *duckdb_prepare_error(duckdb_prepared_statement prepared_statement) {
auto wrapper = reinterpret_cast<PreparedStatementWrapper *>(prepared_statement);
if (!wrapper || !wrapper->statement || !wrapper->statement->HasError()) {
if (!wrapper) {
return nullptr;
}
if (!wrapper->success) {
return wrapper->error_data.Message().c_str();
}
if (!wrapper->statement || !wrapper->statement->HasError()) {
return nullptr;
}
return wrapper->statement->error.Message().c_str();
Expand Down Expand Up @@ -229,9 +235,10 @@ duckdb_state duckdb_bind_value(duckdb_prepared_statement prepared_statement, idx
return DuckDBError;
}
if (param_idx <= 0 || param_idx > wrapper->statement->named_param_map.size()) {
wrapper->statement->error =
wrapper->error_data =
duckdb::InvalidInputException("Can not bind to parameter number %d, statement only has %d parameter(s)",
param_idx, wrapper->statement->named_param_map.size());
wrapper->success = false;
return DuckDBError;
}
auto identifier = duckdb_parameter_name_internal(prepared_statement, param_idx);
Expand Down
6 changes: 4 additions & 2 deletions src/duckdb/src/parallel/task_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ TaskExecutionResult BaseExecutorTask::Execute(TaskExecutionMode mode) {
return TaskExecutionResult::TASK_FINISHED;
}
try {
TaskNotifier task_notifier {executor.context};
ExecuteTask();
{
TaskNotifier task_notifier {executor.context};
ExecuteTask();
}
executor.FinishTask();
return TaskExecutionResult::TASK_FINISHED;
} catch (std::exception &ex) {
Expand Down