forked from bloomberg/comdb2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sc_schema.h
96 lines (66 loc) · 3.95 KB
/
sc_schema.h
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
89
90
91
92
93
94
95
96
/*
Copyright 2015 Bloomberg Finance L.P.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef INCLUDE_SC_SCHEMA_H
#define INCLUDE_SC_SCHEMA_H
int set_header_and_properties(void *tran, struct dbtable *newdb,
struct schema_change_type *s, int inplace_upd,
int bthash);
int mark_schemachange_over(const char *table);
int mark_schemachange_over_tran(const char *table, tran_type *);
int prepare_table_version_one(tran_type *, struct dbtable *db,
struct schema **version);
int fetch_sc_seed(const char *tablename, struct dbenv *thedb,
unsigned long long *stored_sc_genid,
unsigned int *stored_sc_host);
int check_option_coherency(struct schema_change_type *s, struct dbtable *db,
struct scinfo *scinfo);
int check_option_queue_coherency(struct schema_change_type *s,
struct dbtable *db);
int sc_request_disallowed(SBUF2 *sb);
int sc_cmp_fileids(unsigned long long a, unsigned long long b);
int verify_record_constraint(const struct ireq *iq, const struct dbtable *db, void *trans,
const void *old_dta, unsigned long long ins_keys,
blob_buffer_t *blobs, int maxblobs,
const char *from, int rebuild, int convert);
int verify_partial_rev_constraint(struct dbtable *to_db, struct dbtable *newdb,
void *trans, void *od_dta,
unsigned long long ins_keys,
const char *from);
void verify_schema_change_constraint(struct ireq *iq, void *trans,
unsigned long long newgenid, void *od_dta,
unsigned long long ins_keys);
int ondisk_schema_changed(const char *table, struct dbtable *newdb, FILE *out,
struct schema_change_type *s);
int create_schema_change_plan(struct schema_change_type *s, struct dbtable *olddb,
struct dbtable *newdb, struct scplan *plan);
void transfer_db_settings(struct dbtable *olddb, struct dbtable *newdb);
void set_odh_options_tran(struct dbtable *db, tran_type *tran);
void set_odh_options(struct dbtable *db);
int compare_constraints(const char *table, struct dbtable *newdb);
int restore_constraint_pointers_main(struct dbtable *db, struct dbtable *newdb,
int copyof);
int restore_constraint_pointers(struct dbtable *db, struct dbtable *newdb);
int backout_constraint_pointers(struct dbtable *db, struct dbtable *newdb);
int fk_source_change(struct dbtable *newdb, FILE *out, struct schema_change_type *s);
int check_sc_headroom(struct schema_change_type *s, struct dbtable *olddb,
struct dbtable *newdb);
int compat_chg(struct dbtable *olddb, struct schema *s2, const char *ixname);
int compatible_constraint_source(struct dbtable *olddb, struct dbtable *newdb,
struct schema *newsc, const char *key,
FILE *out, struct schema_change_type *s);
int remove_constraint_pointers(struct dbtable *db);
int rename_constraint_pointers(struct dbtable *db, const char *newname);
void fix_constraint_pointers(struct dbtable *db, struct dbtable *newdb);
int self_referenced_only(struct dbtable *db);
void change_schemas_recover(char *table);
#endif