summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2014-02-05 19:23:11 +0200
committerMichael Widenius <monty@askmonty.org>2014-02-05 19:23:11 +0200
commit10001c8e4f4bf08b3c491dce2714e13cca667890 (patch)
tree738ffc405ffa9a11753f7b9a781f244dc270f803 /sql/handler.h
parentf68eac2eadb9bdb3d9c3554b37d6c253f04562d2 (diff)
parent5426facdcbfba2d78dab3c709cbf278073383b7c (diff)
downloadmariadb-git-10001c8e4f4bf08b3c491dce2714e13cca667890.tar.gz
Automatic merge
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 0202fedb1eb..ffb12d11648 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -32,6 +32,7 @@
#include "sql_cache.h"
#include "structs.h" /* SHOW_COMP_OPTION */
#include "sql_array.h" /* Dynamic_array<> */
+#include "mdl.h"
#include <my_compare.h>
#include <ft_global.h>
@@ -387,6 +388,7 @@ enum enum_alter_inplace_result {
#define HA_LEX_CREATE_IF_NOT_EXISTS 2
#define HA_LEX_CREATE_TABLE_LIKE 4
#define HA_CREATE_TMP_ALTER 8
+#define HA_LEX_CREATE_REPLACE 16
#define HA_MAX_REC_LENGTH 65535
/* Table caching type */
@@ -1582,9 +1584,15 @@ struct HA_CREATE_INFO
ulong avg_row_length;
ulong used_fields;
ulong key_block_size;
- uint stats_sample_pages; /* number of pages to sample during
- stats estimation, if used, otherwise 0. */
- enum_stats_auto_recalc stats_auto_recalc;
+ /*
+ number of pages to sample during
+ stats estimation, if used, otherwise 0.
+ */
+ uint stats_sample_pages;
+ uint null_bits; /* NULL bits at start of record */
+ uint options; /* OR of HA_CREATE_ options */
+ uint merge_insert_method;
+ uint extra_size; /* length of extra data segment */
SQL_I_List<TABLE_LIST> merge_list;
handlerton *db_type;
/**
@@ -1597,21 +1605,23 @@ struct HA_CREATE_INFO
If nothing speficied inherits the value of the original table (if present).
*/
enum row_type row_type;
- uint null_bits; /* NULL bits at start of record */
- uint options; /* OR of HA_CREATE_ options */
- uint merge_insert_method;
- uint extra_size; /* length of extra data segment */
enum ha_choice transactional;
- bool varchar; ///< 1 if table has a VARCHAR
enum ha_storage_media storage_media; ///< DEFAULT, DISK or MEMORY
enum ha_choice page_checksum; ///< If we have page_checksums
engine_option_value *option_list; ///< list of table create options
+ enum_stats_auto_recalc stats_auto_recalc;
+ bool varchar; ///< 1 if table has a VARCHAR
/* the following three are only for ALTER TABLE, check_if_incompatible_data() */
ha_table_option_struct *option_struct; ///< structure with parsed table options
ha_field_option_struct **fields_option_struct; ///< array of field option structures
ha_index_option_struct **indexes_option_struct; ///< array of index option structures
+ /* The following is used to remember the old state for CREATE OR REPLACE */
+ TABLE *table;
+ TABLE_LIST *pos_in_locked_tables;
+ MDL_ticket *mdl_ticket;
+
bool tmp_table() { return options & HA_LEX_CREATE_TMP_TABLE; }
};