MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / require_quotes

Function require_quotes

sql/sql_show.cc:476–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474*/
475
476static const char *require_quotes(const char *name, uint name_length)
477{
478 uint length;
479 bool pure_digit= TRUE;
480 const char *end= name + name_length;
481
482 for (; name < end ; name++)
483 {
484 uchar chr= (uchar) *name;
485 length= my_mbcharlen(system_charset_info, chr);
486 if (length == 1 && !system_charset_info->ident_map[chr])
487 return name;
488 if (length == 1 && (chr < '0' || chr > '9'))
489 pure_digit= FALSE;
490 }
491 if (pure_digit)
492 return name;
493 return 0;
494}
495
496
497/*

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected