| 1967 | */ |
| 1968 | |
| 1969 | void 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 |
no test coverage detected