mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.h: Auto merged sql/item_sum.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sp_head.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged
This commit is contained in:
@@ -84,14 +84,14 @@ typedef struct st_copy_info {
|
||||
} COPY_INFO;
|
||||
|
||||
|
||||
class key_part_spec :public Sql_alloc {
|
||||
class Key_part_spec :public Sql_alloc {
|
||||
public:
|
||||
const char *field_name;
|
||||
uint length;
|
||||
key_part_spec(const char *name,uint len=0) :field_name(name), length(len) {}
|
||||
bool operator==(const key_part_spec& other) const;
|
||||
Key_part_spec(const char *name,uint len=0) :field_name(name), length(len) {}
|
||||
bool operator==(const Key_part_spec& other) const;
|
||||
/**
|
||||
Construct a copy of this key_part_spec. field_name is copied
|
||||
Construct a copy of this Key_part_spec. field_name is copied
|
||||
by-pointer as it is known to never change. At the same time
|
||||
'length' may be reset in mysql_prepare_create_table, and this
|
||||
is why we supply it with a copy.
|
||||
@@ -99,8 +99,8 @@ public:
|
||||
@return If out of memory, 0 is returned and an error is set in
|
||||
THD.
|
||||
*/
|
||||
key_part_spec *clone(MEM_ROOT *mem_root) const
|
||||
{ return new (mem_root) key_part_spec(*this); }
|
||||
Key_part_spec *clone(MEM_ROOT *mem_root) const
|
||||
{ return new (mem_root) Key_part_spec(*this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
:name(par_name), type(par_type) {}
|
||||
/**
|
||||
Used to make a clone of this object for ALTER/CREATE TABLE
|
||||
@sa comment for key_part_spec::clone
|
||||
@sa comment for Key_part_spec::clone
|
||||
*/
|
||||
Alter_drop *clone(MEM_ROOT *mem_root) const
|
||||
{ return new (mem_root) Alter_drop(*this); }
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
:name(par_name), def(literal) {}
|
||||
/**
|
||||
Used to make a clone of this object for ALTER/CREATE TABLE
|
||||
@sa comment for key_part_spec::clone
|
||||
@sa comment for Key_part_spec::clone
|
||||
*/
|
||||
Alter_column *clone(MEM_ROOT *mem_root) const
|
||||
{ return new (mem_root) Alter_column(*this); }
|
||||
@@ -140,13 +140,13 @@ public:
|
||||
enum Keytype { PRIMARY, UNIQUE, MULTIPLE, FULLTEXT, SPATIAL, FOREIGN_KEY};
|
||||
enum Keytype type;
|
||||
KEY_CREATE_INFO key_create_info;
|
||||
List<key_part_spec> columns;
|
||||
List<Key_part_spec> columns;
|
||||
const char *name;
|
||||
bool generated;
|
||||
|
||||
Key(enum Keytype type_par, const char *name_arg,
|
||||
KEY_CREATE_INFO *key_info_arg,
|
||||
bool generated_arg, List<key_part_spec> &cols)
|
||||
bool generated_arg, List<Key_part_spec> &cols)
|
||||
:type(type_par), key_create_info(*key_info_arg), columns(cols),
|
||||
name(name_arg), generated(generated_arg)
|
||||
{}
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
friend bool foreign_key_prefix(Key *a, Key *b);
|
||||
/**
|
||||
Used to make a clone of this object for ALTER/CREATE TABLE
|
||||
@sa comment for key_part_spec::clone
|
||||
@sa comment for Key_part_spec::clone
|
||||
*/
|
||||
virtual Key *clone(MEM_ROOT *mem_root) const
|
||||
{ return new (mem_root) Key(*this, mem_root); }
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
|
||||
class Table_ident;
|
||||
|
||||
class foreign_key: public Key {
|
||||
class Foreign_key: public Key {
|
||||
public:
|
||||
enum fk_match_opt { FK_MATCH_UNDEF, FK_MATCH_FULL,
|
||||
FK_MATCH_PARTIAL, FK_MATCH_SIMPLE};
|
||||
@@ -172,23 +172,23 @@ public:
|
||||
FK_OPTION_SET_NULL, FK_OPTION_NO_ACTION, FK_OPTION_DEFAULT};
|
||||
|
||||
Table_ident *ref_table;
|
||||
List<key_part_spec> ref_columns;
|
||||
List<Key_part_spec> ref_columns;
|
||||
uint delete_opt, update_opt, match_opt;
|
||||
foreign_key(const char *name_arg, List<key_part_spec> &cols,
|
||||
Table_ident *table, List<key_part_spec> &ref_cols,
|
||||
Foreign_key(const char *name_arg, List<Key_part_spec> &cols,
|
||||
Table_ident *table, List<Key_part_spec> &ref_cols,
|
||||
uint delete_opt_arg, uint update_opt_arg, uint match_opt_arg)
|
||||
:Key(FOREIGN_KEY, name_arg, &default_key_create_info, 0, cols),
|
||||
ref_table(table), ref_columns(cols),
|
||||
delete_opt(delete_opt_arg), update_opt(update_opt_arg),
|
||||
match_opt(match_opt_arg)
|
||||
{}
|
||||
foreign_key(const foreign_key &rhs, MEM_ROOT *mem_root);
|
||||
Foreign_key(const Foreign_key &rhs, MEM_ROOT *mem_root);
|
||||
/**
|
||||
Used to make a clone of this object for ALTER/CREATE TABLE
|
||||
@sa comment for key_part_spec::clone
|
||||
@sa comment for Key_part_spec::clone
|
||||
*/
|
||||
virtual Key *clone(MEM_ROOT *mem_root) const
|
||||
{ return new (mem_root) foreign_key(*this, mem_root); }
|
||||
{ return new (mem_root) Foreign_key(*this, mem_root); }
|
||||
};
|
||||
|
||||
typedef struct st_mysql_lock
|
||||
|
||||
Reference in New Issue
Block a user