duckdb 0.3.2-dev1302.0 → 0.3.2-dev1304.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 +15 -3
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +35999 -35999
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -222811,12 +222811,17 @@ static void allocate_new(parser_state *state, size_t n) {
|
|
|
222811
222811
|
|
|
222812
222812
|
void *palloc(size_t n) {
|
|
222813
222813
|
// we need to align our pointers for the sanitizer
|
|
222814
|
-
auto
|
|
222814
|
+
auto allocate_n = n + sizeof(size_t);
|
|
222815
|
+
auto aligned_n = ((allocate_n + 7) / 8) * 8;
|
|
222815
222816
|
if (pg_parser_state.malloc_pos + aligned_n > PG_MALLOC_SIZE) {
|
|
222816
222817
|
allocate_new(&pg_parser_state, aligned_n);
|
|
222817
222818
|
}
|
|
222818
222819
|
|
|
222819
|
-
|
|
222820
|
+
// store the length of the allocation
|
|
222821
|
+
char *base_ptr = pg_parser_state.malloc_ptrs[pg_parser_state.malloc_ptr_idx - 1] + pg_parser_state.malloc_pos;
|
|
222822
|
+
memcpy(base_ptr, &n, sizeof(size_t));
|
|
222823
|
+
// store the actual pointer
|
|
222824
|
+
char *ptr = (char*) base_ptr + sizeof(size_t);
|
|
222820
222825
|
memset(ptr, 0, n);
|
|
222821
222826
|
pg_parser_state.malloc_pos += aligned_n;
|
|
222822
222827
|
return ptr;
|
|
@@ -222929,7 +222934,14 @@ void *palloc0fast(size_t n) { // very fast
|
|
|
222929
222934
|
return palloc(n);
|
|
222930
222935
|
}
|
|
222931
222936
|
void *repalloc(void *ptr, size_t n) {
|
|
222932
|
-
|
|
222937
|
+
// get the length of the allocation
|
|
222938
|
+
size_t old_len;
|
|
222939
|
+
char *old_len_ptr = (char *) ptr - sizeof(size_t);
|
|
222940
|
+
memcpy((void *) &old_len, old_len_ptr, sizeof(size_t));
|
|
222941
|
+
// re-allocate and copy the data
|
|
222942
|
+
void *new_buf = palloc(n);
|
|
222943
|
+
memcpy(new_buf, ptr, old_len);
|
|
222944
|
+
return new_buf;
|
|
222933
222945
|
}
|
|
222934
222946
|
char *NameListToString(PGList *names) {
|
|
222935
222947
|
throw std::runtime_error("NameListToString NOT IMPLEMENTED");
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.3.2-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "180367f93"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.2-dev1304"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|