-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathduckdb_config.h
More file actions
88 lines (72 loc) · 3.21 KB
/
duckdb_config.h
File metadata and controls
88 lines (72 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
Copyright (c) 2025, Alibaba and/or its affiliates.
Copyright (c) 2026, MariaDB Foundation.
Copyright (c) 2026, Roman Nozdrin <drrtuy@gmail.com>
Copyright (c) 2026, Leonid Fedorov.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
*/
#ifndef DUCKDB_CONFIG_H
#define DUCKDB_CONFIG_H
#include "duckdb/common/types.hpp"
#include <my_global.h>
class THD;
namespace myduck
{
/* Global proxy variables */
extern ulonglong global_memory_limit;
extern char *global_duckdb_temp_directory;
extern ulonglong global_max_temp_directory_size;
extern ulonglong global_max_threads;
extern ulonglong appender_allocator_flush_threshold;
extern ulonglong checkpoint_threshold;
extern my_bool global_use_dio;
extern my_bool global_scheduler_process_partial;
extern my_bool use_double_for_decimal;
extern my_bool require_primary_key;
std::string BytesToHumanReadableString(uint64_t bytes,
uint64_t multiplier= 1024);
/* ON_UPDATE callbacks for global proxy variables */
void update_memory_limit_cb(MYSQL_THD thd, struct st_mysql_sys_var *var,
void *var_ptr, const void *save);
void update_max_temp_directory_size_cb(MYSQL_THD thd,
struct st_mysql_sys_var *var,
void *var_ptr, const void *save);
void update_threads_cb(MYSQL_THD thd, struct st_mysql_sys_var *var,
void *var_ptr, const void *save);
void update_scheduler_process_partial_cb(MYSQL_THD thd,
struct st_mysql_sys_var *var,
void *var_ptr, const void *save);
void update_appender_flush_threshold_cb(MYSQL_THD thd,
struct st_mysql_sys_var *var,
void *var_ptr, const void *save);
void update_checkpoint_threshold_cb(MYSQL_THD thd,
struct st_mysql_sys_var *var,
void *var_ptr, const void *save);
/* Accessor functions for session THDVARs (defined in ha_duckdb.cc) */
ulonglong get_thd_merge_join_threshold(THD *thd);
my_bool get_thd_force_no_collation(THD *thd);
ulong get_thd_explain_output(THD *thd);
ulonglong get_thd_disabled_optimizers(THD *thd);
/* Explain output types */
enum enum_explain_output
{
EXPLAIN_ALL= 0,
EXPLAIN_OPTIMIZED_ONLY,
EXPLAIN_PHYSICAL_ONLY
};
extern const char *explain_output_names[];
extern TYPELIB explain_output_typelib;
/* Disabled optimizers names */
extern const char *disabled_optimizers_names[];
extern TYPELIB disabled_optimizers_typelib;
} // namespace myduck
#endif // DUCKDB_CONFIG_H