1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/autopush/B27807-5.0-opt
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2007-05-04 10:57:14 +03:00
5 changed files with 59 additions and 8 deletions

View File

@ -1426,14 +1426,13 @@ JOIN::optimize()
}
}
if (select_lex->uncacheable && !is_top_level_join())
{
/* If this join belongs to an uncacheable subquery */
if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN))))
DBUG_RETURN(-1);
error= 0; // Ensure that tmp_join.error= 0
restore_tmp();
}
/*
If this join belongs to an uncacheable subquery save
the original join
*/
if (select_lex->uncacheable && !is_top_level_join() &&
init_save_join_tab())
DBUG_RETURN(-1);
}
error= 0;
@ -1495,6 +1494,27 @@ JOIN::reinit()
DBUG_RETURN(0);
}
/**
@brief Save the original join layout
@details Saves the original join layout so it can be reused in
re-execution and for EXPLAIN.
@return Operation status
@retval 0 success.
@retval 1 error occurred.
*/
bool
JOIN::init_save_join_tab()
{
if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN))))
return 1;
error= 0; // Ensure that tmp_join.error= 0
restore_tmp();
return 0;
}
bool
JOIN::save_join_tab()