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:
48
sql/table.cc
48
sql/table.cc
@ -2931,7 +2931,7 @@ table_check_intact(TABLE *table, const uint table_f_count,
|
||||
Create Item_field for each column in the table.
|
||||
|
||||
SYNPOSIS
|
||||
st_table::fill_item_list()
|
||||
TABLE::fill_item_list()
|
||||
item_list a pointer to an empty list used to store items
|
||||
|
||||
DESCRIPTION
|
||||
@ -2944,7 +2944,7 @@ table_check_intact(TABLE *table, const uint table_f_count,
|
||||
1 out of memory
|
||||
*/
|
||||
|
||||
bool st_table::fill_item_list(List<Item> *item_list) const
|
||||
bool TABLE::fill_item_list(List<Item> *item_list) const
|
||||
{
|
||||
/*
|
||||
All Item_field's created using a direct pointer to a field
|
||||
@ -2964,7 +2964,7 @@ bool st_table::fill_item_list(List<Item> *item_list) const
|
||||
Fields of this table.
|
||||
|
||||
SYNPOSIS
|
||||
st_table::fill_item_list()
|
||||
TABLE::fill_item_list()
|
||||
item_list a non-empty list with Item_fields
|
||||
|
||||
DESCRIPTION
|
||||
@ -2974,7 +2974,7 @@ bool st_table::fill_item_list(List<Item> *item_list) const
|
||||
is the same as the number of columns in the table.
|
||||
*/
|
||||
|
||||
void st_table::reset_item_list(List<Item> *item_list) const
|
||||
void TABLE::reset_item_list(List<Item> *item_list) const
|
||||
{
|
||||
List_iterator_fast<Item> it(*item_list);
|
||||
for (Field **ptr= field; *ptr; ptr++)
|
||||
@ -3909,7 +3909,7 @@ const char *Natural_join_column::db_name()
|
||||
return table_ref->view_db.str;
|
||||
|
||||
/*
|
||||
Test that TABLE_LIST::db is the same as st_table_share::db to
|
||||
Test that TABLE_LIST::db is the same as TABLE_SHARE::db to
|
||||
ensure consistency. An exception are I_S schema tables, which
|
||||
are inconsistent in this respect.
|
||||
*/
|
||||
@ -4128,7 +4128,7 @@ const char *Field_iterator_table_ref::get_db_name()
|
||||
return natural_join_it.column_ref()->db_name();
|
||||
|
||||
/*
|
||||
Test that TABLE_LIST::db is the same as st_table_share::db to
|
||||
Test that TABLE_LIST::db is the same as TABLE_SHARE::db to
|
||||
ensure consistency. An exception are I_S schema tables, which
|
||||
are inconsistent in this respect.
|
||||
*/
|
||||
@ -4304,7 +4304,7 @@ Field_iterator_table_ref::get_natural_column_ref()
|
||||
|
||||
/* Reset all columns bitmaps */
|
||||
|
||||
void st_table::clear_column_bitmaps()
|
||||
void TABLE::clear_column_bitmaps()
|
||||
{
|
||||
/*
|
||||
Reset column read/write usage. It's identical to:
|
||||
@ -4325,9 +4325,9 @@ void st_table::clear_column_bitmaps()
|
||||
key fields.
|
||||
*/
|
||||
|
||||
void st_table::prepare_for_position()
|
||||
void TABLE::prepare_for_position()
|
||||
{
|
||||
DBUG_ENTER("st_table::prepare_for_position");
|
||||
DBUG_ENTER("TABLE::prepare_for_position");
|
||||
|
||||
if ((file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
|
||||
s->primary_key < MAX_KEY)
|
||||
@ -4346,14 +4346,14 @@ void st_table::prepare_for_position()
|
||||
NOTE:
|
||||
This changes the bitmap to use the tmp bitmap
|
||||
After this, you can't access any other columns in the table until
|
||||
bitmaps are reset, for example with st_table::clear_column_bitmaps()
|
||||
or st_table::restore_column_maps_after_mark_index()
|
||||
bitmaps are reset, for example with TABLE::clear_column_bitmaps()
|
||||
or TABLE::restore_column_maps_after_mark_index()
|
||||
*/
|
||||
|
||||
void st_table::mark_columns_used_by_index(uint index)
|
||||
void TABLE::mark_columns_used_by_index(uint index)
|
||||
{
|
||||
MY_BITMAP *bitmap= &tmp_set;
|
||||
DBUG_ENTER("st_table::mark_columns_used_by_index");
|
||||
DBUG_ENTER("TABLE::mark_columns_used_by_index");
|
||||
|
||||
(void) file->extra(HA_EXTRA_KEYREAD);
|
||||
bitmap_clear_all(bitmap);
|
||||
@ -4374,9 +4374,9 @@ void st_table::mark_columns_used_by_index(uint index)
|
||||
when calling mark_columns_used_by_index
|
||||
*/
|
||||
|
||||
void st_table::restore_column_maps_after_mark_index()
|
||||
void TABLE::restore_column_maps_after_mark_index()
|
||||
{
|
||||
DBUG_ENTER("st_table::restore_column_maps_after_mark_index");
|
||||
DBUG_ENTER("TABLE::restore_column_maps_after_mark_index");
|
||||
|
||||
key_read= 0;
|
||||
(void) file->extra(HA_EXTRA_NO_KEYREAD);
|
||||
@ -4390,7 +4390,7 @@ void st_table::restore_column_maps_after_mark_index()
|
||||
mark columns used by key, but don't reset other fields
|
||||
*/
|
||||
|
||||
void st_table::mark_columns_used_by_index_no_reset(uint index,
|
||||
void TABLE::mark_columns_used_by_index_no_reset(uint index,
|
||||
MY_BITMAP *bitmap)
|
||||
{
|
||||
KEY_PART_INFO *key_part= key_info[index].key_part;
|
||||
@ -4409,7 +4409,7 @@ void st_table::mark_columns_used_by_index_no_reset(uint index,
|
||||
always set and sometimes read.
|
||||
*/
|
||||
|
||||
void st_table::mark_auto_increment_column()
|
||||
void TABLE::mark_auto_increment_column()
|
||||
{
|
||||
DBUG_ASSERT(found_next_number_field);
|
||||
/*
|
||||
@ -4442,7 +4442,7 @@ void st_table::mark_auto_increment_column()
|
||||
retrieve the row again.
|
||||
*/
|
||||
|
||||
void st_table::mark_columns_needed_for_delete()
|
||||
void TABLE::mark_columns_needed_for_delete()
|
||||
{
|
||||
if (triggers)
|
||||
triggers->mark_fields_used(TRG_EVENT_DELETE);
|
||||
@ -4492,7 +4492,7 @@ void st_table::mark_columns_needed_for_delete()
|
||||
retrieve the row again.
|
||||
*/
|
||||
|
||||
void st_table::mark_columns_needed_for_update()
|
||||
void TABLE::mark_columns_needed_for_update()
|
||||
{
|
||||
DBUG_ENTER("mark_columns_needed_for_update");
|
||||
if (triggers)
|
||||
@ -4535,7 +4535,7 @@ void st_table::mark_columns_needed_for_update()
|
||||
as changed.
|
||||
*/
|
||||
|
||||
void st_table::mark_columns_needed_for_insert()
|
||||
void TABLE::mark_columns_needed_for_insert()
|
||||
{
|
||||
if (triggers)
|
||||
{
|
||||
@ -4565,7 +4565,7 @@ void st_table::mark_columns_needed_for_insert()
|
||||
TABLEs. Each of these TABLEs is called a part of a MERGE table.
|
||||
*/
|
||||
|
||||
bool st_table::is_children_attached(void)
|
||||
bool TABLE::is_children_attached(void)
|
||||
{
|
||||
return((child_l && children_attached) ||
|
||||
(parent && parent->children_attached));
|
||||
@ -4629,9 +4629,9 @@ Item_subselect *TABLE_LIST::containing_subselect()
|
||||
DESCRIPTION
|
||||
The parser collects the index hints for each table in a "tagged list"
|
||||
(TABLE_LIST::index_hints). Using the information in this tagged list
|
||||
this function sets the members st_table::keys_in_use_for_query,
|
||||
st_table::keys_in_use_for_group_by, st_table::keys_in_use_for_order_by,
|
||||
st_table::force_index and st_table::covering_keys.
|
||||
this function sets the members TABLE::keys_in_use_for_query,
|
||||
TABLE::keys_in_use_for_group_by, TABLE::keys_in_use_for_order_by,
|
||||
TABLE::force_index and TABLE::covering_keys.
|
||||
|
||||
Current implementation of the runtime does not allow mixing FORCE INDEX
|
||||
and USE INDEX, so this is checked here. Then the FORCE INDEX list
|
||||
|
Reference in New Issue
Block a user