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
3a9eb4f6
Commit
3a9eb4f6
authored
Sep 27, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some ORDER BY ... DESC problems with InnoDB
parent
ffdff5f7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
+7
-6
sql/ha_heap.h
sql/ha_heap.h
+3
-2
sql/ha_isammrg.h
sql/ha_isammrg.h
+2
-2
sql/handler.h
sql/handler.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
sql/ha_heap.h
View file @
3a9eb4f6
...
@@ -41,13 +41,14 @@ class ha_heap: public handler
...
@@ -41,13 +41,14 @@ class ha_heap: public handler
{
{
return
(
HA_READ_RND_SAME
|
HA_NO_INDEX
|
HA_KEYPOS_TO_RNDPOS
|
return
(
HA_READ_RND_SAME
|
HA_NO_INDEX
|
HA_KEYPOS_TO_RNDPOS
|
HA_NO_BLOBS
|
HA_NULL_KEY
|
HA_REC_NOT_IN_SEQ
|
HA_NO_BLOBS
|
HA_NULL_KEY
|
HA_REC_NOT_IN_SEQ
|
HA_NO
T_READ_PREFIX_LAST
|
HA_NO
_AUTO_INCREMENT
);
HA_NO_AUTO_INCREMENT
);
}
}
ulong
index_flags
(
uint
inx
)
const
ulong
index_flags
(
uint
inx
)
const
{
{
return
((
table
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_BTREE
)
?
return
((
table
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_BTREE
)
?
(
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_ORDER
)
:
(
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_ORDER
)
:
(
HA_ONLY_WHOLE_INDEX
|
HA_WRONG_ASCII_ORDER
));
(
HA_ONLY_WHOLE_INDEX
|
HA_WRONG_ASCII_ORDER
|
HA_NOT_READ_PREFIX_LAST
));
}
}
uint
max_record_length
()
const
{
return
HA_MAX_REC_LENGTH
;
}
uint
max_record_length
()
const
{
return
HA_MAX_REC_LENGTH
;
}
uint
max_keys
()
const
{
return
MAX_KEY
;
}
uint
max_keys
()
const
{
return
MAX_KEY
;
}
...
...
sql/ha_isammrg.h
View file @
3a9eb4f6
...
@@ -33,9 +33,9 @@ class ha_isammrg: public handler
...
@@ -33,9 +33,9 @@ class ha_isammrg: public handler
const
char
*
table_type
()
const
{
return
"MRG_ISAM"
;
}
const
char
*
table_type
()
const
{
return
"MRG_ISAM"
;
}
const
char
**
bas_ext
()
const
;
const
char
**
bas_ext
()
const
;
ulong
table_flags
()
const
{
return
(
HA_READ_RND_SAME
|
HA_KEYPOS_TO_RNDPOS
|
ulong
table_flags
()
const
{
return
(
HA_READ_RND_SAME
|
HA_KEYPOS_TO_RNDPOS
|
HA_NOT_READ_PREFIX_LAST
|
HA_REC_NOT_IN_SEQ
);
}
HA_REC_NOT_IN_SEQ
);
}
ulong
index_flags
(
uint
idx
)
const
{
return
0
;
}
ulong
index_flags
(
uint
idx
)
const
{
return
HA_NOT_READ_PREFIX_LAST
;
}
uint
max_record_length
()
const
{
return
HA_MAX_REC_LENGTH
;
}
uint
max_record_length
()
const
{
return
HA_MAX_REC_LENGTH
;
}
uint
max_keys
()
const
{
return
0
;
}
uint
max_keys
()
const
{
return
0
;
}
uint
max_key_parts
()
const
{
return
0
;
}
uint
max_key_parts
()
const
{
return
0
;
}
...
...
sql/handler.h
View file @
3a9eb4f6
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
#define HA_READ_PREV 4
/* Read prev. record with same key */
#define HA_READ_PREV 4
/* Read prev. record with same key */
#define HA_READ_ORDER 8
/* Read through record-keys in order */
#define HA_READ_ORDER 8
/* Read through record-keys in order */
#define HA_ONLY_WHOLE_INDEX 16
/* Can't use part key searches */
#define HA_ONLY_WHOLE_INDEX 16
/* Can't use part key searches */
#define HA_NOT_READ_PREFIX_LAST 32
#define HA_NOT_READ_PREFIX_LAST 32
/* No support for index_read_last() */
#define HA_KEY_READ_ONLY 64
/* Support HA_EXTRA_KEYREAD */
#define HA_KEY_READ_ONLY 64
/* Support HA_EXTRA_KEYREAD */
/*
/*
...
...
sql/sql_select.cc
View file @
3a9eb4f6
...
@@ -5576,7 +5576,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
...
@@ -5576,7 +5576,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
Use a traversal function that starts by reading the last row
Use a traversal function that starts by reading the last row
with key part (A) and then traverse the index backwards.
with key part (A) and then traverse the index backwards.
*/
*/
if
(
table
->
file
->
table_flags
(
)
&
HA_NOT_READ_PREFIX_LAST
)
if
(
table
->
file
->
index_flags
(
ref_key
)
&
HA_NOT_READ_PREFIX_LAST
)
DBUG_RETURN
(
0
);
// Use filesort
DBUG_RETURN
(
0
);
// Use filesort
tab
->
read_first_record
=
join_read_last_key
;
tab
->
read_first_record
=
join_read_last_key
;
tab
->
read_record
.
read_record
=
join_read_prev_same
;
tab
->
read_record
.
read_record
=
join_read_prev_same
;
...
...
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