summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-09 02:19:14 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-09 02:19:14 +0200
commitb5e37b242e23c1fed48007e0ec6f9eb7ecc34758 (patch)
treed8a4d338b246396e32745b9fe381fc6de42d5a9d /sql/sql_select.cc
parenta3f4a46bf29761fe73760a74ceb86491861dcbf4 (diff)
downloadmariadb-git-b5e37b242e23c1fed48007e0ec6f9eb7ecc34758.tar.gz
Don't count NULL values in cardinalty for MyISAM tables.
Free row buffer cache after each query for MyISAM tables. Added table join option FORCE INDEX Fixed core dump bug when connecting with hostname that could not be resolved. include/my_base.h: Don't count NULL values in cardinalty myisam/mi_check.c: Don't count NULL values in cardinalty myisam/mi_extra.c: Free row buffer cache after each query myisam/mi_open.c: Avoid realloc if cache size doesn't change myisam/mi_search.c: Don't count NULL values in cardinalty myisam/myisamdef.h: Change buffer length from uint to uint32 to make it more portable/predictable mysql-test/r/myisam.result: Test case for cardinality with NULL keys and FORCE INDEX mysql-test/t/myisam.test: Test case for cardinality with NULL keys and FORCE INDEX sql/lex.h: Added table join option FORCE INDEX sql/mysql_priv.h: Added table join option FORCE INDEX sql/opt_range.cc: Added table join option FORCE INDEX sql/sql_base.cc: Added table join option FORCE INDEX sql/sql_lex.h: Added table join option FORCE INDEX sql/sql_parse.cc: Added table join option FORCE INDEX Don't use strlen() on hostname without first checking if it's not NULL sql/sql_select.cc: Added table join option FORCE INDEX sql/sql_yacc.yy: Added table join option FORCE INDEX sql/table.h: Added table join option FORCE INDEX
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 28aa21e94ce..237197ba6be 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2057,7 +2057,8 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
!(s->quick && best_key && s->quick->index == best_key->key &&
best_max_key_part >= s->table->quick_key_parts[best_key->key]) &&
!((s->table->file->table_flags() & HA_TABLE_SCAN_ON_INDEX) &&
- s->table->used_keys && best_key))
+ s->table->used_keys && best_key) &&
+ !(s->table->force_index && best_key))
{ // Check full join
if (s->on_expr)
{