Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ec0c854c
Commit
ec0c854c
authored
Aug 07, 2005
by
ingo@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-4100
parents
c9e04f46
047c34e5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
5 deletions
+40
-5
mysql-test/r/fulltext_order_by.result
mysql-test/r/fulltext_order_by.result
+10
-0
mysql-test/t/fulltext_order_by.test
mysql-test/t/fulltext_order_by.test
+11
-0
sql/mysql_priv.h
sql/mysql_priv.h
+6
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
sql/sql_union.cc
sql/sql_union.cc
+12
-4
No files found.
mysql-test/r/fulltext_order_by.result
View file @
ec0c854c
...
@@ -159,4 +159,14 @@ match(c.beitrag) against ('+abc' in boolean mode)
...
@@ -159,4 +159,14 @@ match(c.beitrag) against ('+abc' in boolean mode)
order by
order by
match(betreff) against ('+abc' in boolean mode) desc;
match(betreff) against ('+abc' in boolean mode) desc;
text id betreff
text id betreff
(select b.id, b.betreff from t3 b) union
(select b.id, b.betreff from t3 b)
order by match(betreff) against ('+abc' in boolean mode) desc;
id betreff
select distinct b.id, b.betreff from t3 b
order by match(betreff) against ('+abc' in boolean mode) desc;
id betreff
select b.id, b.betreff from t3 b group by b.id+1
order by match(betreff) against ('+abc' in boolean mode) desc;
id betreff
drop table t1,t2,t3;
drop table t1,t2,t3;
mysql-test/t/fulltext_order_by.test
View file @
ec0c854c
...
@@ -133,6 +133,17 @@ where
...
@@ -133,6 +133,17 @@ where
order
by
order
by
match
(
betreff
)
against
(
'+abc'
in
boolean
mode
)
desc
;
match
(
betreff
)
against
(
'+abc'
in
boolean
mode
)
desc
;
# BUG#11869 part2: used table type doesn't support FULLTEXT indexes error
(
select
b
.
id
,
b
.
betreff
from
t3
b
)
union
(
select
b
.
id
,
b
.
betreff
from
t3
b
)
order
by
match
(
betreff
)
against
(
'+abc'
in
boolean
mode
)
desc
;
select
distinct
b
.
id
,
b
.
betreff
from
t3
b
order
by
match
(
betreff
)
against
(
'+abc'
in
boolean
mode
)
desc
;
select
b
.
id
,
b
.
betreff
from
t3
b
group
by
b
.
id
+
1
order
by
match
(
betreff
)
against
(
'+abc'
in
boolean
mode
)
desc
;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
# End of 4.1 tests
# End of 4.1 tests
sql/mysql_priv.h
View file @
ec0c854c
...
@@ -215,6 +215,12 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
...
@@ -215,6 +215,12 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
in the user query has requested */
in the user query has requested */
#define SELECT_ALL (1L << 29)
#define SELECT_ALL (1L << 29)
/*
Force the used temporary table to be a MyISAM table (because we will use
fulltext functions when reading from it.
*/
#define TMP_TABLE_FORCE_MYISAM (1L << 30)
/* If set to 0, then the thread will ignore all warnings with level notes.
/* If set to 0, then the thread will ignore all warnings with level notes.
Set by executing SET SQL_NOTES=1 */
Set by executing SET SQL_NOTES=1 */
#define OPTION_SQL_NOTES (1L << 31)
#define OPTION_SQL_NOTES (1L << 31)
...
...
sql/sql_select.cc
View file @
ec0c854c
...
@@ -5290,7 +5290,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -5290,7 +5290,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
/* If result table is small; use a heap */
/* If result table is small; use a heap */
if
(
blob_count
||
using_unique_constraint
||
if
(
blob_count
||
using_unique_constraint
||
(
select_options
&
(
OPTION_BIG_TABLES
|
SELECT_SMALL_RESULT
))
==
(
select_options
&
(
OPTION_BIG_TABLES
|
SELECT_SMALL_RESULT
))
==
OPTION_BIG_TABLES
)
OPTION_BIG_TABLES
||
(
select_options
&
TMP_TABLE_FORCE_MYISAM
)
)
{
{
table
->
file
=
get_new_handler
(
table
,
table
->
db_type
=
DB_TYPE_MYISAM
);
table
->
file
=
get_new_handler
(
table
,
table
->
db_type
=
DB_TYPE_MYISAM
);
if
(
group
&&
if
(
group
&&
...
...
sql/sql_union.cc
View file @
ec0c854c
...
@@ -296,15 +296,23 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
...
@@ -296,15 +296,23 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
goto
err
;
goto
err
;
}
}
}
}
ulong
create_options
=
first_select_in_union
()
->
options
|
thd_arg
->
options
|
TMP_TABLE_ALL_COLUMNS
;
/*
Force the temporary table to be a MyISAM table if we're going to use
fullext functions (MATCH ... AGAINST .. IN BOOLEAN MODE) when reading
from it.
*/
if
(
global_parameters
->
ftfunc_list
->
elements
)
create_options
=
create_options
|
TMP_TABLE_FORCE_MYISAM
;
union_result
->
tmp_table_param
.
field_count
=
types
.
elements
;
union_result
->
tmp_table_param
.
field_count
=
types
.
elements
;
if
(
!
(
table
=
create_tmp_table
(
thd_arg
,
if
(
!
(
table
=
create_tmp_table
(
thd_arg
,
&
union_result
->
tmp_table_param
,
types
,
&
union_result
->
tmp_table_param
,
types
,
(
ORDER
*
)
0
,
(
bool
)
union_distinct
,
1
,
(
ORDER
*
)
0
,
(
bool
)
union_distinct
,
1
,
(
first_select_in_union
()
->
options
|
create_options
,
HA_POS_ERROR
,
thd_arg
->
options
|
(
char
*
)
tmp_table_alias
)))
TMP_TABLE_ALL_COLUMNS
),
HA_POS_ERROR
,
(
char
*
)
tmp_table_alias
)))
goto
err
;
goto
err
;
table
->
file
->
extra
(
HA_EXTRA_WRITE_CACHE
);
table
->
file
->
extra
(
HA_EXTRA_WRITE_CACHE
);
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment