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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
Hide 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 \
sql_map.h sql_string.h unireg.h
\
field.h handler.h ha_isammrg.h ha_isam.h ha_myisammrg.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
\
lex.h lex_symbol.h sql_acl.h sql_crypt.h md5.h
\
log_event.h mini_client.h sql_repl.h
...
...
@@ -62,7 +62,7 @@ mysqld_SOURCES = sql_lex.cc \
sql_update.cc sql_delete.cc
\
procedure.cc item_uniq.cc sql_test.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
\
ha_isam.cc ha_isammrg.cc ha_heap.cc
\
ha_myisam.cc ha_myisammrg.cc ha_berkeley.cc
\
...
...
sql/filesort.cc
View file @
c286021a
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...
...
@@ -115,10 +115,10 @@ ha_rows filesort(TABLE **table, SORT_FIELD *sortorder, uint s_length,
param
.
ref_length
=
table
[
0
]
->
file
->
ref_length
;
param
.
sort_length
=
sortlength
(
sortorder
,
s_length
)
+
param
.
ref_length
;
param
.
max_rows
=
max_rows
;
if
(
select
&&
select
->
quick
)
{
statistic_increment
(
filesort_range_count
,
&
LOCK_status
);
statistic_increment
(
filesort_range_count
,
&
LOCK_status
);
}
else
{
...
...
@@ -336,6 +336,10 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
file
->
extra
(
HA_EXTRA_CACHE
);
/* Quicker reads */
}
if
(
quick_select
)
error
=
select
->
quick
->
init
();
if
(
!
error
)
for
(;;)
{
if
(
quick_select
)
...
...
@@ -369,7 +373,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
record
+=
sort_form
->
db_record_offset
;
}
else
file
->
position
(
sort_form
->
record
[
0
]);
file
->
position
(
sort_form
->
record
[
0
]);
}
if
(
error
&&
error
!=
HA_ERR_RECORD_DELETED
)
break
;
...
...
sql/opt_range.cc
View file @
c286021a
...
...
@@ -19,11 +19,11 @@
Fix that MAYBE_KEY are stored in the tree so that we can detect use
of full hash keys for queries like:
select s.id, kws.keyword_id from sites as s,kws where s.id=kws.site_id and kws.keyword_id in (204,205);
select s.id, kws.keyword_id from sites as s,kws where s.id=kws.site_id and kws.keyword_id in (204,205);
*/
#ifdef __GNUC__
#pragma implementation // gcc: Class implementation
...
...
sql/opt_range.h
View file @
c286021a
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...
...
@@ -73,12 +73,12 @@ public:
QUICK_SELECT
(
TABLE
*
table
,
uint
index_arg
,
bool
no_alloc
=
0
);
~
QUICK_SELECT
();
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
);
bool
unique_key_range
();
};
class
SQL_SELECT
:
public
Sql_alloc
{
public:
QUICK_SELECT
*
quick
;
// If quick-select used
...
...
sql/sql_select.cc
View file @
c286021a
...
...
@@ -23,6 +23,7 @@
#include "mysql_priv.h"
#include "sql_select.h"
#include "opt_ft.h"
#include <m_ctype.h>
#include <hash.h>
#include <ft_global.h>
...
...
@@ -4357,7 +4358,7 @@ join_ft_read_first(JOIN_TAB *tab)
#if 0
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
if
((
error
=
table
->
file
->
ft_init
(
tab
->
ref
.
key
,
tab
->
ref
.
key_buff
,
...
...
@@ -5052,13 +5053,13 @@ create_sort_index(JOIN_TAB *tab,ORDER *order,ha_rows select_limit)
}
}
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
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
;
}
}
...
...
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