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

Method read_value

sql/sql_load.cc:1961–1994  ·  view source on GitHub ↗

Read an xml value: handle multibyte and xml escape */

Source from the content-addressed store, hash-verified

1959 Read an xml value: handle multibyte and xml escape
1960*/
1961int READ_INFO::read_value(int delim, String *val)
1962{
1963 int chr;
1964 String tmp;
1965
1966 for (chr= GET; my_tospace(chr) != delim && chr != my_b_EOF; chr= GET)
1967 {
1968 if(chr == '&')
1969 {
1970 tmp.length(0);
1971 for (chr= my_tospace(GET) ; chr != ';' ; chr= my_tospace(GET))
1972 {
1973 if (chr == my_b_EOF)
1974 return chr;
1975 tmp.append(chr);
1976 }
1977 if ((chr= my_xml_entity_to_char(tmp.ptr(), tmp.length())) >= 0)
1978 val->append(chr);
1979 else
1980 {
1981 val->append('&');
1982 val->append(tmp);
1983 val->append(';');
1984 }
1985 }
1986 else
1987 {
1988 val->append(chr);
1989 if (charset()->use_mb() && read_mbtail(val))
1990 return my_b_EOF;
1991 }
1992 }
1993 return my_tospace(chr);
1994}
1995
1996
1997/*

Callers

nothing calls this directly

Calls 6

my_tospaceFunction · 0.85
my_xml_entity_to_charFunction · 0.85
lengthMethod · 0.45
appendMethod · 0.45
ptrMethod · 0.45
use_mbMethod · 0.45

Tested by

no test coverage detected