mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
added returntype BaseString& for ndb_upper and ndb_lower instead of void
uppercase printout ndb/include/util/BaseString.hpp: added returntype BaseString& for ndb_upper and ndb_lower instead of void ndb/src/mgmclient/CommandInterpreter.cpp: uppercase printout
This commit is contained in:
@ -48,10 +48,10 @@ public:
|
|||||||
bool empty() const;
|
bool empty() const;
|
||||||
|
|
||||||
/** @brief Convert to uppercase */
|
/** @brief Convert to uppercase */
|
||||||
void ndb_toupper();
|
BaseString& ndb_toupper();
|
||||||
|
|
||||||
/** @brief Convert to lowercase */
|
/** @brief Convert to lowercase */
|
||||||
void ndb_tolower();
|
BaseString& ndb_tolower();
|
||||||
|
|
||||||
/** @brief Assigns from a char * */
|
/** @brief Assigns from a char * */
|
||||||
BaseString& assign(const char* s);
|
BaseString& assign(const char* s);
|
||||||
@ -206,16 +206,18 @@ BaseString::empty() const
|
|||||||
return m_len == 0;
|
return m_len == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline BaseString&
|
||||||
BaseString::ndb_toupper() {
|
BaseString::ndb_toupper() {
|
||||||
for(unsigned i = 0; i < length(); i++)
|
for(unsigned i = 0; i < length(); i++)
|
||||||
m_chr[i] = toupper(m_chr[i]);
|
m_chr[i] = toupper(m_chr[i]);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline BaseString&
|
||||||
BaseString::ndb_tolower() {
|
BaseString::ndb_tolower() {
|
||||||
for(unsigned i = 0; i < length(); i++)
|
for(unsigned i = 0; i < length(); i++)
|
||||||
m_chr[i] = tolower(m_chr[i]);
|
m_chr[i] = tolower(m_chr[i]);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
|
@ -1249,7 +1249,7 @@ CommandInterpreter::executeClusterLog(char* parameters)
|
|||||||
printError();
|
printError();
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
ndbout << item << " " << (res_enable ? "enabled":"disabled") << endl;
|
ndbout << BaseString(item).ndb_toupper().c_str() << " " << (res_enable ? "enabled":"disabled") << endl;
|
||||||
|
|
||||||
item = strtok_r(NULL, " ", &tmpPtr);
|
item = strtok_r(NULL, " ", &tmpPtr);
|
||||||
} while(item != NULL);
|
} while(item != NULL);
|
||||||
|
Reference in New Issue
Block a user