mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Backport of:
---------------------------------------------------------- revno: 2630.22.8 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-runtime timestamp: Sun 2008-08-10 18:49:52 +0400 message: Get rid of typedef struct for the most commonly used types: TABLE, TABLE_SHARE, LEX. This simplifies use of tags and forward declarations.
This commit is contained in:
20
sql/field.h
20
sql/field.h
@ -60,8 +60,8 @@ public:
|
||||
Note that you can use table->in_use as replacement for current_thd member
|
||||
only inside of val_*() and store() members (e.g. you can't use it in cons)
|
||||
*/
|
||||
struct st_table *table; // Pointer for table
|
||||
struct st_table *orig_table; // Pointer to original table
|
||||
TABLE *table; // Pointer for table
|
||||
TABLE *orig_table; // Pointer to original table
|
||||
const char **table_name, *field_name;
|
||||
LEX_STRING comment;
|
||||
/* Field is part of the following keys */
|
||||
@ -301,12 +301,12 @@ public:
|
||||
*/
|
||||
virtual bool can_be_compared_as_longlong() const { return FALSE; }
|
||||
virtual void free() {}
|
||||
virtual Field *new_field(MEM_ROOT *root, struct st_table *new_table,
|
||||
virtual Field *new_field(MEM_ROOT *root, TABLE *new_table,
|
||||
bool keep_type);
|
||||
virtual Field *new_key_field(MEM_ROOT *root, struct st_table *new_table,
|
||||
virtual Field *new_key_field(MEM_ROOT *root, TABLE *new_table,
|
||||
uchar *new_ptr, uchar *new_null_ptr,
|
||||
uint new_null_bit);
|
||||
Field *clone(MEM_ROOT *mem_root, struct st_table *new_table);
|
||||
Field *clone(MEM_ROOT *mem_root, TABLE *new_table);
|
||||
inline void move_field(uchar *ptr_arg,uchar *null_ptr_arg,uchar null_bit_arg)
|
||||
{
|
||||
ptr=ptr_arg; null_ptr=null_ptr_arg; null_bit=null_bit_arg;
|
||||
@ -1506,7 +1506,7 @@ public:
|
||||
enum_field_types real_type() const { return MYSQL_TYPE_STRING; }
|
||||
bool has_charset(void) const
|
||||
{ return charset() == &my_charset_bin ? FALSE : TRUE; }
|
||||
Field *new_field(MEM_ROOT *root, struct st_table *new_table, bool keep_type);
|
||||
Field *new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type);
|
||||
virtual uint get_key_image(uchar *buff,uint length, imagetype type);
|
||||
private:
|
||||
int do_save_field_metadata(uchar *first_byte);
|
||||
@ -1593,8 +1593,8 @@ public:
|
||||
enum_field_types real_type() const { return MYSQL_TYPE_VARCHAR; }
|
||||
bool has_charset(void) const
|
||||
{ return charset() == &my_charset_bin ? FALSE : TRUE; }
|
||||
Field *new_field(MEM_ROOT *root, struct st_table *new_table, bool keep_type);
|
||||
Field *new_key_field(MEM_ROOT *root, struct st_table *new_table,
|
||||
Field *new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type);
|
||||
Field *new_key_field(MEM_ROOT *root, TABLE *new_table,
|
||||
uchar *new_ptr, uchar *new_null_ptr,
|
||||
uint new_null_bit);
|
||||
uint is_equal(Create_field *new_field);
|
||||
@ -1833,7 +1833,7 @@ public:
|
||||
{
|
||||
flags|=ENUM_FLAG;
|
||||
}
|
||||
Field *new_field(MEM_ROOT *root, struct st_table *new_table, bool keep_type);
|
||||
Field *new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type);
|
||||
enum_field_types type() const { return MYSQL_TYPE_STRING; }
|
||||
enum Item_result cmp_type () const { return INT_RESULT; }
|
||||
enum Item_result cast_to_int_type () const { return INT_RESULT; }
|
||||
@ -1971,7 +1971,7 @@ public:
|
||||
uint param_data, bool low_byte_first);
|
||||
virtual void set_default();
|
||||
|
||||
Field *new_key_field(MEM_ROOT *root, struct st_table *new_table,
|
||||
Field *new_key_field(MEM_ROOT *root, TABLE *new_table,
|
||||
uchar *new_ptr, uchar *new_null_ptr,
|
||||
uint new_null_bit);
|
||||
void set_bit_ptr(uchar *bit_ptr_arg, uchar bit_ofs_arg)
|
||||
|
Reference in New Issue
Block a user