Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-10 14:43:57+04:00, kostja@bodhi.(none) +20 -0
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@stripped, 2007-06-10 14:43:53+04:00, kostja@bodhi.(none) +18 -18
create_field -> Create_field
sql/field.h@stripped, 2007-06-10 14:43:53+04:00, kostja@bodhi.(none) +15 -15
create_field -> Create_field
sql/item.h@stripped, 2007-06-10 14:43:53+04:00, kostja@bodhi.(none) +1 -1
create_field -> Create_field
sql/item_sum.cc@stripped, 2007-06-10 14:43:53+04:00, kostja@bodhi.(none) +2 -2
create_field -> Create_field
sql/mysql_priv.h@stripped, 2007-06-10 14:43:53+04:00, kostja@bodhi.(none) +6 -6
create_field -> Create_field
sql/sp_head.cc@stripped, 2007-06-10 14:43:53+04:00, kostja@bodhi.(none) +4 -4
create_field -> Create_field
sql/sp_head.h@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +2 -2
create_field -> Create_field
sql/sp_pcontext.cc@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +1 -1
create_field -> Create_field
sql/sp_pcontext.h@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +2 -2
create_field -> Create_field
sql/sp_rcontext.cc@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +1 -1
create_field -> Create_field
sql/sql_class.cc@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +7 -7
create_field -> Create_field
key_part_spec -> Key_part_spec
foreign_key -> Foreign_key
sql/sql_class.h@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +18 -18
create_field -> Create_field
key_part_spec -> Key_part_spec
foreign_key -> Foreign_key
sql/sql_insert.cc@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +3 -3
create_field -> Create_field
sql/sql_lex.cc@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +1 -1
Coding style: classes start with a capital, create_field -> Create_field
sql/sql_lex.h@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +4 -4
create_field -> Create_field
key_part_spec -> Key_part_spec
sql/sql_parse.cc@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +4 -4
create_field -> Create_field
key_part_spec -> Key_part_spec
sql/sql_select.cc@stripped, 2007-06-10 14:43:54+04:00, kostja@bodhi.(none) +3 -3
create_field -> Create_field
sql/sql_table.cc@stripped, 2007-06-10 14:43:55+04:00, kostja@bodhi.(none) +30 -30
create_field -> Create_field
sql/sql_yacc.yy@stripped, 2007-06-10 14:43:55+04:00, kostja@bodhi.(none) +14 -14
create_field -> Create_field
key_part_spec -> Key_part_spec
foreign_key -> Foreign_key
sql/unireg.cc@stripped, 2007-06-10 14:43:55+04:00, kostja@bodhi.(none) +27 -27
create_field -> Create_field
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: kostja
# Host: bodhi.(none)
# Root: /opt/local/work/mysql-5.1-runtime
--- 1.390/sql/field.cc 2007-05-24 20:47:54 +04:00
+++ 1.391/sql/field.cc 2007-06-10 14:43:53 +04:00
@@ -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 @@
}
-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 @@
}
-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 @@
/* 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 @@
}
-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 @@
}
-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::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 @@
}
-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 @@
/*****************************************************************************
- 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::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 @@
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 @@
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 @@
/* 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;
--- 1.229/sql/field.h 2007-06-01 11:43:51 +04:00
+++ 1.230/sql/field.h 2007-06-10 14:43:53 +04:00
@@ -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 @@
/* 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 @@
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 @@
{ 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 @@
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 @@
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 @@
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 @@
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 @@
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. */
--- 1.244/sql/item.h 2007-05-24 02:39:18 +04:00
+++ 1.245/sql/item.h 2007-06-10 14:43:53 +04:00
@@ -1756,7 +1756,7 @@
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;
--- 1.220/sql/item_sum.cc 2007-05-24 02:39:19 +04:00
+++ 1.221/sql/item_sum.cc 2007-06-10 14:43:53 +04:00
@@ -912,8 +912,8 @@
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);
--- 1.511/sql/mysql_priv.h 2007-06-01 11:43:52 +04:00
+++ 1.512/sql/mysql_priv.h 2007-06-10 14:43:53 +04:00
@@ -911,7 +911,7 @@
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 @@
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 @@
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 @@
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,
--- 1.337/sql/sql_class.cc 2007-06-01 11:43:53 +04:00
+++ 1.338/sql/sql_class.cc 2007-06-10 14:43:54 +04:00
@@ -59,8 +59,8 @@
/* 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 @@
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 @@
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 @@
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++))
--- 1.364/sql/sql_class.h 2007-06-01 11:43:53 +04:00
+++ 1.365/sql/sql_class.h 2007-06-10 14:43:54 +04:00
@@ -84,14 +84,14 @@
} 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 @@
@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 @@
: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 @@
: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 @@
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 @@
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 @@
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 @@
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
--- 1.273/sql/sql_insert.cc 2007-06-01 11:43:54 +04:00
+++ 1.274/sql/sql_insert.cc 2007-06-10 14:43:54 +04:00
@@ -3201,7 +3201,7 @@
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 @@
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 @@
(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);
--- 1.244/sql/sql_lex.cc 2007-06-01 11:43:54 +04:00
+++ 1.245/sql/sql_lex.cc 2007-06-10 14:43:54 +04:00
@@ -1132,7 +1132,7 @@
/*
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
--- 1.281/sql/sql_lex.h 2007-06-01 11:43:54 +04:00
+++ 1.282/sql/sql_lex.h 2007-06-10 14:43:54 +04:00
@@ -843,7 +843,7 @@
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 @@
*/
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 @@
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
--- 1.675/sql/sql_parse.cc 2007-06-01 11:43:54 +04:00
+++ 1.676/sql/sql_parse.cc 2007-06-10 14:43:54 +04:00
@@ -5459,7 +5459,7 @@
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 @@
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 @@
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 @@
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))
--- 1.523/sql/sql_select.cc 2007-06-01 11:43:55 +04:00
+++ 1.524/sql/sql_select.cc 2007-06-10 14:43:54 +04:00
@@ -10024,12 +10024,12 @@
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 @@
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,
--- 1.424/sql/sql_table.cc 2007-06-01 13:33:54 +04:00
+++ 1.425/sql/sql_table.cc 2007-06-10 14:43:55 +04:00
@@ -34,12 +34,12 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
/*
- 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 @@
*/
-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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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++)
{
--- 1.573/sql/sql_yacc.yy 2007-06-01 11:43:56 +04:00
+++ 1.574/sql/sql_yacc.yy 2007-06-10 14:43:55 +04:00
@@ -456,7 +456,7 @@
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 @@
{
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 @@
| '(' 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_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_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 @@
{
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:
--- 1.102/sql/unireg.cc 2007-05-24 02:39:26 +04:00
+++ 1.103/sql/unireg.cc 2007-06-10 14:43:55 +04:00
@@ -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 @@
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 @@
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 @@
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 @@
/* 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 @@
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 @@
*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 @@
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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 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 @@
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 @@
}
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++))
{
--- 1.273/sql/sp_head.cc 2007-06-01 11:43:53 +04:00
+++ 1.274/sql/sp_head.cc 2007-06-10 14:43:53 +04:00
@@ -581,7 +581,7 @@
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 @@
}
/*
- 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 @@
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 @@
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 };
--- 1.108/sql/sp_head.h 2007-06-01 11:43:53 +04:00
+++ 1.109/sql/sp_head.h 2007-06-10 14:43:54 +04:00
@@ -126,7 +126,7 @@
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 @@
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);
--- 1.34/sql/sp_pcontext.cc 2007-05-10 13:59:29 +04:00
+++ 1.35/sql/sp_pcontext.cc 2007-06-10 14:43:54 +04:00
@@ -422,7 +422,7 @@
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. */
--- 1.32/sql/sp_pcontext.h 2007-05-10 13:59:29 +04:00
+++ 1.33/sql/sp_pcontext.h 2007-06-10 14:43:54 +04:00
@@ -43,7 +43,7 @@
uint offset;
Item *dflt;
- create_field field_def;
+ Create_field field_def;
} sp_variable_t;
@@ -234,7 +234,7 @@
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 *
--- 1.44/sql/sp_rcontext.cc 2006-12-23 22:04:26 +03:00
+++ 1.45/sql/sp_rcontext.cc 2007-06-10 14:43:54 +04:00
@@ -102,7 +102,7 @@
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;
| Thread |
|---|
| • bk commit into 5.1 tree (kostja:1.2542) | konstantin | 10 Jun |