summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-06-10 14:43:57 +0400
committerunknown <kostja@bodhi.(none)>2007-06-10 14:43:57 +0400
commit97cf2694a133eb9b3fc8e81eea66964b2446b864 (patch)
tree520f97e0d46607e96ab7dd8c8f40c33333322881 /sql
parent75abceb2fe40061e9a59744d255eee0f0e4f7182 (diff)
downloadmariadb-git-97cf2694a133eb9b3fc8e81eea66964b2446b864.tar.gz
Follow up after work on Bug 4968
Coding style: classes start with a capital letter. Rename some classes related to parsing: create_field -> Create_field foreign_key -> Foreign_key key_part_spec -> Key_part_spec sql/field.cc: create_field -> Create_field sql/field.h: create_field -> Create_field sql/item.h: create_field -> Create_field sql/item_sum.cc: create_field -> Create_field sql/mysql_priv.h: create_field -> Create_field sql/sp_head.cc: create_field -> Create_field sql/sp_head.h: create_field -> Create_field sql/sp_pcontext.cc: create_field -> Create_field sql/sp_pcontext.h: create_field -> Create_field sql/sp_rcontext.cc: create_field -> Create_field sql/sql_class.cc: create_field -> Create_field key_part_spec -> Key_part_spec foreign_key -> Foreign_key sql/sql_class.h: create_field -> Create_field key_part_spec -> Key_part_spec foreign_key -> Foreign_key sql/sql_insert.cc: create_field -> Create_field sql/sql_lex.cc: Coding style: classes start with a capital, create_field -> Create_field sql/sql_lex.h: create_field -> Create_field key_part_spec -> Key_part_spec sql/sql_parse.cc: create_field -> Create_field key_part_spec -> Key_part_spec sql/sql_select.cc: create_field -> Create_field sql/sql_table.cc: create_field -> Create_field sql/sql_yacc.yy: create_field -> Create_field key_part_spec -> Key_part_spec foreign_key -> Foreign_key sql/unireg.cc: create_field -> Create_field
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc36
-rw-r--r--sql/field.h30
-rw-r--r--sql/item.h2
-rw-r--r--sql/item_sum.cc4
-rw-r--r--sql/mysql_priv.h12
-rw-r--r--sql/sp_head.cc8
-rw-r--r--sql/sp_head.h4
-rw-r--r--sql/sp_pcontext.cc2
-rw-r--r--sql/sp_pcontext.h4
-rw-r--r--sql/sp_rcontext.cc2
-rw-r--r--sql/sql_class.cc14
-rw-r--r--sql/sql_class.h36
-rw-r--r--sql/sql_insert.cc6
-rw-r--r--sql/sql_lex.cc2
-rw-r--r--sql/sql_lex.h8
-rw-r--r--sql/sql_parse.cc8
-rw-r--r--sql/sql_select.cc6
-rw-r--r--sql/sql_table.cc60
-rw-r--r--sql/sql_yacc.yy28
-rw-r--r--sql/unireg.cc54
20 files changed, 163 insertions, 163 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 6fd88e4e1ac..20bc2e18cf0 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -38,8 +38,8 @@
*****************************************************************************/
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List<create_field>;
-template class List_iterator<create_field>;
+template class List<Create_field>;
+template class List_iterator<Create_field>;
#endif
uchar Field_null::null[1]={1};
@@ -2631,7 +2631,7 @@ void Field_new_decimal::sql_type(String &str) const
}
-uint Field_new_decimal::is_equal(create_field *new_field)
+uint Field_new_decimal::is_equal(Create_field *new_field)
{
return ((new_field->sql_type == real_type()) &&
((new_field->flags & UNSIGNED_FLAG) ==
@@ -6100,7 +6100,7 @@ int Field_str::store(double nr)
}
-uint Field::is_equal(create_field *new_field)
+uint Field::is_equal(Create_field *new_field)
{
return (new_field->sql_type == real_type());
}
@@ -6108,7 +6108,7 @@ uint Field::is_equal(create_field *new_field)
/* If one of the fields is binary and the other one isn't return 1 else 0 */
-bool Field_str::compare_str_field_flags(create_field *new_field, uint32 flags)
+bool Field_str::compare_str_field_flags(Create_field *new_field, uint32 flags)
{
return (((new_field->flags & (BINCMP_FLAG | BINARY_FLAG)) &&
!(flags & (BINCMP_FLAG | BINARY_FLAG))) ||
@@ -6117,7 +6117,7 @@ bool Field_str::compare_str_field_flags(create_field *new_field, uint32 flags)
}
-uint Field_str::is_equal(create_field *new_field)
+uint Field_str::is_equal(Create_field *new_field)
{
if (compare_str_field_flags(new_field, flags))
return 0;
@@ -6969,7 +6969,7 @@ Field *Field_varstring::new_key_field(MEM_ROOT *root,
}
-uint Field_varstring::is_equal(create_field *new_field)
+uint Field_varstring::is_equal(Create_field *new_field)
{
if (new_field->sql_type == real_type() &&
new_field->charset == field_charset)
@@ -7651,7 +7651,7 @@ uint Field_blob::max_packed_col_length(uint max_length)
}
-uint Field_blob::is_equal(create_field *new_field)
+uint Field_blob::is_equal(Create_field *new_field)
{
if (compare_str_field_flags(new_field, flags))
return 0;
@@ -8187,7 +8187,7 @@ bool Field_num::eq_def(Field *field)
}
-uint Field_num::is_equal(create_field *new_field)
+uint Field_num::is_equal(Create_field *new_field)
{
return ((new_field->sql_type == real_type()) &&
((new_field->flags & UNSIGNED_FLAG) == (uint) (flags &
@@ -8616,20 +8616,20 @@ void Field_bit_as_char::sql_type(String &res) const
/*****************************************************************************
- Handling of field and create_field
+ Handling of field and Create_field
*****************************************************************************/
/*
- Convert create_field::length from number of characters to number of bytes
+ Convert Create_field::length from number of characters to number of bytes
SYNOPSIS
- create_field::create_length_to_internal_length()
+ Create_field::create_length_to_internal_length()
DESCRIPTION
- Convert create_field::length from number of characters to number of bytes.
+ Convert Create_field::length from number of characters to number of bytes.
*/
-void create_field::create_length_to_internal_length(void)
+void Create_field::create_length_to_internal_length(void)
{
switch (sql_type) {
case MYSQL_TYPE_TINY_BLOB:
@@ -8676,7 +8676,7 @@ void create_field::create_length_to_internal_length(void)
}
-void create_field::init_for_tmp_table(enum_field_types sql_type_arg,
+void Create_field::init_for_tmp_table(enum_field_types sql_type_arg,
uint32 length_arg, uint32 decimals_arg,
bool maybe_null, bool is_unsigned)
{
@@ -8717,7 +8717,7 @@ void create_field::init_for_tmp_table(enum_field_types sql_type_arg,
TRUE on error
*/
-bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
+bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
char *fld_length, char *fld_decimals,
uint fld_type_modifier, Item *fld_default_value,
Item *fld_on_update_value, LEX_STRING *fld_comment,
@@ -8727,7 +8727,7 @@ bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
uint sign_len, allowed_type_modifier= 0;
ulong max_field_charlength= MAX_FIELD_CHARLENGTH;
- DBUG_ENTER("create_field::init()");
+ DBUG_ENTER("Create_field::init()");
field= 0;
field_name= fld_name;
@@ -9300,7 +9300,7 @@ Field *make_field(TABLE_SHARE *share, uchar *ptr, uint32 field_length,
/* Create a field suitable for create of table */
-create_field::create_field(Field *old_field,Field *orig_field)
+Create_field::Create_field(Field *old_field,Field *orig_field)
{
field= old_field;
field_name=change=old_field->field_name;
diff --git a/sql/field.h b/sql/field.h
index 54a061276b6..92f6612f9b3 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -28,7 +28,7 @@
class Send_field;
class Protocol;
-class create_field;
+class Create_field;
struct st_cache_field;
int field_conv(Field *to,Field *from);
@@ -413,7 +413,7 @@ public:
/* maximum possible display length */
virtual uint32 max_display_length()= 0;
- virtual uint is_equal(create_field *new_field);
+ virtual uint is_equal(Create_field *new_field);
/* convert decimal to longlong with overflow check */
longlong convert_decimal2longlong(const my_decimal *val, bool unsigned_flag,
int *err);
@@ -468,14 +468,14 @@ public:
Item_result result_type () const { return REAL_RESULT; }
void prepend_zeros(String *value);
void add_zerofill_and_unsigned(String &res) const;
- friend class create_field;
+ friend class Create_field;
void make_field(Send_field *);
uint decimals() const { return (uint) dec; }
uint size_of() const { return sizeof(*this); }
bool eq_def(Field *field);
int store_decimal(const my_decimal *);
my_decimal *val_decimal(my_decimal *);
- uint is_equal(create_field *new_field);
+ uint is_equal(Create_field *new_field);
int check_int(CHARSET_INFO *cs, const char *str, int length,
const char *int_end, int error);
bool get_int(CHARSET_INFO *cs, const char *from, uint len,
@@ -506,11 +506,11 @@ public:
{ field_derivation= derivation_arg; }
bool binary() const { return field_charset == &my_charset_bin; }
uint32 max_display_length() { return field_length; }
- friend class create_field;
+ friend class Create_field;
my_decimal *val_decimal(my_decimal *);
virtual bool str_needs_quotes() { return TRUE; }
- bool compare_str_field_flags(create_field *new_field, uint32 flags);
- uint is_equal(create_field *new_field);
+ bool compare_str_field_flags(Create_field *new_field, uint32 flags);
+ uint is_equal(Create_field *new_field);
};
@@ -614,7 +614,7 @@ public:
uint32 max_display_length() { return field_length; }
uint size_of() const { return sizeof(*this); }
uint32 pack_length() const { return (uint32) bin_size; }
- uint is_equal(create_field *new_field);
+ uint is_equal(Create_field *new_field);
};
@@ -1246,7 +1246,7 @@ public:
Field *new_key_field(MEM_ROOT *root, struct st_table *new_table,
uchar *new_ptr, uchar *new_null_ptr,
uint new_null_bit);
- uint is_equal(create_field *new_field);
+ uint is_equal(Create_field *new_field);
void hash(ulong *nr, ulong *nr2);
};
@@ -1380,7 +1380,7 @@ public:
bool has_charset(void) const
{ return charset() == &my_charset_bin ? FALSE : TRUE; }
uint32 max_display_length();
- uint is_equal(create_field *new_field);
+ uint is_equal(Create_field *new_field);
};
@@ -1595,7 +1595,7 @@ public:
Create field class for CREATE TABLE
*/
-class create_field :public Sql_alloc
+class Create_field :public Sql_alloc
{
public:
const char *field_name;
@@ -1626,11 +1626,11 @@ public:
uint8 row,col,sc_length,interval_id; // For rea_create_table
uint offset,pack_flag;
- create_field() :after(0) {}
- create_field(Field *field, Field *orig_field);
+ Create_field() :after(0) {}
+ Create_field(Field *field, Field *orig_field);
/* Used to make a clone of this object for ALTER/CREATE TABLE */
- create_field *clone(MEM_ROOT *mem_root) const
- { return new (mem_root) create_field(*this); }
+ Create_field *clone(MEM_ROOT *mem_root) const
+ { return new (mem_root) Create_field(*this); }
void create_length_to_internal_length(void);
/* Init for a tmp table field. To be extended if need be. */
diff --git a/sql/item.h b/sql/item.h
index 1c8b46fe0c7..f42977e4e59 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1756,7 +1756,7 @@ public:
We have to have a different max_length than 'length' here to
ensure that we get the right length if we do use the item
to create a new table. In this case max_length must be the maximum
- number of chars for a string of this type because we in create_field::
+ number of chars for a string of this type because we in Create_field::
divide the max_length with mbmaxlen).
*/
max_length= str_value.numchars()*cs->mbmaxlen;
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 69148d81b9a..1210d00f210 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -912,8 +912,8 @@ void Item_sum_distinct::fix_length_and_dec()
bool Item_sum_distinct::setup(THD *thd)
{
- List<create_field> field_list;
- create_field field_def; /* field definition */
+ List<Create_field> field_list;
+ Create_field field_def; /* field definition */
DBUG_ENTER("Item_sum_distinct::setup");
DBUG_ASSERT(tree == 0);
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index f5d66696cab..6d14325c7d9 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -911,7 +911,7 @@ bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* table_list,
bool mysql_preload_keys(THD* thd, TABLE_LIST* table_list);
int reassign_keycache_tables(THD* thd, KEY_CACHE *src_cache,
KEY_CACHE *dst_cache);
-TABLE *create_virtual_tmp_table(THD *thd, List<create_field> &field_list);
+TABLE *create_virtual_tmp_table(THD *thd, List<Create_field> &field_list);
bool mysql_xa_recover(THD *thd);
@@ -955,8 +955,8 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
bool table_cant_handle_bit_fields,
bool make_copy_field,
uint convert_blob_length);
-void sp_prepare_create_field(THD *thd, create_field *sql_field);
-int prepare_create_field(create_field *sql_field,
+void sp_prepare_create_field(THD *thd, Create_field *sql_field);
+int prepare_create_field(Create_field *sql_field,
uint *blob_columns,
int *timestamps, int *timestamps_with_niladic,
longlong table_flags);
@@ -1181,7 +1181,7 @@ bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum enum_field_types t
char *change, List<String> *interval_list,
CHARSET_INFO *cs,
uint uint_geom_type);
-create_field * new_create_field(THD *thd, char *field_name, enum_field_types type,
+Create_field * new_create_field(THD *thd, char *field_name, enum_field_types type,
char *length, char *decimals,
uint type_modifier,
Item *default_value, Item *on_update_value,
@@ -1808,12 +1808,12 @@ void unireg_end(void) __attribute__((noreturn));
bool mysql_create_frm(THD *thd, const char *file_name,
const char *db, const char *table,
HA_CREATE_INFO *create_info,
- List<create_field> &create_field,
+ List<Create_field> &create_field,
uint key_count,KEY *key_info,handler *db_type);
int rea_create_table(THD *thd, const char *path,
const char *db, const char *table_name,
HA_CREATE_INFO *create_info,
- List<create_field> &create_field,
+ List<Create_field> &create_field,
uint key_count,KEY *key_info,
handler *file);
int format_number(uint inputflag,uint max_length,char * pos,uint length,
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 3d5f2f0f50d..1bbf2732081 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -581,7 +581,7 @@ sp_head::init_strings(THD *thd, LEX *lex)
static TYPELIB *
-create_typelib(MEM_ROOT *mem_root, create_field *field_def, List<String> *src)
+create_typelib(MEM_ROOT *mem_root, Create_field *field_def, List<String> *src)
{
TYPELIB *result= NULL;
CHARSET_INFO *cs= field_def->charset;
@@ -1905,7 +1905,7 @@ sp_head::backpatch(sp_label_t *lab)
}
/*
- Prepare an instance of create_field for field creation (fill all necessary
+ Prepare an instance of Create_field for field creation (fill all necessary
attributes).
SYNOPSIS
@@ -1913,7 +1913,7 @@ sp_head::backpatch(sp_label_t *lab)
thd [IN] Thread handle
lex [IN] Yacc parsing context
field_type [IN] Field type
- field_def [OUT] An instance of create_field to be filled
+ field_def [OUT] An instance of Create_field to be filled
RETURN
FALSE on success
@@ -1923,7 +1923,7 @@ sp_head::backpatch(sp_label_t *lab)
bool
sp_head::fill_field_definition(THD *thd, LEX *lex,
enum enum_field_types field_type,
- create_field *field_def)
+ Create_field *field_def)
{
HA_CREATE_INFO sp_db_info;
LEX_STRING cmt = { 0, 0 };
diff --git a/sql/sp_head.h b/sql/sp_head.h
index eacc2ccdcf6..89af0259706 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -126,7 +126,7 @@ public:
int m_type;
uint m_flags; // Boolean attributes of a stored routine
- create_field m_return_field_def; /* This is used for FUNCTIONs only. */
+ Create_field m_return_field_def; /* This is used for FUNCTIONs only. */
const char *m_tmp_query; // Temporary pointer to sub query string
st_sp_chistics *m_chistics;
@@ -290,7 +290,7 @@ public:
bool fill_field_definition(THD *thd, LEX *lex,
enum enum_field_types field_type,
- create_field *field_def);
+ Create_field *field_def);
void set_info(longlong created, longlong modified,
st_sp_chistics *chistics, ulong sql_mode);
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
index 9c96485b8ec..8babbd52ff6 100644
--- a/sql/sp_pcontext.cc
+++ b/sql/sp_pcontext.cc
@@ -422,7 +422,7 @@ sp_pcontext::find_cursor(LEX_STRING *name, uint *poff, my_bool scoped)
void
-sp_pcontext::retrieve_field_definitions(List<create_field> *field_def_lst)
+sp_pcontext::retrieve_field_definitions(List<Create_field> *field_def_lst)
{
/* Put local/context fields in the result list. */
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h
index 3b8b165a6e0..aefc501b3b0 100644
--- a/sql/sp_pcontext.h
+++ b/sql/sp_pcontext.h
@@ -43,7 +43,7 @@ typedef struct sp_variable
uint offset;
Item *dflt;
- create_field field_def;
+ Create_field field_def;
} sp_variable_t;
@@ -234,7 +234,7 @@ public:
children.
*/
void
- retrieve_field_definitions(List<create_field> *field_def_lst);
+ retrieve_field_definitions(List<Create_field> *field_def_lst);
// Find by name
sp_variable_t *
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index e49c4eb1240..b94c733cb0a 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -102,7 +102,7 @@ bool sp_rcontext::init(THD *thd)
bool
sp_rcontext::init_var_table(THD *thd)
{
- List<create_field> field_def_lst;
+ List<Create_field> field_def_lst;
if (!m_root_parsing_ctx->max_var_index())
return FALSE;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 9dbc79344a9..66959940d90 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -59,8 +59,8 @@ const char * const THD::DEFAULT_WHERE= "field list";
/* Used templates */
template class List<Key>;
template class List_iterator<Key>;
-template class List<key_part_spec>;
-template class List_iterator<key_part_spec>;
+template class List<Key_part_spec>;
+template class List_iterator<Key_part_spec>;
template class List<Alter_drop>;
template class List_iterator<Alter_drop>;
template class List<Alter_column>;
@@ -86,7 +86,7 @@ extern "C" void free_user_var(user_var_entry *entry)
my_free((char*) entry,MYF(0));
}
-bool key_part_spec::operator==(const key_part_spec& other) const
+bool Key_part_spec::operator==(const Key_part_spec& other) const
{
return length == other.length && !strcmp(field_name, other.field_name);
}
@@ -115,7 +115,7 @@ Key::Key(const Key &rhs, MEM_ROOT *mem_root)
in THD.
*/
-foreign_key::foreign_key(const foreign_key &rhs, MEM_ROOT *mem_root)
+Foreign_key::Foreign_key(const Foreign_key &rhs, MEM_ROOT *mem_root)
:Key(rhs),
ref_table(rhs.ref_table),
ref_columns(rhs.ref_columns),
@@ -160,9 +160,9 @@ bool foreign_key_prefix(Key *a, Key *b)
if (a->columns.elements > b->columns.elements)
return TRUE; // Can't be prefix
- List_iterator<key_part_spec> col_it1(a->columns);
- List_iterator<key_part_spec> col_it2(b->columns);
- const key_part_spec *col1, *col2;
+ List_iterator<Key_part_spec> col_it1(a->columns);
+ List_iterator<Key_part_spec> col_it2(b->columns);
+ const Key_part_spec *col1, *col2;
#ifdef ENABLE_WHEN_INNODB_CAN_HANDLE_SWAPED_FOREIGN_KEY_COLUMNS
while ((col1= col_it1++))
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 7729b597098..38408fb8a0c 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -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
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 9067df2f014..8fa444bfd59 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3201,7 +3201,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
MYSQL_LOCK **lock,
TABLEOP_HOOKS *hooks)
{
- TABLE tmp_table; // Used during 'create_field()'
+ TABLE tmp_table; // Used during 'Create_field()'
TABLE_SHARE share;
TABLE *table= 0;
uint select_field_count= items->elements;
@@ -3245,7 +3245,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
while ((item=it++))
{
- create_field *cr_field;
+ Create_field *cr_field;
Field *field, *def_field;
if (item->type() == Item::FUNC_ITEM)
field= item->tmp_table_field(&tmp_table);
@@ -3254,7 +3254,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
(Item ***) 0, &tmp_field, &def_field, 0, 0, 0, 0,
0);
if (!field ||
- !(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ?
+ !(cr_field=new Create_field(field,(item->type() == Item::FIELD_ITEM ?
((Item_field *)item)->field :
(Field*) 0))))
DBUG_RETURN(0);
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index d8846d3fc9d..ab0dad07900 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1132,7 +1132,7 @@ Alter_info::Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root)
/*
Make deep copies of used objects.
This is not a fully deep copy - clone() implementations
- of Alter_drop, Alter_column, Key, foreign_key, key_part_spec
+ of Alter_drop, Alter_column, Key, foreign_key, Key_part_spec
do not copy string constants. At the same length the only
reason we make a copy currently is that ALTER/CREATE TABLE
code changes input Alter_info definitions, but string
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 6d96dded088..4d056643e51 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -843,7 +843,7 @@ public:
List<Alter_drop> drop_list;
List<Alter_column> alter_list;
List<Key> key_list;
- List<create_field> create_list;
+ List<Create_field> create_list;
uint flags;
enum enum_enable_or_disable keys_onoff;
enum tablespace_op_type tablespace_op;
@@ -1132,8 +1132,8 @@ typedef struct st_lex : public Query_tables_list
*/
LEX_USER *definer;
- List<key_part_spec> col_list;
- List<key_part_spec> ref_list;
+ List<Key_part_spec> col_list;
+ List<Key_part_spec> ref_list;
List<String> interval_list;
List<LEX_USER> users_list;
List<LEX_COLUMN> columns;
@@ -1159,7 +1159,7 @@ typedef struct st_lex : public Query_tables_list
List<LEX_STRING> db_list;
SQL_LIST proc_list, auxiliary_table_list, save_list;
- create_field *last_field;
+ Create_field *last_field;
Item_sum *in_sum_func;
udf_func udf;
HA_CHECK_OPT check_opt; // check/repair options
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 8e55610df36..9cc1f6a3919 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -5459,7 +5459,7 @@ bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type,
List<String> *interval_list, CHARSET_INFO *cs,
uint uint_geom_type)
{
- register create_field *new_field;
+ register Create_field *new_field;
LEX *lex= thd->lex;
DBUG_ENTER("add_field_to_list");
@@ -5472,7 +5472,7 @@ bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type,
if (type_modifier & PRI_KEY_FLAG)
{
Key *key;
- lex->col_list.push_back(new key_part_spec(field_name->str, 0));
+ lex->col_list.push_back(new Key_part_spec(field_name->str, 0));
key= new Key(Key::PRIMARY, NullS,
&default_key_create_info,
0, lex->col_list);
@@ -5482,7 +5482,7 @@ bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type,
if (type_modifier & (UNIQUE_FLAG | UNIQUE_KEY_FLAG))
{
Key *key;
- lex->col_list.push_back(new key_part_spec(field_name->str, 0));
+ lex->col_list.push_back(new Key_part_spec(field_name->str, 0));
key= new Key(Key::UNIQUE, NullS,
&default_key_create_info, 0,
lex->col_list);
@@ -5540,7 +5540,7 @@ bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type,
WARN_DEPRECATED(thd, "5.2", buf, "'TIMESTAMP'");
}
- if (!(new_field= new create_field()) ||
+ if (!(new_field= new Create_field()) ||
new_field->init(thd, field_name->str, type, length, decimals, type_modifier,
default_value, on_update_value, comment, change,
interval_list, cs, uint_geom_type))
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index c6ef16d46a3..77bf168f400 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -10024,12 +10024,12 @@ err:
0 if out of memory, TABLE object in case of success
*/
-TABLE *create_virtual_tmp_table(THD *thd, List<create_field> &field_list)
+TABLE *create_virtual_tmp_table(THD *thd, List<Create_field> &field_list)
{
uint field_count= field_list.elements;
uint blob_count= 0;
Field **field;
- create_field *cdef; /* column definition */
+ Create_field *cdef; /* column definition */
uint record_length= 0;
uint null_count= 0; /* number of columns which may be null */
uint null_pack_length; /* NULL representation array length */
@@ -10057,7 +10057,7 @@ TABLE *create_virtual_tmp_table(THD *thd, List<create_field> &field_list)
setup_tmp_table_column_bitmaps(table, bitmaps);
/* Create all fields and calculate the total length of record */
- List_iterator_fast<create_field> it(field_list);
+ List_iterator_fast<Create_field> it(field_list);
while ((cdef= it++))
{
*field= make_field(share, 0, cdef->length,
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index bb0f7649272..503c2cc50a6 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -34,12 +34,12 @@ const char *primary_key_name="PRIMARY";
static bool check_if_keyname_exists(const char *name,KEY *start, KEY *end);
static char *make_unique_key_name(const char *field_name,KEY *start,KEY *end);
static int copy_data_between_tables(TABLE *from,TABLE *to,
- List<create_field> &create, bool ignore,
+ List<Create_field> &create, bool ignore,
uint order_num, ORDER *order,
ha_rows *copied,ha_rows *deleted,
enum enum_enable_or_disable keys_onoff);
-static bool prepare_blob_field(THD *thd, create_field *sql_field);
+static bool prepare_blob_field(THD *thd, Create_field *sql_field);
static bool check_engine(THD *, const char *, HA_CREATE_INFO *);
static bool
mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
@@ -1920,7 +1920,7 @@ void calculate_interval_lengths(CHARSET_INFO *cs, TYPELIB *interval,
table_flags table flags
DESCRIPTION
- This function prepares a create_field instance.
+ This function prepares a Create_field instance.
Fields such as pack_flag are valid after this call.
RETURN VALUES
@@ -1928,7 +1928,7 @@ void calculate_interval_lengths(CHARSET_INFO *cs, TYPELIB *interval,
1 Error
*/
-int prepare_create_field(create_field *sql_field,
+int prepare_create_field(Create_field *sql_field,
uint *blob_columns,
int *timestamps, int *timestamps_with_niladic,
longlong table_flags)
@@ -2119,7 +2119,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
uint *key_count, int select_field_count)
{
const char *key_name;
- create_field *sql_field,*dup_field;
+ Create_field *sql_field,*dup_field;
uint field,null_fields,blob_columns,max_key_length;
ulong record_offset= 0;
KEY *key_info;
@@ -2127,8 +2127,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
int timestamps= 0, timestamps_with_niladic= 0;
int field_no,dup_no;
int select_field_pos,auto_increment=0;
- List_iterator<create_field> it(alter_info->create_list);
- List_iterator<create_field> it2(alter_info->create_list);
+ List_iterator<Create_field> it(alter_info->create_list);
+ List_iterator<Create_field> it2(alter_info->create_list);
uint total_uneven_bit_length= 0;
DBUG_ENTER("mysql_prepare_create_table");
@@ -2182,7 +2182,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
sql_field->sql_type == MYSQL_TYPE_ENUM))
{
/*
- Starting from 5.1 we work here with a copy of create_field
+ Starting from 5.1 we work here with a copy of Create_field
created by the caller, not with the instance that was
originally created during parsing. It's OK to create
a temporary item and initialize with it a member of the
@@ -2473,7 +2473,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (key->type == Key::FOREIGN_KEY)
{
fk_key_count++;
- foreign_key *fk_key= (foreign_key*) key;
+ Foreign_key *fk_key= (Foreign_key*) key;
if (fk_key->ref_columns.elements &&
fk_key->ref_columns.elements != fk_key->columns.elements)
{
@@ -2557,7 +2557,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
for (; (key=key_iterator++) ; key_number++)
{
uint key_length=0;
- key_part_spec *column;
+ Key_part_spec *column;
if (key->name == ignore_key)
{
@@ -2666,12 +2666,12 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (key_info->block_size)
key_info->flags|= HA_USES_BLOCK_SIZE;
- List_iterator<key_part_spec> cols(key->columns), cols2(key->columns);
+ List_iterator<Key_part_spec> cols(key->columns), cols2(key->columns);
CHARSET_INFO *ft_key_charset=0; // for FULLTEXT
for (uint column_nr=0 ; (column=cols++) ; column_nr++)
{
uint length;
- key_part_spec *dup_column;
+ Key_part_spec *dup_column;
it.rewind();
field=0;
@@ -2981,7 +2981,7 @@ static void set_table_default_charset(THD *thd,
In this case the error is given
*/
-static bool prepare_blob_field(THD *thd, create_field *sql_field)
+static bool prepare_blob_field(THD *thd, Create_field *sql_field)
{
DBUG_ENTER("prepare_blob_field");
@@ -3022,7 +3022,7 @@ static bool prepare_blob_field(THD *thd, create_field *sql_field)
/*
- Preparation of create_field for SP function return values.
+ Preparation of Create_field for SP function return values.
Based on code used in the inner loop of mysql_prepare_create_table()
above.
@@ -3036,7 +3036,7 @@ static bool prepare_blob_field(THD *thd, create_field *sql_field)
*/
-void sp_prepare_create_field(THD *thd, create_field *sql_field)
+void sp_prepare_create_field(THD *thd, Create_field *sql_field)
{
if (sql_field->sql_type == MYSQL_TYPE_SET ||
sql_field->sql_type == MYSQL_TYPE_ENUM)
@@ -4928,8 +4928,8 @@ compare_tables(TABLE *table,
Field **f_ptr, *field;
uint changes= 0, tmp;
uint key_count;
- List_iterator_fast<create_field> new_field_it(alter_info->create_list);
- create_field *new_field;
+ List_iterator_fast<Create_field> new_field_it(alter_info->create_list);
+ Create_field *new_field;
KEY_PART_INFO *key_part;
KEY_PART_INFO *end;
/*
@@ -5276,16 +5276,16 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
Alter_info *alter_info)
{
/* New column definitions are added here */
- List<create_field> new_create_list;
+ List<Create_field> new_create_list;
/* New key definitions are added here */
List<Key> new_key_list;
List_iterator<Alter_drop> drop_it(alter_info->drop_list);
- List_iterator<create_field> def_it(alter_info->create_list);
+ List_iterator<Create_field> def_it(alter_info->create_list);
List_iterator<Alter_column> alter_it(alter_info->alter_list);
List_iterator<Key> key_it(alter_info->key_list);
- List_iterator<create_field> find_it(new_create_list);
- List_iterator<create_field> field_it(new_create_list);
- List<key_part_spec> key_parts;
+ List_iterator<Create_field> find_it(new_create_list);
+ List_iterator<Create_field> field_it(new_create_list);
+ List<Key_part_spec> key_parts;
uint db_create_options= (table->s->db_create_options
& ~(HA_OPTION_PACK_RECORD));
uint used_fields= create_info->used_fields;
@@ -5325,7 +5325,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
create_info->tablespace= tablespace;
}
restore_record(table, s->default_values); // Empty record for DEFAULT
- create_field *def;
+ Create_field *def;
/*
First collect all fields from table which isn't in drop_list
@@ -5381,7 +5381,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
This field was not dropped and not changed, add it to the list
for the new table.
*/
- def= new create_field(field, field);
+ def= new Create_field(field, field);
new_create_list.push_back(def);
alter_it.rewind(); // Change default if ALTER
Alter_column *alter;
@@ -5419,7 +5419,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
new_create_list.push_front(def);
else
{
- create_field *find;
+ Create_field *find;
find_it.rewind();
while ((find=find_it++)) // Add new columns
{
@@ -5476,7 +5476,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
if (!key_part->field)
continue; // Wrong field (from UNIREG)
const char *key_part_name=key_part->field->field_name;
- create_field *cfield;
+ Create_field *cfield;
field_it.rewind();
while ((cfield=field_it++))
{
@@ -5518,7 +5518,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
key_part_length= 0; // Use whole field
}
key_part_length /= key_part->field->charset()->mbmaxlen;
- key_parts.push_back(new key_part_spec(cfield->field_name,
+ key_parts.push_back(new Key_part_spec(cfield->field_name,
key_part_length));
}
if (key_parts.elements)
@@ -6687,7 +6687,7 @@ err_with_placeholders:
static int
copy_data_between_tables(TABLE *from,TABLE *to,
- List<create_field> &create,
+ List<Create_field> &create,
bool ignore,
uint order_num, ORDER *order,
ha_rows *copied,
@@ -6740,8 +6740,8 @@ copy_data_between_tables(TABLE *from,TABLE *to,
save_sql_mode= thd->variables.sql_mode;
- List_iterator<create_field> it(create);
- create_field *def;
+ List_iterator<Create_field> it(create);
+ Create_field *def;
copy_end=copy;
for (Field **ptr=to->field ; *ptr ; ptr++)
{
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 7875b4244a8..c9297e37802 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -456,7 +456,7 @@ Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal,
List<Item> *item_list;
List<String> *string_list;
String *string;
- key_part_spec *key_part;
+ Key_part_spec *key_part;
TABLE_LIST *table_list;
udf_func *udf;
LEX_USER *lex_user;
@@ -4498,7 +4498,7 @@ key_def:
{
LEX *lex=Lex;
const char *key_name= $4 ? $4 : $1;
- Key *key= new foreign_key(key_name, lex->col_list,
+ Key *key= new Foreign_key(key_name, lex->col_list,
$8,
lex->ref_list,
lex->fk_delete_opt,
@@ -4925,8 +4925,8 @@ opt_ref_list:
| '(' ref_list ')' opt_on_delete {};
ref_list:
- ref_list ',' ident { Lex->ref_list.push_back(new key_part_spec($3.str)); }
- | ident { Lex->ref_list.push_back(new key_part_spec($1.str)); };
+ ref_list ',' ident { Lex->ref_list.push_back(new Key_part_spec($3.str)); }
+ | ident { Lex->ref_list.push_back(new Key_part_spec($1.str)); };
opt_on_delete:
@@ -4940,16 +4940,16 @@ opt_on_delete_list:
opt_on_delete_item:
ON DELETE_SYM delete_option { Lex->fk_delete_opt= $3; }
| ON UPDATE_SYM delete_option { Lex->fk_update_opt= $3; }
- | MATCH FULL { Lex->fk_match_option= foreign_key::FK_MATCH_FULL; }
- | MATCH PARTIAL { Lex->fk_match_option= foreign_key::FK_MATCH_PARTIAL; }
- | MATCH SIMPLE_SYM { Lex->fk_match_option= foreign_key::FK_MATCH_SIMPLE; };
+ | MATCH FULL { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
+ | MATCH PARTIAL { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
+ | MATCH SIMPLE_SYM { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; };
delete_option:
- RESTRICT { $$= (int) foreign_key::FK_OPTION_RESTRICT; }
- | CASCADE { $$= (int) foreign_key::FK_OPTION_CASCADE; }
- | SET NULL_SYM { $$= (int) foreign_key::FK_OPTION_SET_NULL; }
- | NO_SYM ACTION { $$= (int) foreign_key::FK_OPTION_NO_ACTION; }
- | SET DEFAULT { $$= (int) foreign_key::FK_OPTION_DEFAULT; };
+ RESTRICT { $$= (int) Foreign_key::FK_OPTION_RESTRICT; }
+ | CASCADE { $$= (int) Foreign_key::FK_OPTION_CASCADE; }
+ | SET NULL_SYM { $$= (int) Foreign_key::FK_OPTION_SET_NULL; }
+ | NO_SYM ACTION { $$= (int) Foreign_key::FK_OPTION_NO_ACTION; }
+ | SET DEFAULT { $$= (int) Foreign_key::FK_OPTION_DEFAULT; };
key_type:
key_or_index { $$= Key::MULTIPLE; }
@@ -5061,7 +5061,7 @@ key_list:
| key_part order_dir { Lex->col_list.push_back($1); };
key_part:
- ident { $$=new key_part_spec($1.str); }
+ ident { $$=new Key_part_spec($1.str); }
| ident '(' NUM ')'
{
int key_part_len= atoi($3.str);
@@ -5069,7 +5069,7 @@ key_part:
{
my_error(ER_KEY_PART_0, MYF(0), $1.str);
}
- $$=new key_part_spec($1.str,(uint) key_part_len);
+ $$=new Key_part_spec($1.str,(uint) key_part_len);
};
opt_ident:
diff --git a/sql/unireg.cc b/sql/unireg.cc
index a02d24d8ae5..57847bc70c6 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -29,21 +29,21 @@
#define FCOMP 17 /* Bytes for a packed field */
-static uchar * pack_screens(List<create_field> &create_fields,
+static uchar * pack_screens(List<Create_field> &create_fields,
uint *info_length, uint *screens, bool small_file);
static uint pack_keys(uchar *keybuff,uint key_count, KEY *key_info,
ulong data_offset);
static bool pack_header(uchar *forminfo,enum legacy_db_type table_type,
- List<create_field> &create_fields,
+ List<Create_field> &create_fields,
uint info_length, uint screens, uint table_options,
ulong data_offset, handler *file);
-static uint get_interval_id(uint *int_count,List<create_field> &create_fields,
- create_field *last_field);
-static bool pack_fields(File file, List<create_field> &create_fields,
+static uint get_interval_id(uint *int_count,List<Create_field> &create_fields,
+ Create_field *last_field);
+static bool pack_fields(File file, List<Create_field> &create_fields,
ulong data_offset);
static bool make_empty_rec(THD *thd, int file, enum legacy_db_type table_type,
uint table_options,
- List<create_field> &create_fields,
+ List<Create_field> &create_fields,
uint reclength, ulong data_offset,
handler *handler);
@@ -70,7 +70,7 @@ static bool make_empty_rec(THD *thd, int file, enum legacy_db_type table_type,
bool mysql_create_frm(THD *thd, const char *file_name,
const char *db, const char *table,
HA_CREATE_INFO *create_info,
- List<create_field> &create_fields,
+ List<Create_field> &create_fields,
uint keys, KEY *key_info,
handler *db_file)
{
@@ -294,8 +294,8 @@ bool mysql_create_frm(THD *thd, const char *file_name,
Restore all UCS2 intervals.
HEX representation of them is not needed anymore.
*/
- List_iterator<create_field> it(create_fields);
- create_field *field;
+ List_iterator<Create_field> it(create_fields);
+ Create_field *field;
while ((field=it++))
{
if (field->save_interval)
@@ -341,7 +341,7 @@ err3:
int rea_create_table(THD *thd, const char *path,
const char *db, const char *table_name,
HA_CREATE_INFO *create_info,
- List<create_field> &create_fields,
+ List<Create_field> &create_fields,
uint keys, KEY *key_info, handler *file)
{
DBUG_ENTER("rea_create_table");
@@ -371,7 +371,7 @@ err_handler:
/* Pack screens to a screen for save in a form-file */
-static uchar *pack_screens(List<create_field> &create_fields,
+static uchar *pack_screens(List<Create_field> &create_fields,
uint *info_length, uint *screens,
bool small_file)
{
@@ -380,7 +380,7 @@ static uchar *pack_screens(List<create_field> &create_fields,
uint length,cols;
uchar *info,*pos,*start_screen;
uint fields=create_fields.elements;
- List_iterator<create_field> it(create_fields);
+ List_iterator<Create_field> it(create_fields);
DBUG_ENTER("pack_screens");
start_row=4; end_row=22; cols=80; fields_on_screen=end_row+1-start_row;
@@ -388,7 +388,7 @@ static uchar *pack_screens(List<create_field> &create_fields,
*screens=(fields-1)/fields_on_screen+1;
length= (*screens) * (SC_INFO_LENGTH+ (cols>> 1)+4);
- create_field *field;
+ Create_field *field;
while ((field=it++))
length+=(uint) strlen(field->field_name)+1+TE_INFO_LENGTH+cols/2;
@@ -401,7 +401,7 @@ static uchar *pack_screens(List<create_field> &create_fields,
it.rewind();
for (i=0 ; i < fields ; i++)
{
- create_field *cfield=it++;
+ Create_field *cfield=it++;
if (row++ == end_row)
{
if (i)
@@ -521,7 +521,7 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
/* Make formheader */
static bool pack_header(uchar *forminfo, enum legacy_db_type table_type,
- List<create_field> &create_fields,
+ List<Create_field> &create_fields,
uint info_length, uint screens, uint table_options,
ulong data_offset, handler *file)
{
@@ -544,8 +544,8 @@ static bool pack_header(uchar *forminfo, enum legacy_db_type table_type,
/* Check fields */
- List_iterator<create_field> it(create_fields);
- create_field *field;
+ List_iterator<Create_field> it(create_fields);
+ Create_field *field;
while ((field=it++))
{
uint tmp_len= system_charset_info->cset->charpos(system_charset_info,
@@ -687,11 +687,11 @@ static bool pack_header(uchar *forminfo, enum legacy_db_type table_type,
/* get each unique interval each own id */
-static uint get_interval_id(uint *int_count,List<create_field> &create_fields,
- create_field *last_field)
+static uint get_interval_id(uint *int_count,List<Create_field> &create_fields,
+ Create_field *last_field)
{
- List_iterator<create_field> it(create_fields);
- create_field *field;
+ List_iterator<Create_field> it(create_fields);
+ Create_field *field;
TYPELIB *interval=last_field->interval;
while ((field=it++) != last_field)
@@ -715,18 +715,18 @@ static uint get_interval_id(uint *int_count,List<create_field> &create_fields,
/* Save fields, fieldnames and intervals */
-static bool pack_fields(File file, List<create_field> &create_fields,
+static bool pack_fields(File file, List<Create_field> &create_fields,
ulong data_offset)
{
reg2 uint i;
uint int_count, comment_length=0;
uchar buff[MAX_FIELD_WIDTH];
- create_field *field;
+ Create_field *field;
DBUG_ENTER("pack_fields");
/* Write field info */
- List_iterator<create_field> it(create_fields);
+ List_iterator<Create_field> it(create_fields);
int_count=0;
while ((field=it++))
@@ -856,7 +856,7 @@ static bool pack_fields(File file, List<create_field> &create_fields,
static bool make_empty_rec(THD *thd, File file,enum legacy_db_type table_type,
uint table_options,
- List<create_field> &create_fields,
+ List<Create_field> &create_fields,
uint reclength,
ulong data_offset,
handler *handler)
@@ -867,7 +867,7 @@ static bool make_empty_rec(THD *thd, File file,enum legacy_db_type table_type,
uchar *buff,*null_pos;
TABLE table;
TABLE_SHARE share;
- create_field *field;
+ Create_field *field;
enum_check_fields old_count_cuted_fields= thd->count_cuted_fields;
DBUG_ENTER("make_empty_rec");
@@ -893,7 +893,7 @@ static bool make_empty_rec(THD *thd, File file,enum legacy_db_type table_type,
}
null_pos= buff;
- List_iterator<create_field> it(create_fields);
+ List_iterator<Create_field> it(create_fields);
thd->count_cuted_fields= CHECK_FIELD_WARN; // To find wrong default values
while ((field=it++))
{