34
34
#define MY_CS_SORT_ORDER_TABLE_SIZE 256
35
35
#define MY_CS_TO_UNI_TABLE_SIZE 256
37
#define CHARSET_DIR "charsets/"
39
37
#define my_wc_t unsigned long
41
39
typedef struct unicase_info_st
65
63
#define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc */
66
64
/* These following three are currently not really used */
67
65
#define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */
68
#define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */
69
#define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */
71
67
/* A helper function for "need at least n bytes" */
72
68
inline static int my_cs_toosmalln(int n)
80
76
/* My charsets_list flags */
81
77
#define MY_CS_COMPILED 1 /* compiled-in sets */
82
#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
83
#define MY_CS_INDEX 4 /* sets listed in the Index file */
84
78
#define MY_CS_LOADED 8 /* sets that are currently loaded */
85
79
#define MY_CS_BINSORT 16 /* if binary sort order */
86
80
#define MY_CS_PRIMARY 32 /* if primary collation */
88
82
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
89
83
#define MY_CS_READY 256 /* if a charset is initialized */
90
84
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
91
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
92
85
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
93
#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */
94
#define MY_CHARSET_UNDEFINED 0
96
87
/* Flags for strxfrm */
97
#define MY_STRXFRM_LEVEL1 0x00000001 /* for primary weights */
98
#define MY_STRXFRM_LEVEL2 0x00000002 /* for secondary weights */
99
#define MY_STRXFRM_LEVEL3 0x00000004 /* for tertiary weights */
100
#define MY_STRXFRM_LEVEL4 0x00000008 /* fourth level weights */
101
#define MY_STRXFRM_LEVEL5 0x00000010 /* fifth level weights */
102
#define MY_STRXFRM_LEVEL6 0x00000020 /* sixth level weights */
103
88
#define MY_STRXFRM_LEVEL_ALL 0x0000003F /* Bit OR for the above six */
104
89
#define MY_STRXFRM_NLEVELS 6 /* Number of possible levels*/
106
91
#define MY_STRXFRM_PAD_WITH_SPACE 0x00000040 /* if pad result with spaces */
107
#define MY_STRXFRM_UNUSED_00000080 0x00000080 /* for future extensions */
109
93
#define MY_STRXFRM_DESC_LEVEL1 0x00000100 /* if desc order for level1 */
110
#define MY_STRXFRM_DESC_LEVEL2 0x00000200 /* if desc order for level2 */
111
#define MY_STRXFRM_DESC_LEVEL3 0x00000300 /* if desc order for level3 */
112
#define MY_STRXFRM_DESC_LEVEL4 0x00000800 /* if desc order for level4 */
113
#define MY_STRXFRM_DESC_LEVEL5 0x00001000 /* if desc order for level5 */
114
#define MY_STRXFRM_DESC_LEVEL6 0x00002000 /* if desc order for level6 */
115
94
#define MY_STRXFRM_DESC_SHIFT 8
117
#define MY_STRXFRM_UNUSED_00004000 0x00004000 /* for future extensions */
118
#define MY_STRXFRM_UNUSED_00008000 0x00008000 /* for future extensions */
120
96
#define MY_STRXFRM_REVERSE_LEVEL1 0x00010000 /* if reverse order for level1 */
121
#define MY_STRXFRM_REVERSE_LEVEL2 0x00020000 /* if reverse order for level2 */
122
#define MY_STRXFRM_REVERSE_LEVEL3 0x00040000 /* if reverse order for level3 */
123
#define MY_STRXFRM_REVERSE_LEVEL4 0x00080000 /* if reverse order for level4 */
124
#define MY_STRXFRM_REVERSE_LEVEL5 0x00100000 /* if reverse order for level5 */
125
#define MY_STRXFRM_REVERSE_LEVEL6 0x00200000 /* if reverse order for level6 */
126
97
#define MY_STRXFRM_REVERSE_SHIFT 16
323
#define ILLEGAL_CHARSET_INFO_NUMBER (UINT32_MAX)
326
294
extern DRIZZLED_API charset_info_st my_charset_bin;
327
295
extern DRIZZLED_API charset_info_st my_charset_utf8mb4_bin;
328
296
extern DRIZZLED_API charset_info_st my_charset_utf8mb4_general_ci;