mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
A fix and a test case for Bug#9520 "SELECT DISTINCT crashes server
with cursor". The patch refactors do_select/sub_select functions, which implement the nested loop algorithm, and reuses them to fetch rows for cursors as well. Pushing with view.test failing (--ps-protocol).
This commit is contained in:
@@ -2223,7 +2223,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
|
||||
my_pthread_setprio(pthread_self(), QUERY_PRIOR);
|
||||
|
||||
thd->protocol= &thd->protocol_prep; // Switch to binary protocol
|
||||
(void) stmt->cursor->fetch(num_rows);
|
||||
stmt->cursor->fetch(num_rows);
|
||||
thd->protocol= &thd->protocol_simple; // Use normal protocol
|
||||
|
||||
if (!(specialflag & SPECIAL_NO_PRIOR))
|
||||
|
Reference in New Issue
Block a user