diff options
author | unknown <serg@serg.mylan> | 2004-06-23 12:29:05 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-06-23 12:29:05 +0200 |
commit | 9a554b4751237bc96f9ad6eae2df8b310567479d (patch) | |
tree | ed41d441646213c959f138d9a933c09f994d81d9 /sql/opt_sum.cc | |
parent | 16c5f173e825ff9936e5d3c96d4bf20210788ad2 (diff) | |
download | mariadb-git-9a554b4751237bc96f9ad6eae2df8b310567479d.tar.gz |
handler interface cleanups:
more logical table/index_flags
return HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate
max_keys and other limits renamed to max_supported_keys/etc
max_keys/etc are now wrappers to max_supported_keys/etc
ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing
include/myisam.h:
increasing myisam_max_temp_file_length
include/my_base.h:
handler interface cleanup
myisam/mi_static.c:
warning removed
mysql-test/Makefile.am:
followup
mysql-test/r/fulltext.result:
fulltext indexes are not ordered
mysql-test/r/rpl_user_variables.result:
followup
sql/field.cc:
index_flags
sql/filesort.cc:
rnd_init -> ha_rnd_init
rnd_end -> ha_rnd_end
sql/ha_berkeley.cc:
cleanup
sql/ha_berkeley.h:
table/index_flags revamped
sql/ha_heap.cc:
ensure index is accessed only after index_init (esp. important for temp tables)
sql/ha_heap.h:
table/index_flags revamped
sql/ha_innodb.cc:
don't workaround MySQL sloppiness
sql/ha_innodb.h:
table/index_flags revamped
sql/ha_isam.h:
table/index_flags revamped
sql/ha_isammrg.h:
table/index_flags revamped
sql/ha_myisam.cc:
ensure index is accessed only after index_init (esp. important for temp tables)
sql/ha_myisam.h:
table/index_flags revamped
sql/ha_myisammrg.h:
table/index_flags revamped
sql/handler.cc:
handler interface cleanups
sql/handler.h:
handler interface cleanups:
more logical table/index_flags
return HA_ERR_WRONG_COMMAND instead of abstract methods
max_keys and other limits renamed to max_supported_keys/etc
max_keys/etc are now wrappers to max_supported_keys/etc
ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to enforce strict pairing
sql/item_subselect.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/lex.h:
renamed to avoid conflicts
sql/opt_range.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/opt_range.h:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/opt_sum.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/records.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_acl.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_cache.cc:
cleanup
sql/sql_delete.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_handler.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_help.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_insert.cc:
table/index_flags cleanup
sql/sql_select.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/sql_table.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/sql_update.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_yacc.yy:
INDEX -> INDEX_SYM
sql/table.cc:
table/index_flags cleanup
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 8c1cd9ce1cb..75b00b97ce7 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -46,9 +46,9 @@ #include "mysql_priv.h" #include "sql_select.h" -static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, - Field* field, COND *cond, - uint *range_fl, uint *key_prefix_length); +static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, Field* field, + COND *cond, uint *range_fl, + uint *key_prefix_length); static int reckey_in_range(bool max_fl, TABLE_REF *ref, Field* field, COND *cond, uint range_fl, uint prefix_len); static int maxmin_in_range(bool max_fl, Field* field, COND *cond); @@ -166,11 +166,6 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) Item_field *item_field= ((Item_field*) expr); TABLE *table= item_field->field->table; - if ((table->file->table_flags() & HA_NOT_READ_AFTER_KEY)) - { - const_result=0; - break; - } /* Look for a partial key that can be used for optimization. If we succeed, ref.key_length will contain the length of @@ -186,7 +181,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) const_result= 0; break; } - error= table->file->index_init((uint) ref.key); + error= table->file->ha_index_init((uint) ref.key); if (!ref.key_length) error= table->file->index_first(table->record[0]); @@ -206,7 +201,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) table->key_read= 0; table->file->extra(HA_EXTRA_NO_KEYREAD); } - table->file->index_end(); + table->file->ha_index_end(); if (error) { if (error == HA_ERR_KEY_NOT_FOUND || error == HA_ERR_END_OF_FILE) @@ -260,12 +255,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) const_result= 0; break; } - if ((table->file->table_flags() & HA_NOT_READ_AFTER_KEY)) - { - const_result= 0; - break; - } - error= table->file->index_init((uint) ref.key); + error= table->file->ha_index_init((uint) ref.key); if (!ref.key_length) error= table->file->index_last(table->record[0]); @@ -285,7 +275,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) table->key_read=0; table->file->extra(HA_EXTRA_NO_KEYREAD); } - table->file->index_end(); + table->file->ha_index_end(); if (error) { if (error == HA_ERR_KEY_NOT_FOUND || error == HA_ERR_END_OF_FILE) @@ -648,7 +638,7 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, keyinfo != keyinfo_end; keyinfo++,idx++) { - if (table->file->index_flags(idx) & HA_WRONG_ASCII_ORDER) + if (!(table->file->index_flags(idx) & HA_READ_ORDER)) break; KEY_PART_INFO *part,*part_end; |