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

Function convert_error_message

sql/sql_error.cc:1006–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1004*/
1005
1006size_t convert_error_message(char *to, size_t to_length, CHARSET_INFO *to_cs,
1007 const char *from, size_t from_length,
1008 CHARSET_INFO *from_cs, uint *errors)
1009{
1010 DBUG_ASSERT(to_length > 0);
1011 /* Make room for the null terminator. */
1012 to_length--;
1013
1014 if (!to_cs || to_cs == &my_charset_bin)
1015 to_cs= system_charset_info;
1016 uint32 cnv_length= my_convert_using_func(to, to_length,
1017 to_cs,
1018 to_cs->cset->wc_to_printable,
1019 from, from_length,
1020 from_cs, from_cs->cset->mb_wc,
1021 errors);
1022 DBUG_ASSERT(to_length >= cnv_length);
1023 to[cnv_length]= '\0';
1024 return cnv_length;
1025}
1026
1027
1028/**

Callers 3

net_send_error_packetMethod · 0.85
net_send_error_packetMethod · 0.85
net_send_error_packetMethod · 0.85

Calls 1

my_convert_using_funcFunction · 0.85

Tested by

no test coverage detected