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

Function append_create_options

sql/sql_show.cc:1969–2002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1967*/
1968
1969void append_create_options(THD *thd, String *packet, engine_option_value *opt,
1970 bool check_options, ha_create_table_option *rules)
1971{
1972 bool in_comment= false;
1973 for(; opt; opt= opt->next)
1974 {
1975 if (check_options)
1976 {
1977 if (is_engine_option_known(opt, rules))
1978 {
1979 if (in_comment)
1980 packet->append(STRING_WITH_LEN(" */"));
1981 in_comment= false;
1982 }
1983 else
1984 {
1985 if (!in_comment)
1986 packet->append(STRING_WITH_LEN(" /*"));
1987 in_comment= true;
1988 }
1989 }
1990
1991 DBUG_ASSERT(opt->value.str);
1992 packet->append(' ');
1993 append_identifier(thd, packet, &opt->name);
1994 packet->append('=');
1995 if (opt->quoted_value)
1996 append_unescaped(packet, opt->value.str, opt->value.length);
1997 else
1998 packet->append(&opt->value);
1999 }
2000 if (in_comment)
2001 packet->append(STRING_WITH_LEN(" */"));
2002}
2003
2004/**
2005 Add table options to end of CREATE statement

Callers 6

add_table_optionsFunction · 0.85
show_create_table_exFunction · 0.85
get_schema_tables_recordFunction · 0.85
get_schema_column_recordFunction · 0.85
get_schema_stat_recordFunction · 0.85

Calls 4

is_engine_option_knownFunction · 0.85
append_unescapedFunction · 0.85
append_identifierFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected