mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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
This commit is contained in:
@@ -605,12 +605,14 @@ int SQL_SELECT::test_quick_select(key_map keys_to_use, table_map prev_tables,
|
||||
records++; /* purecov: inspected */
|
||||
scan_time=(double) records / TIME_FOR_COMPARE+1;
|
||||
read_time=(double) head->file->scan_time()+ scan_time + 1.0;
|
||||
if (head->force_index)
|
||||
scan_time= read_time= DBL_MAX;
|
||||
if (limit < records)
|
||||
read_time=(double) records+scan_time+1; // Force to use index
|
||||
else if (read_time <= 2.0 && !force_quick_range)
|
||||
DBUG_RETURN(0); /* No need for quick select */
|
||||
|
||||
DBUG_PRINT("info",("Time to scan table: %ld",(long) read_time));
|
||||
DBUG_PRINT("info",("Time to scan table: %g", read_time));
|
||||
|
||||
keys_to_use&=head->keys_in_use_for_query;
|
||||
if (keys_to_use)
|
||||
|
||||
Reference in New Issue
Block a user