diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-11-22 13:05:10 +0300 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-11-22 13:05:10 +0300 |
commit | 4389be7557d4367cbdc9ec64c4ce4494e54e2822 (patch) | |
tree | 1468219151ed11a517ea8241f83b9f4b8f952ff2 /sql/sql_do.cc | |
parent | fe37a1472c22b0a48244b932664925cad68f3e96 (diff) | |
download | mariadb-git-4389be7557d4367cbdc9ec64c4ce4494e54e2822.tar.gz |
Fix for bug #6462 "Same request on same data returns different
results." a.k.a. "Proper cleanup of subqueries is missing for SET and DO
statements". (Version #2 with after-review fixes).
To perform proper cleanup for statements that can contain subqueries
but don't have main select we must call free_undelaid_joins().
mysql-test/r/subselect.result:
Added test for bug #6462 "Same request on same data returns different
results." a.k.a. "Proper cleanup of subqueries is missing for SET and DO
statements".
mysql-test/t/subselect.test:
Added test for bug #6462 "Same request on same data returns different
results." a.k.a. "Proper cleanup of subqueries is missing for SET and DO
statements".
sql/set_var.cc:
Added missing cleanup of joins used in subqueries to SET statement.
sql/sql_do.cc:
Added missing cleanup of joins used in subqueries to DO statement.
Diffstat (limited to 'sql/sql_do.cc')
-rw-r--r-- | sql/sql_do.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_do.cc b/sql/sql_do.cc index 25a8359f3d2..0d4529fb29e 100644 --- a/sql/sql_do.cc +++ b/sql/sql_do.cc @@ -29,6 +29,7 @@ int mysql_do(THD *thd, List<Item> &values) DBUG_RETURN(-1); while ((value = li++)) value->val_int(); + free_underlaid_joins(thd, &thd->lex->select_lex); thd->clear_error(); // DO always is OK send_ok(thd); DBUG_RETURN(0); |