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

Function _db_keyword_

dbug/dbug.c:1908–1926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1906 */
1907
1908BOOLEAN _db_keyword_(CODE_STATE *cs, const char *keyword, int strict)
1909{
1910 BOOLEAN result;
1911 get_code_state_if_not_set_or_return FALSE;
1912
1913 /* Dirty read, for DBUG_EXECUTE(), DBUG_EXECUTE_IF() ... performance. */
1914 if (! DEBUGGING)
1915 return FALSE;
1916
1917 read_lock_stack(cs);
1918
1919 strict=strict ? INCLUDE : INCLUDE|MATCHED;
1920 result= DoTrace(cs) & DO_TRACE &&
1921 InList(cs->stack->keywords, keyword) & strict;
1922
1923 unlock_stack(cs);
1924
1925 return result;
1926}
1927
1928/*
1929 * FUNCTION

Callers 2

_db_enabled_Function · 0.85
_db_dump_Function · 0.85

Calls 4

read_lock_stackFunction · 0.85
DoTraceFunction · 0.85
InListFunction · 0.85
unlock_stackFunction · 0.85

Tested by

no test coverage detected