1455.3.1
by Vladimir Kolesnikov
lp:drizzle + pbxt 1.1 + test results |
1 |
/* Copyright (c) 2005 PrimeBase Technologies GmbH
|
2 |
*
|
|
3 |
* PrimeBase XT
|
|
4 |
*
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
8 |
* (at your option) any later version.
|
|
9 |
*
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
1802.10.2
by Monty Taylor
Update all of the copyright headers to include the correct address. |
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
1455.3.1
by Vladimir Kolesnikov
lp:drizzle + pbxt 1.1 + test results |
18 |
*
|
19 |
* 2006-05-16 Paul McCullagh
|
|
20 |
*
|
|
21 |
* H&G2JCtL
|
|
22 |
*
|
|
23 |
* These functions implement the parts of PBXT which must conform to the
|
|
24 |
* key and row format used by MySQL.
|
|
25 |
*/
|
|
26 |
||
27 |
#ifndef __xt_myxt_h__
|
|
28 |
#define __xt_myxt_h__
|
|
29 |
||
30 |
#include "xt_defs.h" |
|
31 |
#include "table_xt.h" |
|
32 |
#include "datadic_xt.h" |
|
33 |
||
34 |
#ifndef MYSQL_VERSION_ID
|
|
35 |
#error MYSQL_VERSION_ID must be defined!
|
|
36 |
#endif
|
|
37 |
||
38 |
struct XTDictionary; |
|
39 |
struct XTDatabase; |
|
40 |
struct charset_info_st; |
|
41 |
||
42 |
u_int myxt_create_key_from_key(XTIndexPtr ind, xtWord1 *key, xtWord1 *old, u_int k_length); |
|
43 |
u_int myxt_create_key_from_row(XTIndexPtr ind, xtWord1 *key, xtWord1 *record, xtBool *no_duplicate); |
|
44 |
u_int myxt_create_foreign_key_from_row(XTIndexPtr ind, xtWord1 *key, xtWord1 *record, XTIndexPtr fkey_ind, xtBool *no_null); |
|
45 |
u_int myxt_get_key_length(XTIndexPtr ind, xtWord1 *b_value); |
|
46 |
int myxt_compare_key(XTIndexPtr ind, int search_flags, uint key_length, xtWord1 *key_value, xtWord1 *b_value); |
|
47 |
u_int myxt_key_seg_length(XTIndexSegRec *keyseg, u_int key_offset, xtWord1 *key_value); |
|
48 |
xtBool myxt_create_row_from_key(XTOpenTablePtr ot, XTIndexPtr ind, xtWord1 *key, u_int key_len, xtWord1 *record); |
|
49 |
void myxt_set_null_row_from_key(XTOpenTablePtr ot, XTIndexPtr ind, xtWord1 *record); |
|
50 |
void myxt_set_default_row_from_key(XTOpenTablePtr ot, XTIndexPtr ind, xtWord1 *record); |
|
51 |
void myxt_print_key(XTIndexPtr ind, xtWord1 *key_value); |
|
52 |
||
53 |
xtWord4 myxt_store_row_length(XTOpenTablePtr ot, char *rec_buff); |
|
54 |
xtWord4 myxt_store_row_data(XTOpenTablePtr ot, xtWord4 row_size, char *rec_buff); |
|
55 |
xtBool myxt_store_row(XTOpenTablePtr ot, XTTabRecInfoPtr rec_info, char *rec_buff); |
|
56 |
size_t myxt_load_row_length(XTOpenTablePtr ot, size_t buffer_size, xtWord1 *source_buf, u_int *ret_col_cnt); |
|
57 |
xtWord4 myxt_load_row_data(XTOpenTablePtr ot, xtWord1 *source_buf, xtWord1 *dest_buff, u_int col_cnt); |
|
58 |
xtBool myxt_load_row(XTOpenTablePtr ot, xtWord1 *source_buf, xtWord1 *dest_buff, u_int col_cnt); |
|
59 |
xtBool myxt_find_column(XTOpenTablePtr ot, u_int *col_idx, const char *col_name); |
|
60 |
void myxt_get_column_name(XTOpenTablePtr ot, u_int col_idx, u_int len, char *col_name); |
|
61 |
void myxt_get_column_as_string(XTOpenTablePtr ot, char *buffer, u_int col_idx, u_int len, char *value); |
|
62 |
xtBool myxt_set_column(XTOpenTablePtr ot, char *buffer, u_int col_idx, const char *value, u_int len); |
|
63 |
void myxt_get_column_data(XTOpenTablePtr ot, char *buffer, u_int col_idx, char **value, size_t *len); |
|
64 |
||
65 |
void myxt_setup_dictionary(XTThreadPtr self, XTDictionary *dic); |
|
66 |
xtBool myxt_load_dictionary(XTThreadPtr self, struct XTDictionary *dic, struct XTDatabase *db, XTPathStrPtr tab_path); |
|
67 |
void myxt_free_dictionary(XTThreadPtr self, XTDictionary *dic); |
|
68 |
void myxt_move_dictionary(XTDictionaryPtr dic, XTDictionaryPtr source_dic); |
|
69 |
XTDDTable *myxt_create_table_from_table(XTThreadPtr self, STRUCT_TABLE *my_tab); |
|
70 |
||
1753.3.1
by Paul McCullagh
Merged with 1.1 trunk |
71 |
void myxt_static_convert_identifier(XTThreadPtr self, MX_CONST_CHARSET_INFO *cs, char *from, char *to, size_t to_len); |
72 |
char *myxt_convert_identifier(XTThreadPtr self, MX_CONST_CHARSET_INFO *cs, char *from); |
|
1455.3.1
by Vladimir Kolesnikov
lp:drizzle + pbxt 1.1 + test results |
73 |
void myxt_static_convert_table_name(XTThreadPtr self, char *from, char *to, size_t to_len); |
74 |
void myxt_static_convert_file_name(char *from, char *to, size_t to_len); |
|
75 |
char *myxt_convert_table_name(XTThreadPtr self, char *from); |
|
76 |
xtBool myxt_temp_table_name(const char *table); |
|
77 |
int myxt_strcasecmp(char * a, char *b); |
|
1753.3.1
by Paul McCullagh
Merged with 1.1 trunk |
78 |
int myxt_isspace(MX_CONST_CHARSET_INFO *cs, char a); |
79 |
int myxt_ispunct(MX_CONST_CHARSET_INFO *cs, char a); |
|
80 |
int myxt_isdigit(MX_CONST_CHARSET_INFO *cs, char a); |
|
1455.3.1
by Vladimir Kolesnikov
lp:drizzle + pbxt 1.1 + test results |
81 |
|
1753.3.1
by Paul McCullagh
Merged with 1.1 trunk |
82 |
MX_CONST_CHARSET_INFO *myxt_getcharset(bool convert); |
1455.3.1
by Vladimir Kolesnikov
lp:drizzle + pbxt 1.1 + test results |
83 |
|
84 |
xtBool myxt_create_thread_possible(); |
|
85 |
void *myxt_create_thread(); |
|
86 |
void myxt_destroy_thread(void *thread, xtBool end_threads); |
|
87 |
void myxt_delete_remaining_thread(); |
|
88 |
XTThreadPtr myxt_get_self(); |
|
89 |
||
90 |
int myxt_statistics_fill_table(XTThreadPtr self, void *th, void *ta, void *co, MX_CONST void *ch); |
|
91 |
void myxt_get_status(XTThreadPtr self, XTStringBufferPtr strbuf); |
|
92 |
||
93 |
class XTDDColumnFactory |
|
94 |
{
|
|
95 |
public: |
|
96 |
static XTDDColumn *createFromMySQLField(XTThread *self, STRUCT_TABLE *, Field *); |
|
97 |
};
|
|
98 |
||
99 |
void myxt_wait_pbxt_plugin_slot_assigned(XTThread *self); |
|
100 |
||
101 |
#endif
|