1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fixes for new getopt

Bug fix when using --no-deaults
Sets ref_length to right value (faster rnd_pos() handling in InnoDB).
Fixed problem with multi-table-delete and InnoDB
Fixed problem with truncate table, which required a COMMIT before.
Fixed multi-table-delete bug with InnoDB.
Remove not used index from EXPLAIN


Docs/manual.texi:
  ChangeLog
include/my_getopt.h:
  Removed compiler warnings
myisam/myisamchk.c:
  Fixes for new getopt
mysql-test/r/explain.result:
  Updated test results
mysql-test/r/innodb.result:
  Updated test results
mysql-test/r/join.result:
  Updated test results
mysql-test/t/innodb.test:
  Updated test results
mysys/default.c:
  Bug fix when using --no-defaults
mysys/my_getopt.c:
  Fixes for new getopt
sql/ha_innodb.cc:
  Sets ref_length to right value (faster rnd_pos() handling).
  Fixed problem with multi-table-delete.
  Fixed problem with truncate table, which required a COMMIT before.
sql/opt_sum.cc:
  Remove not used index from EXPLAIN
sql/sql_cache.cc:
  Fixed core dump bug when not using query cache
sql/sql_select.cc:
  Remove not used index from EXPLAIN
This commit is contained in:
unknown
2002-01-31 04:36:58 +02:00
parent 85278245af
commit 83c83a0223
13 changed files with 290 additions and 85 deletions

View File

@@ -1296,11 +1296,13 @@ add_key_field(KEY_FIELD **key_fields,uint and_level,
else
{
JOIN_TAB *stat=field->table->reginfo.join_tab;
stat[0].keys|=field->key_start; // Add possible keys
key_map possible_keys= (field->key_start &
field->table->keys_in_use_for_query);
stat[0].keys|= possible_keys; // Add possible keys
if (!value)
{ // Probably BETWEEN or IN
stat[0].const_keys |= field->key_start;
stat[0].const_keys |= possible_keys;
return; // Can't be used as eq key
}
@@ -1314,7 +1316,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level,
*/
stat[0].key_dependent|=used_tables;
if (value->const_item())
stat[0].const_keys |= field->key_start;
stat[0].const_keys |= possible_keys;
/* We can't always use indexes when comparing a string index to a
number. cmp_type() is checked to allow compare of dates to numbers */
@@ -4235,7 +4237,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
my_errno=tmp;
error= -1;
}
if (table->file->index_end())
if ((tmp=table->file->index_end()))
{
my_errno=tmp;
error= -1;