mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixes for offset bug in UNION's and making UNION's obey
SELECT_DEFAULT_LIMIT Docs/manual.texi: Monty forced me to do this
This commit is contained in:
@ -48762,6 +48762,16 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
|
|||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
|
Fixed bug in UNION's with last offset being transposed to total result set
|
||||||
|
@item
|
||||||
|
Fixed that DEFAULT_SELECT_LIMIT is always imposed on UNION's result set
|
||||||
|
@item
|
||||||
|
Fixed that some SELECT options can appear only in the first SELECT
|
||||||
|
@item
|
||||||
|
Fixed bug with LIMIT with UNION, where last select is in the braces
|
||||||
|
@item
|
||||||
|
Fixed that fulltext works fine with UNION's
|
||||||
|
@item
|
||||||
Fixed bug with indexless boolean full-text search.
|
Fixed bug with indexless boolean full-text search.
|
||||||
@item
|
@item
|
||||||
Fixed bug that sometimes appeared when full-text search was used
|
Fixed bug that sometimes appeared when full-text search was used
|
||||||
|
@ -177,4 +177,14 @@ a
|
|||||||
11
|
11
|
||||||
12
|
12
|
||||||
13
|
13
|
||||||
|
(select * from t1 limit 2) union (select * from t2 limit 20,3);
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
set SQL_SELECT_LIMIT=2;
|
||||||
|
(select * from t1 limit 2) union (select * from t2 limit 3);
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
set SQL_SELECT_LIMIT=DEFAULT;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
@ -84,4 +84,8 @@ insert into t1 values (1),(2),(3),(4),(5);
|
|||||||
insert into t2 values (11),(12),(13),(14),(15);
|
insert into t2 values (11),(12),(13),(14),(15);
|
||||||
(select * from t1 limit 2) union (select * from t2 limit 3) limit 4;
|
(select * from t1 limit 2) union (select * from t2 limit 3) limit 4;
|
||||||
(select * from t1 limit 2) union (select * from t2 limit 3);
|
(select * from t1 limit 2) union (select * from t2 limit 3);
|
||||||
|
(select * from t1 limit 2) union (select * from t2 limit 20,3);
|
||||||
|
set SQL_SELECT_LIMIT=2;
|
||||||
|
(select * from t1 limit 2) union (select * from t2 limit 3);
|
||||||
|
set SQL_SELECT_LIMIT=DEFAULT;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
@ -186,7 +186,10 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
|
|||||||
thd->options&= ~OPTION_FOUND_ROWS;
|
thd->options&= ~OPTION_FOUND_ROWS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
thd->select_limit= HA_POS_ERROR; // no limit
|
{
|
||||||
|
thd->offset_limit= 0;
|
||||||
|
thd->select_limit= thd->default_select_limit;
|
||||||
|
}
|
||||||
if (describe)
|
if (describe)
|
||||||
thd->select_limit= HA_POS_ERROR; // no limit
|
thd->select_limit= HA_POS_ERROR; // no limit
|
||||||
res=mysql_select(thd,&result_table_list,
|
res=mysql_select(thd,&result_table_list,
|
||||||
|
Reference in New Issue
Block a user