1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

after review & some other fixes

This commit is contained in:
bell@sanja.is.com.ua
2004-03-16 20:19:36 +02:00
parent 446b1bd260
commit 579a94a328
4 changed files with 10 additions and 4 deletions

View File

@ -585,8 +585,9 @@ JOIN::optimize()
}
if (const_table_map != found_const_table_map &&
!(select_options & SELECT_DESCRIBE) &&
!((conds->used_tables() & RAND_TABLE_BIT) &&
select_lex->master_unit() != &thd->lex->unit))// not upper level SELECT
(!conds ||
!(conds->used_tables() & RAND_TABLE_BIT) ||
select_lex->master_unit() == &thd->lex->unit)) // upper level SELECT
{
zero_result_cause= "no matching row in const table";
DBUG_PRINT("error",("Error: %s", zero_result_cause));