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

Method c_ptr

sql/sql_string.h:199–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197 inline void mark_as_const() { Alloced_length= 0;}
198 inline const char *ptr() const { return Ptr; }
199 inline char *c_ptr()
200 {
201 DBUG_ASSERT(!alloced || !Ptr || !Alloced_length ||
202 (Alloced_length >= (str_length + 1)));
203
204 if (!Ptr || Ptr[str_length]) /* Should be safe */
205 (void) realloc(str_length);
206 return Ptr;
207 }
208 inline char *c_ptr_quick()
209 {
210 if (Ptr && str_length < Alloced_length)

Callers 1

printMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected