MCPcopy Create free account
hub / github.com/Tencent/phxsql / operator<

Function operator<

phx_percona/percona/sql/mysqld.cc:8538–8561  ·  view source on GitHub ↗

Compares two options' names, treats - and _ the same */

Source from the content-addressed store, hash-verified

8536
8537/** Compares two options' names, treats - and _ the same */
8538static bool operator<(const my_option &a, const my_option &b)
8539{
8540 const char *sa= a.name;
8541 const char *sb= b.name;
8542 for (; *sa || *sb; sa++, sb++)
8543 {
8544 if (*sa < *sb)
8545 {
8546 if (*sa == '-' && *sb == '_')
8547 continue;
8548 else
8549 return true;
8550 }
8551 if (*sa > *sb)
8552 {
8553 if (*sa == '_' && *sb == '-')
8554 continue;
8555 else
8556 return false;
8557 }
8558 }
8559 DBUG_ASSERT(a.name == b.name);
8560 return false;
8561}
8562
8563static void print_help()
8564{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected