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

Method c_ptr_safe

sql/sql_string.h:710–717  ·  view source on GitHub ↗

This is to be used only in the case when one cannot use c_ptr(). The cases are: - When one initializes String with an external buffer and length and buffer[length] could be uninitialized when c_ptr() is called. - When valgrind gives warnings about uninitialized memory with c_ptr(). */

Source from the content-addressed store, hash-verified

708 - When valgrind gives warnings about uninitialized memory with c_ptr().
709 */
710 inline char *c_ptr_safe()
711 {
712 if (Ptr && str_length < Alloced_length)
713 Ptr[str_length]=0;
714 else
715 (void) realloc(str_length);
716 return Ptr;
717 }
718
719 inline void free()
720 {

Callers 15

send_explainMethod · 0.45
print_json_membersMethod · 0.45
write_itemFunction · 0.45
print_explainMethod · 0.45
mark_as_eliminatedFunction · 0.45
report_bad_valueMethod · 0.45
print_vcol_subst_warningFunction · 0.45
thd_TIME_to_strFunction · 0.45
val_strMethod · 0.45
print_admin_msgFunction · 0.45
print_errorMethod · 0.45
check_misplaced_rowsMethod · 0.45

Calls

no outgoing calls

Tested by 3

print_whereFunction · 0.36
TEST_filesortFunction · 0.36
TEST_joinFunction · 0.36