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

Method init

sql/sql_lex.cc:196–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194*/
195
196bool Lex_input_stream::init(THD *thd,
197 char* buff,
198 unsigned int length)
199{
200 DBUG_EXECUTE_IF("bug42064_simulate_oom",
201 DBUG_SET("+d,simulate_out_of_memory"););
202
203 m_cpp_buf= (char*) thd->alloc(length + 1);
204
205 DBUG_EXECUTE_IF("bug42064_simulate_oom",
206 DBUG_SET("-d,bug42064_simulate_oom"););
207
208 if (m_cpp_buf == NULL)
209 return TRUE;
210
211 m_thd= thd;
212 reset(buff, length);
213
214 return FALSE;
215}
216
217
218/**

Callers 1

init_queryMethod · 0.45

Calls 1

allocMethod · 0.45

Tested by

no test coverage detected