98
98
return boost::iequals(arg, db);
101
bool SchemaIdentifier::compare(SchemaIdentifier::const_reference arg) const
103
return boost::iequals(arg.getSchemaName(), db);
101
106
bool SchemaIdentifier::isValid() const
106
if (db.size() > NAME_LEN)
109
if (db.at(db.length() -1) == ' ')
112
const CHARSET_INFO * const cs= &my_charset_utf8mb4_general_ci;
114
int well_formed_error;
115
uint32_t res= cs->cset->well_formed_len(cs, db.c_str(), db.c_str() + db.length(),
116
NAME_CHAR_LEN, &well_formed_error);
118
if (well_formed_error)
120
my_error(ER_INVALID_CHARACTER_STRING, MYF(0), "identifier", db.c_str());
118
if (db.size() > NAME_LEN)
124
if (db.at(db.length() -1) == ' ')
137
const CHARSET_INFO * const cs= &my_charset_utf8mb4_general_ci;
139
int well_formed_error;
140
uint32_t res= cs->cset->well_formed_len(cs, db.c_str(), db.c_str() + db.length(),
141
NAME_CHAR_LEN, &well_formed_error);
142
if (well_formed_error or db.length() != res)
155
my_error(ER_WRONG_DB_NAME, MYF(0), name.c_str());
124
if (db.length() != res)