[MDEV-9736] Window functions: multiple cursors to read filesort result Created: 2016-03-15  Updated: 2023-10-12

Status: Open
Project: MariaDB Server
Component/s: Optimizer - Window functions
Fix Version/s: None

Type: Task Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-6115 window functions as in the SQL standard Closed
Sprint: 10.2.2-1

 Description   

This is to keep track of a known task:

Computation of window function value involves moving multiple cursors through the result of filesort:

  • frame bound #1 (Implemented in classes produced by get_frame_cursor())
  • frame bound #2 (Implemented in classes produced by get_frame_cursor())
  • current row ( has no explicit cursor, just calls read_record.read_record()).

right now, we are using "stub" code that only works when filesort result fits into an in-memory buffer:

bool clone_read_record(const READ_RECORD *src, READ_RECORD *dst)
{
  DBUG_ASSERT(src->table->sort.record_pointers);
  DBUG_ASSERT(src->read_record == rr_from_pointers);
  memcpy(dst, src, sizeof(READ_RECORD));
  return false;
}

This task is about being able to handle the case where filesort result didnt fit into the memory buffer and was partially dumped into a temp. file.



 Comments   
Comment by Sergei Petrunia [ 2016-09-23 ]

The "simple fix" (the one that supports tempfile sharing but doesn't do in-memory buffer sharing) is in this tree:
https://github.com/MariaDB/server/tree/bb-10.2-mdev9736

cvicentiu, you can merge from this.

Comment by Ralf Gebhardt [ 2023-10-12 ]

I have removed the fixVersion for this task as it is one of 5.5, 10.1, 10.2, 10.3, which are EOLed.

Please add a new fixVersion if you plan to work on this task for a not EOLed versions.

Generated at Thu Feb 08 07:36:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.