36
36
CharacterSetsTool::Generator::Generator(Field **arg) :
37
plugin::TableFunction::Generator(arg)
37
plugin::TableFunction::Generator(arg),
42
bool CharacterSetsTool::Generator::checkCharacterSet()
44
if (character_set() && (character_set()->state & MY_CS_PRIMARY) &&
45
(character_set()->state & MY_CS_AVAILABLE) && not (character_set()->state & MY_CS_HIDDEN))
53
bool CharacterSetsTool::Generator::nextCharacterSetCore()
61
character_set_iter= all_charsets;
65
if (character_set_iter == all_charsets+255)
68
if (checkCharacterSet())
74
bool CharacterSetsTool::Generator::nextCharacterSet()
76
while (not nextCharacterSetCore())
78
if (character_set_iter == all_charsets+255)
42
85
bool CharacterSetsTool::Generator::populate()
44
for (; cs < all_charsets+255 ; cs++)
87
if (nextCharacterSet())
46
const CHARSET_INFO * const tmp_cs= cs[0];
48
if (tmp_cs && (tmp_cs->state & MY_CS_PRIMARY) &&
49
(tmp_cs->state & MY_CS_AVAILABLE) &&
50
! (tmp_cs->state & MY_CS_HIDDEN))
52
/* CHARACTER_SET_NAME */
55
/* DEFAULT_COLLATE_NAME */
59
push(tmp_cs->comment);
62
push((int64_t) tmp_cs->mbmaxlen);
96
void CharacterSetsTool::Generator::fill()
98
const CHARSET_INFO * const tmp_cs= character_set_iter[0];
100
/* CHARACTER_SET_NAME */
101
push(tmp_cs->csname);
103
/* DEFAULT_COLLATE_NAME */
107
push(tmp_cs->comment);
110
push(static_cast<int64_t>(tmp_cs->mbmaxlen));