summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorunknown <monty@tramp.mysql.fi>2000-10-06 21:15:03 +0300
committerunknown <monty@tramp.mysql.fi>2000-10-06 21:15:03 +0300
commit6991b70c87163d3cb3477a19a947b07cbfec9660 (patch)
tree8ebcaf3db2393c7d413acc624301ee8971a5666e /sql/sql_select.h
parent295c3d1fa9a1950d1ebf6832da896e36f483d692 (diff)
downloadmariadb-git-6991b70c87163d3cb3477a19a947b07cbfec9660.tar.gz
DISTINCT optimization
Fixes when using column privileges Manual updates Docs/manual.texi: Comments from MySQL training + distinct optimization extra/my_print_defaults.c: Added --defaults-extra-file include/my_sys.h: Added --defaults-extra-file mysys/default.c: Added --defaults-extra-file sql/sql_acl.cc: Tables with only column privileges didn't show up in SHOW GRANTS or SHOW TABLES sql/sql_select.cc: DISTINCT optimization sql/sql_select.h: DISTINCT optimization BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 8daba5b939e..796802c0a50 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -79,36 +79,36 @@ class JOIN;
typedef struct st_join_table {
TABLE *table;
+ KEYUSE *keyuse; /* pointer to first used key */
+ SQL_SELECT *select;
+ COND *select_cond;
+ QUICK_SELECT *quick;
+ Item *on_expr;
+ const char *info;
int (*read_first_record)(struct st_join_table *tab);
int (*next_select)(JOIN *,struct st_join_table *,bool);
- bool cached_eq_ref_table,eq_ref_table;
READ_RECORD read_record;
- uint keys; /* all keys with can be used */
+ double worst_seeks;
key_map const_keys; /* Keys with constant part */
key_map checked_keys; /* Keys checked in find_best */
key_map needed_reg;
ha_rows records,found_records,read_time;
table_map dependent,key_dependent;
+ uint keys; /* all keys with can be used */
uint use_quick,index;
uint status; // Save status for cache
- enum join_type type;
- JOIN_CACHE cache;
- KEYUSE *keyuse; /* pointer to first used key */
- SQL_SELECT *select;
- COND *select_cond;
- QUICK_SELECT *quick;
- Item *on_expr;
uint used_fields,used_fieldlength,used_blobs;
- const char *info;
- double worst_seeks;
+ enum join_type type;
+ bool cached_eq_ref_table,eq_ref_table,not_used_in_distinct;
TABLE_REF ref;
+ JOIN_CACHE cache;
} JOIN_TAB;
typedef struct st_position { /* Used in find_best */
+ double records_read;
JOIN_TAB *table;
KEYUSE *key;
- double records_read;
} POSITION;
@@ -116,16 +116,16 @@ typedef struct st_position { /* Used in find_best */
class TMP_TABLE_PARAM {
public:
- uint copy_field_count,field_count,sum_func_count,func_count;
- uint group_parts,group_length;
- uint quick_group;
+ List<Item> copy_funcs;
Copy_field *copy_field;
byte *group_buff;
- ha_rows end_write_records;
Item_result_field **funcs;
- List<Item> copy_funcs;
MI_COLUMNDEF *recinfo,*start_recinfo;
KEY *keyinfo;
+ ha_rows end_write_records;
+ uint copy_field_count,field_count,sum_func_count,func_count;
+ uint group_parts,group_length;
+ uint quick_group;
TMP_TABLE_PARAM() :group_parts(0),group_length(0),copy_field(0) {}
~TMP_TABLE_PARAM()
@@ -148,7 +148,7 @@ class JOIN {
uint send_group_parts;
bool sort_and_group,first_record,full_join,group, no_field_update;
table_map const_table_map;
- ha_rows send_records;
+ ha_rows send_records,found_records;
POSITION positions[MAX_TABLES+1],best_positions[MAX_TABLES+1];
double best_read;
List<Item> *fields;