1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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
This commit is contained in:
unknown
2004-06-23 12:29:05 +02:00
parent 16c5f173e8
commit 9a554b4751
38 changed files with 562 additions and 660 deletions

View File

@ -72,6 +72,7 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
if (*ptr)
{
(*ptr)->file->ha_index_or_rnd_end();
VOID(pthread_mutex_lock(&LOCK_open));
if (close_thread_table(thd, ptr))
{
@ -94,10 +95,14 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
int mysql_ha_closeall(THD *thd, TABLE_LIST *tables)
{
TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->real_name, 0);
if (*ptr && close_thread_table(thd, ptr))
if (*ptr)
{
/* Tell threads waiting for refresh that something has happened */
VOID(pthread_cond_broadcast(&COND_refresh));
(*ptr)->file->ha_index_or_rnd_end();
if (close_thread_table(thd, ptr))
{
/* Tell threads waiting for refresh that something has happened */
VOID(pthread_cond_broadcast(&COND_refresh));
}
}
return 0;
}
@ -136,7 +141,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
keyname,tables->alias);
return -1;
}
table->file->index_init(keyno);
table->file->ha_index_or_rnd_end();
table->file->ha_index_init(keyno);
}
List<Item> list;
@ -148,8 +154,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
uint num_rows;
byte *key;
uint key_len;
LINT_INIT(key);
LINT_INIT(key_len);
LINT_INIT(key);
LINT_INIT(key_len);
it++; // Skip first NULL field
@ -180,7 +186,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
err=table->file->index_first(table->record[0]);
else
{
if (!(err=table->file->rnd_init(1)))
table->file->ha_index_or_rnd_end();
if (!(err=table->file->ha_rnd_init(1)))
err=table->file->rnd_next(table->record[0]);
}
mode=RNEXT;