summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2006-07-22 12:44:54 -0700
committerunknown <igor@olga.mysql.com>2006-07-22 12:44:54 -0700
commit43df9fd34c2d2b05a29b17e39920ab270f82d483 (patch)
treeb33f50c74503b37c77e5f0cc65e0aabf4054e84c /sql/sql_show.cc
parentf57bb34775c7482e15a6d067873730f9434726e8 (diff)
downloadmariadb-git-43df9fd34c2d2b05a29b17e39920ab270f82d483.tar.gz
Fixed bug #18925: wrong results for queries with
subqueries on information schema that use MIN/MAX aggregation. Execution of some correlated subqueries may set the value of null_row to 1 for tables used in the subquery. If the the subquery is on information schema it causes rejection of any row for the following executions of the subquery in the case when an optimization filtering by some condition is applied. The fix restores the value of the null_row flag for each execution of a subquery on information schema. mysql-test/r/information_schema.result: Added a test case for bug #18925. mysql-test/t/information_schema.test: Added a test case for bug #18925. sql/sql_show.cc: Fixed bug #18925. Execution of some correlated subqueries may set the value of null_row to 1 for tables used in the subquery. If the the subquery is on information schema it causes rejection of any row for the following execitions of the subquery in the case when an optimization filtering by some condition is applied. The fix restores the value of the null_row flag for each execution of a subquery on information schema.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index cabb04c5f16..e2adefb0ca9 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3963,6 +3963,7 @@ bool get_schema_tables_result(JOIN *join)
table_list->table->file->delete_all_rows();
free_io_cache(table_list->table);
filesort_free_buffers(table_list->table);
+ table_list->table->null_row= 0;
}
else
table_list->table->file->records= 0;