maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #03249
Rev 2793: Fixed uninitialized memory. in file:///home/bell/maria/bzr/work-maria-5.3-scache2/
At file:///home/bell/maria/bzr/work-maria-5.3-scache2/
------------------------------------------------------------
revno: 2793
revision-id: sanja@xxxxxxxxxxxx-20100608114156-36q3me04ecxh2by6
parent: sanja@xxxxxxxxxxxx-20100608093610-efg156vu4mi4u9pp
committer: sanja@xxxxxxxxxxxx
branch nick: work-maria-5.3-scache2
timestamp: Tue 2010-06-08 14:41:56 +0300
message:
Fixed uninitialized memory.
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h 2010-05-31 21:25:54 +0000
+++ b/sql/mysql_priv.h 2010-06-08 11:41:56 +0000
@@ -1274,7 +1274,7 @@
select_result *result, SELECT_LEX_UNIT *unit,
SELECT_LEX *select_lex);
-struct st_join_table *create_index_lookup_join_tab(TABLE *table);
+struct st_join_table *create_index_lookup_join_tab(TABLE *table, int key_no);
int join_read_key2(THD *thd, struct st_join_table *tab, TABLE *table,
struct st_table_ref *table_ref);
void free_underlaid_joins(THD *thd, SELECT_LEX *select);
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2010-05-31 21:25:54 +0000
+++ b/sql/sql_select.cc 2010-06-08 11:41:56 +0000
@@ -7627,11 +7627,12 @@
Creates and fills JOIN_TAB for index look up in temporary table
@param table The table where to look up
+ @param key_no Number of key
@return JOIN_TAB object or NULL in case of error
*/
-JOIN_TAB *create_index_lookup_join_tab(TABLE *table)
+JOIN_TAB *create_index_lookup_join_tab(TABLE *table, int key_no)
{
JOIN_TAB *tab;
DBUG_ENTER("create_index_lookup_join_tab");
@@ -7640,13 +7641,12 @@
DBUG_RETURN(NULL);
tab->read_record.table= table;
tab->read_record.file=table->file;
- /*tab->read_record.unlock_row= rr_unlock_row;*/
tab->next_select=0;
tab->sorted= 1;
+ tab->ref.key= key_no;
table->status= STATUS_NO_RECORD;
tab->read_first_record= join_read_key;
- /*tab->read_record.unlock_row= join_read_key_unlock_row;*/
tab->read_record.read_record= join_no_more_records;
if (table->covering_keys.is_set(tab->ref.key) &&
!table->no_keyread)
=== modified file 'sql/sql_subquery_cache.cc'
--- a/sql/sql_subquery_cache.cc 2010-05-31 21:25:54 +0000
+++ b/sql/sql_subquery_cache.cc 2010-06-08 11:41:56 +0000
@@ -225,7 +225,7 @@
(uchar*)&field_counter) < 0) ||
createtmp_table_search_structures(table_thd, cache_table, li_items,
&tab_ref) ||
- !(tab= create_index_lookup_join_tab(cache_table)))
+ !(tab= create_index_lookup_join_tab(cache_table, 0)))
{
DBUG_PRINT("error", ("creating index failed"));
goto error;