1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +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

@@ -319,6 +319,7 @@ int mysql_update(THD *thd,
error= 1; // Aborted
end_read_record(&info);
free_io_cache(table); // If ORDER BY
delete select;
thd->proc_info="end";
VOID(table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY));
@@ -358,7 +359,6 @@ int mysql_update(THD *thd,
thd->lock=0;
}
delete select;
free_underlaid_joins(thd, &thd->lex->select_lex);
if (error >= 0)
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0); /* purecov: inspected */
@@ -964,25 +964,24 @@ int multi_update::do_updates(bool from_send_error)
TABLE_LIST *cur_table;
int local_error;
ha_rows org_updated;
TABLE *table;
TABLE *table, *tmp_table;
DBUG_ENTER("do_updates");
do_update= 0; // Don't retry this function
do_update= 0; // Don't retry this function
if (!found)
DBUG_RETURN(0);
for (cur_table= update_tables; cur_table ; cur_table= cur_table->next)
{
byte *ref_pos;
TABLE *tmp_table;
table = cur_table->table;
if (table == table_to_update)
continue; // Already updated
org_updated= updated;
tmp_table= tmp_tables[cur_table->shared];
tmp_table->file->extra(HA_EXTRA_CACHE); // Change to read cache
(void) table->file->rnd_init(0);
(void) table->file->ha_rnd_init(0);
table->file->extra(HA_EXTRA_NO_CACHE);
/*
@@ -998,7 +997,7 @@ int multi_update::do_updates(bool from_send_error)
}
copy_field_end=copy_field_ptr;
if ((local_error = tmp_table->file->rnd_init(1)))
if ((local_error = tmp_table->file->ha_rnd_init(1)))
goto err;
ref_pos= (byte*) tmp_table->field[0]->ptr;
@@ -1049,7 +1048,8 @@ int multi_update::do_updates(bool from_send_error)
else
trans_safe= 0; // Can't do safe rollback
}
(void) table->file->rnd_end();
(void) table->file->ha_rnd_end();
(void) tmp_table->file->ha_rnd_end();
}
DBUG_RETURN(0);
@@ -1057,6 +1057,9 @@ err:
if (!from_send_error)
table->file->print_error(local_error,MYF(0));
(void) table->file->ha_rnd_end();
(void) tmp_table->file->ha_rnd_end();
if (updated != org_updated)
{
if (table->tmp_table != NO_TMP_TABLE)