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

Method equals

sql/sp_pcontext.cc:22–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "sp_head.h"
21
22bool sp_condition_value::equals(const sp_condition_value *cv) const
23{
24 DBUG_ASSERT(cv);
25
26 if (this == cv)
27 return true;
28
29 if (type != cv->type)
30 return false;
31
32 switch (type)
33 {
34 case sp_condition_value::ERROR_CODE:
35 return (mysqlerr == cv->mysqlerr);
36
37 case sp_condition_value::SQLSTATE:
38 return (strcmp(sql_state, cv->sql_state) == 0);
39
40 default:
41 return true;
42 }
43}
44
45
46void sp_pcontext::init(uint var_offset,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected