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
c286021a
Commit
c286021a
authored
Oct 07, 2000
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ORDER BY works with FULLTEXT keys
parent
47d38f68
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
19 deletions
+24
-19
sql/Makefile.am
sql/Makefile.am
+2
-2
sql/filesort.cc
sql/filesort.cc
+10
-6
sql/opt_range.cc
sql/opt_range.cc
+3
-3
sql/opt_range.h
sql/opt_range.h
+5
-5
sql/sql_select.cc
sql/sql_select.cc
+4
-3
No files found.
sql/Makefile.am
View file @
c286021a
...
@@ -45,7 +45,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
...
@@ -45,7 +45,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
sql_map.h sql_string.h unireg.h
\
sql_map.h sql_string.h unireg.h
\
field.h handler.h ha_isammrg.h ha_isam.h ha_myisammrg.h
\
field.h handler.h ha_isammrg.h ha_isam.h ha_myisammrg.h
\
ha_heap.h ha_myisam.h ha_berkeley.h
\
ha_heap.h ha_myisam.h ha_berkeley.h
\
opt_range.h
\
opt_range.h
opt_ft.h
\
sql_select.h structs.h table.h sql_udf.h hash_filo.h
\
sql_select.h structs.h table.h sql_udf.h hash_filo.h
\
lex.h lex_symbol.h sql_acl.h sql_crypt.h md5.h
\
lex.h lex_symbol.h sql_acl.h sql_crypt.h md5.h
\
log_event.h mini_client.h sql_repl.h
log_event.h mini_client.h sql_repl.h
...
@@ -62,7 +62,7 @@ mysqld_SOURCES = sql_lex.cc \
...
@@ -62,7 +62,7 @@ mysqld_SOURCES = sql_lex.cc \
sql_update.cc sql_delete.cc
\
sql_update.cc sql_delete.cc
\
procedure.cc item_uniq.cc sql_test.cc
\
procedure.cc item_uniq.cc sql_test.cc
\
log.cc init.cc derror.cc sql_acl.cc unireg.cc
\
log.cc init.cc derror.cc sql_acl.cc unireg.cc
\
time.cc opt_range.cc opt_sum.cc
\
time.cc opt_range.cc opt_sum.cc
opt_ft.cc
\
records.cc filesort.cc handler.cc
\
records.cc filesort.cc handler.cc
\
ha_isam.cc ha_isammrg.cc ha_heap.cc
\
ha_isam.cc ha_isammrg.cc ha_heap.cc
\
ha_myisam.cc ha_myisammrg.cc ha_berkeley.cc
\
ha_myisam.cc ha_myisammrg.cc ha_berkeley.cc
\
...
...
sql/filesort.cc
View file @
c286021a
...
@@ -336,6 +336,10 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
...
@@ -336,6 +336,10 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
file
->
extra
(
HA_EXTRA_CACHE
);
/* Quicker reads */
file
->
extra
(
HA_EXTRA_CACHE
);
/* Quicker reads */
}
}
if
(
quick_select
)
error
=
select
->
quick
->
init
();
if
(
!
error
)
for
(;;)
for
(;;)
{
{
if
(
quick_select
)
if
(
quick_select
)
...
...
sql/opt_range.cc
View file @
c286021a
sql/opt_range.h
View file @
c286021a
...
@@ -73,12 +73,12 @@ class QUICK_SELECT {
...
@@ -73,12 +73,12 @@ class QUICK_SELECT {
QUICK_SELECT
(
TABLE
*
table
,
uint
index_arg
,
bool
no_alloc
=
0
);
QUICK_SELECT
(
TABLE
*
table
,
uint
index_arg
,
bool
no_alloc
=
0
);
~
QUICK_SELECT
();
~
QUICK_SELECT
();
void
reset
(
void
)
{
next
=
0
;
it
.
rewind
();
}
void
reset
(
void
)
{
next
=
0
;
it
.
rewind
();
}
int
get_next
();
virtual
int
init
()
{
return
0
;
}
virtual
int
get_next
();
int
cmp_next
(
QUICK_RANGE
*
range
);
int
cmp_next
(
QUICK_RANGE
*
range
);
bool
unique_key_range
();
bool
unique_key_range
();
};
};
class
SQL_SELECT
:
public
Sql_alloc
{
class
SQL_SELECT
:
public
Sql_alloc
{
public:
public:
QUICK_SELECT
*
quick
;
// If quick-select used
QUICK_SELECT
*
quick
;
// If quick-select used
...
...
sql/sql_select.cc
View file @
c286021a
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "mysql_priv.h"
#include "mysql_priv.h"
#include "sql_select.h"
#include "sql_select.h"
#include "opt_ft.h"
#include <m_ctype.h>
#include <m_ctype.h>
#include <hash.h>
#include <hash.h>
#include <ft_global.h>
#include <ft_global.h>
...
@@ -4357,7 +4358,7 @@ join_ft_read_first(JOIN_TAB *tab)
...
@@ -4357,7 +4358,7 @@ join_ft_read_first(JOIN_TAB *tab)
#if 0
#if 0
if (cp_buffer_from_ref(&tab->ref)) // as ft-key doesn't use store_key's
if (cp_buffer_from_ref(&tab->ref)) // as ft-key doesn't use store_key's
return -1;
return -1;
// see also FT_SELECT::init()
#endif
#endif
if
((
error
=
table
->
file
->
ft_init
(
tab
->
ref
.
key
,
if
((
error
=
table
->
file
->
ft_init
(
tab
->
ref
.
key
,
tab
->
ref
.
key_buff
,
tab
->
ref
.
key_buff
,
...
@@ -5052,13 +5053,13 @@ create_sort_index(JOIN_TAB *tab,ORDER *order,ha_rows select_limit)
...
@@ -5052,13 +5053,13 @@ create_sort_index(JOIN_TAB *tab,ORDER *order,ha_rows select_limit)
}
}
}
}
else
else
if
(
tab
->
type
!=
JT_FT
)
/* Beware! SerG */
//
if (tab->type != JT_FT) /* Beware! SerG */
{
{
/*
/*
We have a ref on a const; Change this to a range that filesort
We have a ref on a const; Change this to a range that filesort
can use.
can use.
*/
*/
if
(
!
(
select
->
quick
=
get_
quick_select_for_ref
(
table
,
&
tab
->
ref
)))
if
(
!
(
select
->
quick
=
get_
ft_or_quick_select_for_ref
(
table
,
tab
)))
goto
err
;
goto
err
;
}
}
}
}
...
...
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