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

Merge mysql.com:/home/my/mysql-4.1

into  mysql.com:/home/my/mysql-5.0
This commit is contained in:
monty@mysql.com
2005-07-28 17:09:54 +03:00
360 changed files with 846 additions and 175 deletions

View File

@ -1198,7 +1198,14 @@ JOIN::exec()
{
result->send_fields(fields_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF);
if (cond_value != Item::COND_FALSE && (!having || having->val_int()))
/*
We have to test for 'conds' here as the WHERE may not be constant
even if we don't have any tables for prepared statements or if
conds uses something like 'rand()'.
*/
if (cond_value != Item::COND_FALSE &&
(!conds || conds->val_int()) &&
(!having || having->val_int()))
{
if (do_send_rows && (procedure ? (procedure->send_row(fields_list) ||
procedure->end_of_records())