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

Cleaned up rnd_init

This commit is contained in:
mskold@mysql.com
2004-08-24 23:13:32 +02:00
parent 4ca548bcc6
commit a2bcb2a558
3 changed files with 1014 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@ -206,6 +206,10 @@ select * from t4 where a = 7 and b = 16 order by a;
select * from t4 where a = 7 and b = 17 order by a;
select * from t4 where a = 7 and b != 16 order by b;
select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a;
select a, b FROM t2 outer_table where
a = (select a from t2 where b = outer_table.b ) order by a;
#
# update records
#

View File

@ -2013,10 +2013,12 @@ int ha_ndbcluster::rnd_init(bool scan)
DBUG_ENTER("rnd_init");
DBUG_PRINT("enter", ("scan: %d", scan));
// Check if scan is to be restarted
if (cursor && scan)
cursor->restart();
else
if (cursor)
{
if (!scan)
DBUG_RETURN(1);
cursor->restart();
}
index_init(table->primary_key);
DBUG_RETURN(0);
}