diff options
Diffstat (limited to 'sql/create_options.h')
-rw-r--r-- | sql/create_options.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/sql/create_options.h b/sql/create_options.h index ae918f6cea1..191ec88750a 100644 --- a/sql/create_options.h +++ b/sql/create_options.h @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ /** @file @@ -23,7 +23,8 @@ #define SQL_CREATE_OPTIONS_INCLUDED #include "sql_class.h" -//#include "handler.h" + +enum { ENGINE_OPTION_MAX_LENGTH=32767 }; class engine_option_value: public Sql_alloc { @@ -34,6 +35,13 @@ class engine_option_value: public Sql_alloc bool parsed; ///< to detect unrecognized options bool quoted_value; ///< option=VAL vs. option='VAL' + engine_option_value(engine_option_value *src, + engine_option_value **start, engine_option_value **end) : + name(src->name), value(src->value), + next(NULL), parsed(src->parsed), quoted_value(src->quoted_value) + { + link(start, end); + } engine_option_value(LEX_STRING &name_arg, LEX_STRING &value_arg, bool quoted, engine_option_value **start, engine_option_value **end) : name(name_arg), value(value_arg), @@ -59,7 +67,8 @@ class engine_option_value: public Sql_alloc link(start, end); } } - static uchar *frm_read(const uchar *buff, engine_option_value **start, + static uchar *frm_read(const uchar *buff, const uchar *buff_end, + engine_option_value **start, engine_option_value **end, MEM_ROOT *root); void link(engine_option_value **start, engine_option_value **end); uint frm_length(); @@ -69,16 +78,15 @@ class engine_option_value: public Sql_alloc typedef struct st_key KEY; class Create_field; -my_bool parse_engine_table_options(THD *thd, handlerton *ht, +bool resolve_sysvar_table_options(handlerton *hton); +void free_sysvar_table_options(handlerton *hton); +bool parse_engine_table_options(THD *thd, handlerton *ht, TABLE_SHARE *share); +bool parse_option_list(THD* thd, handlerton *hton, void *option_struct, + engine_option_value **option_list, + ha_create_table_option *rules, + bool suppress_warning, MEM_ROOT *root); +bool engine_table_options_frm_read(const uchar *buff, uint length, TABLE_SHARE *share); -my_bool parse_option_list(THD* thd, void *option_struct, - engine_option_value *option_list, - ha_create_table_option *rules, - my_bool suppress_warning, - MEM_ROOT *root); -my_bool engine_table_options_frm_read(const uchar *buff, - uint length, - TABLE_SHARE *share); engine_option_value *merge_engine_table_options(engine_option_value *source, engine_option_value *changes, MEM_ROOT *root); @@ -90,4 +98,9 @@ uchar *engine_table_options_frm_image(uchar *buff, engine_option_value *table_option_list, List<Create_field> &create_fields, uint keys, KEY *key_info); + +bool engine_options_differ(void *old_struct, void *new_struct, + ha_create_table_option *rules); +bool is_engine_option_known(engine_option_value *opt, + ha_create_table_option *rules); #endif |