diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-09-06 00:42:17 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2009-09-06 00:42:17 +0400 |
commit | 505346028f975d26f1353c46bdb3db618b1e306c (patch) | |
tree | ec6023c667783a3acb6b0c473ee91313a5d74b8f /libmysql/libmysql.c | |
parent | 354f5f7bac16a688f8c851cbf866120871713105 (diff) | |
download | mariadb-git-505346028f975d26f1353c46bdb3db618b1e306c.tar.gz |
Bug #46159: simple query that never returns
The external 'for' loop in remove_dup_with_compare() handled
HA_ERR_RECORD_DELETED by just starting over without advancing
to the next record which caused an infinite loop.
This condition could be triggered on certain data by a SELECT
query containing DISTINCT, GROUP BY and HAVING clauses.
Fixed remove_dup_with_compare() so that we always advance to
the next record when receiving HA_ERR_RECORD_DELETED from
rnd_next().
mysql-test/r/distinct.result:
Added a test case for bug #46159.
mysql-test/t/distinct.test:
Added a test case for bug #46159.
sql/sql_select.cc:
Fixed remove_dup_with_compare() so that we always advance to
the next record when receiving HA_ERR_RECORD_DELETED from
rnd_next().
Diffstat (limited to 'libmysql/libmysql.c')
0 files changed, 0 insertions, 0 deletions