Commit 6bc660b0 authored by unknown's avatar unknown

Resolved merge conflicts

parent e2fa3af9
...@@ -8264,7 +8264,7 @@ Field *Field_bit::new_key_field(MEM_ROOT *root, ...@@ -8264,7 +8264,7 @@ Field *Field_bit::new_key_field(MEM_ROOT *root,
} }
uint Field_bit::is_equal(create_field *new_field) uint Field_bit::is_equal(Create_field *new_field)
{ {
return (new_field->sql_type == real_type() && return (new_field->sql_type == real_type() &&
new_field->length == max_display_length()); new_field->length == max_display_length());
......
...@@ -1563,7 +1563,7 @@ class Field_bit :public Field { ...@@ -1563,7 +1563,7 @@ class Field_bit :public Field {
bit_ptr == ((Field_bit *)field)->bit_ptr && bit_ptr == ((Field_bit *)field)->bit_ptr &&
bit_ofs == ((Field_bit *)field)->bit_ofs); bit_ofs == ((Field_bit *)field)->bit_ofs);
} }
uint is_equal(create_field *new_field); uint is_equal(Create_field *new_field);
void move_field_offset(my_ptrdiff_t ptr_diff) void move_field_offset(my_ptrdiff_t ptr_diff)
{ {
Field::move_field_offset(ptr_diff); Field::move_field_offset(ptr_diff);
......
...@@ -830,6 +830,13 @@ inline bool st_select_lex_unit::is_union () ...@@ -830,6 +830,13 @@ inline bool st_select_lex_unit::is_union ()
#define ALTER_REMOVE_PARTITIONING (1L << 25) #define ALTER_REMOVE_PARTITIONING (1L << 25)
#define ALTER_FOREIGN_KEY (1L << 26) #define ALTER_FOREIGN_KEY (1L << 26)
enum enum_alter_table_change_level
{
ALTER_TABLE_METADATA_ONLY= 0,
ALTER_TABLE_DATA_CHANGED= 1,
ALTER_TABLE_INDEX_CHANGED= 2
};
/** /**
@brief Parsing data for CREATE or ALTER TABLE. @brief Parsing data for CREATE or ALTER TABLE.
...@@ -840,21 +847,28 @@ inline bool st_select_lex_unit::is_union () ...@@ -840,21 +847,28 @@ inline bool st_select_lex_unit::is_union ()
class Alter_info class Alter_info
{ {
public: public:
List<Alter_drop> drop_list; List<Alter_drop> drop_list;
List<Alter_column> alter_list; List<Alter_column> alter_list;
List<Key> key_list; List<Key> key_list;
List<Create_field> create_list; List<Create_field> create_list;
uint flags; uint flags;
enum enum_enable_or_disable keys_onoff; enum enum_enable_or_disable keys_onoff;
enum tablespace_op_type tablespace_op; enum tablespace_op_type tablespace_op;
List<char> partition_names; List<char> partition_names;
uint no_parts; uint no_parts;
enum_alter_table_change_level change_level;
Create_field *datetime_field;
bool error_if_not_empty;
Alter_info() : Alter_info() :
flags(0), flags(0),
keys_onoff(LEAVE_AS_IS), keys_onoff(LEAVE_AS_IS),
tablespace_op(NO_TABLESPACE_OP), tablespace_op(NO_TABLESPACE_OP),
no_parts(0) no_parts(0),
change_level(ALTER_TABLE_METADATA_ONLY),
datetime_field(NULL),
error_if_not_empty(FALSE)
{} {}
void reset() void reset()
...@@ -868,6 +882,9 @@ class Alter_info ...@@ -868,6 +882,9 @@ class Alter_info
tablespace_op= NO_TABLESPACE_OP; tablespace_op= NO_TABLESPACE_OP;
no_parts= 0; no_parts= 0;
partition_names.empty(); partition_names.empty();
change_level= ALTER_TABLE_METADATA_ONLY;
datetime_field= 0;
error_if_not_empty= FALSE;
} }
/** /**
Construct a copy of this object to be used for mysql_alter_table Construct a copy of this object to be used for mysql_alter_table
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment