diff options
author | monty@donna.mysql.fi <> | 2001-03-06 15:26:13 +0200 |
---|---|---|
committer | monty@donna.mysql.fi <> | 2001-03-06 15:26:13 +0200 |
commit | f1b9242dc8b3cd52ba0045bddd1eb83e4c01eac4 (patch) | |
tree | ac4bcd8007addf9ae2a4501364bc413b0e1667b8 /sql/sql_select.cc | |
parent | 853a2f01604b17b4611778d89bf178ccee3901c3 (diff) | |
parent | bda3e099358ddcad825c1231f2a0f14697abd59c (diff) | |
download | mariadb-git-f1b9242dc8b3cd52ba0045bddd1eb83e4c01eac4.tar.gz |
Merge work:/my/mysql into donna.mysql.fi:/home/my/bk/mysql
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9f051448bd2..9359b40849c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2040,8 +2040,7 @@ get_best_combination(JOIN *join) if (keyparts == keyuse->keypart) { keyparts++; - length+=keyinfo->key_part[keyuse->keypart].length + - test(keyinfo->key_part[keyuse->keypart].null_bit); + length+=keyinfo->key_part[keyuse->keypart].store_length; } } keyuse++; @@ -2241,7 +2240,10 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) make_cond_for_table(cond,join->const_table_map,(table_map) 0); DBUG_EXECUTE("where",print_where(const_cond,"constants");); if (const_cond && !const_cond->val_int()) + { + DBUG_PRINT("info",("Found impossible WHERE condition")); DBUG_RETURN(1); // Impossible const condition + } } used_tables=(select->const_tables=join->const_table_map) | RAND_TABLE_BIT; for (uint i=join->const_tables ; i < join->tables ; i++) @@ -5134,7 +5136,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit) usable_keys=0; break; } - usable_keys&=((Item_field*) (*tmp_order->item))->field->part_of_key; + usable_keys&=((Item_field*) (*tmp_order->item))->field->part_of_sortkey; } ref_key= -1; |