duckdb 0.3.2-dev292.0 → 0.3.2-dev303.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb.cpp +9 -7
- package/src/duckdb.hpp +2 -2
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -81826,7 +81826,7 @@ int64_t DatePart::EpochOperator::Operation(interval_t input) {
|
|
|
81826
81826
|
|
|
81827
81827
|
template <>
|
|
81828
81828
|
int64_t DatePart::EpochOperator::Operation(dtime_t input) {
|
|
81829
|
-
return
|
|
81829
|
+
return input.micros / Interval::MICROS_PER_SEC;
|
|
81830
81830
|
}
|
|
81831
81831
|
|
|
81832
81832
|
template <>
|
|
@@ -88783,6 +88783,7 @@ struct CurrvalFun {
|
|
|
88783
88783
|
|
|
88784
88784
|
|
|
88785
88785
|
|
|
88786
|
+
|
|
88786
88787
|
namespace duckdb {
|
|
88787
88788
|
|
|
88788
88789
|
struct NextvalBindData : public FunctionData {
|
|
@@ -88815,9 +88816,12 @@ struct NextSequenceValueOperator {
|
|
|
88815
88816
|
static int64_t Operation(Transaction &transaction, SequenceCatalogEntry *seq) {
|
|
88816
88817
|
lock_guard<mutex> seqlock(seq->lock);
|
|
88817
88818
|
int64_t result;
|
|
88819
|
+
result = seq->counter;
|
|
88820
|
+
bool overflow = !TryAddOperator::Operation(seq->counter, seq->increment, seq->counter);
|
|
88818
88821
|
if (seq->cycle) {
|
|
88819
|
-
|
|
88820
|
-
|
|
88822
|
+
if (overflow) {
|
|
88823
|
+
throw SequenceException("overflow in sequence");
|
|
88824
|
+
}
|
|
88821
88825
|
if (result < seq->min_value) {
|
|
88822
88826
|
result = seq->max_value;
|
|
88823
88827
|
seq->counter = seq->max_value + seq->increment;
|
|
@@ -88826,13 +88830,11 @@ struct NextSequenceValueOperator {
|
|
|
88826
88830
|
seq->counter = seq->min_value + seq->increment;
|
|
88827
88831
|
}
|
|
88828
88832
|
} else {
|
|
88829
|
-
result
|
|
88830
|
-
seq->counter += seq->increment;
|
|
88831
|
-
if (result < seq->min_value) {
|
|
88833
|
+
if (result < seq->min_value || (overflow && seq->increment < 0)) {
|
|
88832
88834
|
throw SequenceException("nextval: reached minimum value of sequence \"%s\" (%lld)", seq->name,
|
|
88833
88835
|
seq->min_value);
|
|
88834
88836
|
}
|
|
88835
|
-
if (result > seq->max_value) {
|
|
88837
|
+
if (result > seq->max_value || overflow) {
|
|
88836
88838
|
throw SequenceException("nextval: reached maximum value of sequence \"%s\" (%lld)", seq->name,
|
|
88837
88839
|
seq->max_value);
|
|
88838
88840
|
}
|
package/src/duckdb.hpp
CHANGED
|
@@ -10,8 +10,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
10
10
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
|
-
#define DUCKDB_SOURCE_ID "
|
|
14
|
-
#define DUCKDB_VERSION "0.3.2-
|
|
13
|
+
#define DUCKDB_SOURCE_ID "b6c9a6f4e"
|
|
14
|
+
#define DUCKDB_VERSION "0.3.2-dev303"
|
|
15
15
|
//===----------------------------------------------------------------------===//
|
|
16
16
|
// DuckDB
|
|
17
17
|
//
|