mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 20:25:32 +02:00
Fix for MDEV-5891 - ensure select on empty backing table works.
This commit is contained in:
parent
f77539092d
commit
a4a78e3c33
1 changed files with 6 additions and 1 deletions
|
|
@ -1122,7 +1122,12 @@ int edges_cursor::fetch_row(const row &row_info, row &result,
|
|||
// but origid and destid can be -1 indicating no such record, NULL? but oqgraph3::vertex_id
|
||||
// seems to resolve to VertexID (unsigned) in row
|
||||
// in any case we should check for errors (-1) in origid... because all edges have at least one vertex by definition
|
||||
assert( ! ((size_t)orig == (size_t)-1 && (size_t)dest == (size_t)-1)); // indicates we havent handle a HA_ERR_RECORD_DELETED somewhere
|
||||
if (orig == (oqgraph3::vertex_id)-1 && dest == (oqgraph3::vertex_id)-1) {
|
||||
// Select * from graph; -- when backing store is empty (bug MDEV-5891)
|
||||
return oqgraph::NO_MORE_DATA;
|
||||
}
|
||||
// assert( ! ((size_t)orig == (size_t)-1 && (size_t)dest == (size_t)-1));
|
||||
// indicates we havent handle a HA_ERR_RECORD_DELETED somewhere
|
||||
|
||||
result.orig= orig;
|
||||
result.dest= dest;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue