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

compatibility fixes

mysql-test/r/strict.result:
  fixed
mysql-test/r/view.result:
  rolled back
mysql-test/t/information_schema.test:
  fix for 2GB file size limit
mysql-test/t/ps_1general.test:
  fix for 2GB file size limit
mysql-test/t/view.test:
  fix for 2GB file size limit
sql/field.cc:
  double->int conversion troubles
  cleanup
sql/item_cmpfunc.h:
  warning fixed
sql/sql_select.cc:
  division by zero fixed
This commit is contained in:
unknown
2004-11-29 22:47:50 +01:00
parent 2d527b72f3
commit 26fe328995
8 changed files with 36 additions and 28 deletions

View File

@@ -3464,7 +3464,7 @@ best_access_path(JOIN *join,
{
/*
Assume that the first key part matches 1% of the file
and that the hole key matches 10 (duplicates) or 1
and that the whole key matches 10 (duplicates) or 1
(unique) records.
Assume also that more key matches proportionally more
records
@@ -3472,7 +3472,7 @@ best_access_path(JOIN *join,
records = (x * (b-a) + a*c-b)/(c-1)
b = records matched by whole key
a = records matched by first key part (10% of all records?)
a = records matched by first key part (1% of all records?)
c = number of key parts in key
x = used key parts (1 <= x <= c)
*/
@@ -3488,9 +3488,12 @@ best_access_path(JOIN *join,
else
{
double a=s->records*0.01;
tmp = (max_key_part * (rec_per_key - a) +
a*keyinfo->key_parts - rec_per_key)/
(keyinfo->key_parts-1);
if (keyinfo->key_parts > 1)
tmp= (max_key_part * (rec_per_key - a) +
a*keyinfo->key_parts - rec_per_key)/
(keyinfo->key_parts-1);
else
tmp= a;
set_if_bigger(tmp,1.0);
}
records = (ulong) tmp;
@@ -4421,7 +4424,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
{
/*
Assume that the first key part matches 1% of the file
and that the hole key matches 10 (duplicates) or 1
and that the whole key matches 10 (duplicates) or 1
(unique) records.
Assume also that more key matches proportionally more
records