mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#15130: CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT.
When the SQL_BIG_RESULT flag is specified SELECT should store items from the select list in the filesort data and use them when sending to a client. The get_addon_fields function is responsible for creating necessary structures for that. But this function was allowed to do so only for SELECT and INSERT .. SELECT queries. This makes the SQL_BIG_RESULT useless for the CREATE .. SELECT queries. Now the get_addon_fields allows storing select list items in the filesort data for the CREATE .. SELECT queries.
This commit is contained in:
@@ -1119,4 +1119,14 @@ show create table t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# Bug#15130:CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT.
|
||||
#
|
||||
create table t1(f1 int,f2 int);
|
||||
insert into t1 value(1,1),(1,2),(1,3),(2,1),(2,2),(2,3);
|
||||
flush status;
|
||||
create table t2 select sql_big_result f1,count(f2) from t1 group by f1;
|
||||
show status like 'handler_read%';
|
||||
drop table t1,t2;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
Reference in New Issue
Block a user