diff options
-rw-r--r-- | sql/key.cc | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 14 | ||||
-rw-r--r-- | sql/sql_select.h | 3 |
3 files changed, 7 insertions, 12 deletions
diff --git a/sql/key.cc b/sql/key.cc index 38ab596e213..feda9e156b3 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -67,7 +67,7 @@ int find_ref_key(TABLE *table,Field *field, uint *key_length) /* Copy a key from record to some buffer */ - /* if length == 0 then copy hole key */ + /* if length == 0 then copy whole key */ void key_copy(byte *key,TABLE *table,uint idx,uint key_length) { diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 5408fd1e17f..8244b7c5fd4 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2757,19 +2757,15 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, if (!keyuse->used_tables && !(join->select_options & SELECT_DESCRIBE)) { // Compare against constant - store_key_item *tmp=new store_key_item(thd, - keyinfo->key_part[i].field, - (char*)key_buff + - maybe_null, - maybe_null ? - (char*) key_buff : 0, - keyinfo->key_part[i].length, - keyuse->val); + store_key_item tmp(thd, keyinfo->key_part[i].field, + (char*)key_buff + maybe_null, + maybe_null ? (char*) key_buff : 0, + keyinfo->key_part[i].length, keyuse->val); if (thd->is_fatal_error) { return TRUE; } - tmp->copy(); + tmp.copy(); } else *ref_key++= get_store_key(thd, diff --git a/sql/sql_select.h b/sql/sql_select.h index bb928846186..eb97a744745 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -174,7 +174,7 @@ class JOIN :public Sql_alloc Item_sum **sum_funcs; Procedure *procedure; Item *having; - Item *tmp_having; // To store Having when processed tenporary table + Item *tmp_having; // To store Having when processed temporary table uint select_options; select_result *result; TMP_TABLE_PARAM tmp_table_param; @@ -307,7 +307,6 @@ class store_key :public Sql_alloc { protected: Field *to_field; // Store data here - Field *key_field; // Copy of key field char *null_ptr; char err; public: |