MCPcopy Create free account
hub / github.com/MariaDB/server / dbug_user_var_equals_str

Function dbug_user_var_equals_str

sql/sql_select.cc:439–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437*/
438
439bool dbug_user_var_equals_str(THD *thd, const char *name, const char* value)
440{
441 user_var_entry *var;
442 LEX_CSTRING varname= {name, strlen(name)};
443 if ((var= get_variable(&thd->user_vars, &varname, FALSE)))
444 {
445 bool null_value;
446 String str;
447 auto var_value= var->val_str(&null_value, &str, 10)->ptr();
448 if (!null_value && !strncmp(var_value, value, strlen(value)))
449 return TRUE;
450 }
451 return FALSE;
452}
453#endif /* DBUG_OFF */
454
455/*

Callers 1

Calls 3

get_variableFunction · 0.85
ptrMethod · 0.45
val_strMethod · 0.45

Tested by

no test coverage detected