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
ae8600d5
Commit
ae8600d5
authored
Jan 03, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-27408 DESC index on a Mroonga table causes wrong order of result set
disallow descending indexes in mroonga
parent
918f5244
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
storage/mroonga/ha_mroonga.cpp
storage/mroonga/ha_mroonga.cpp
+8
-0
storage/mroonga/mysql-test/mroonga/storage/r/index_desc.result
...ge/mroonga/mysql-test/mroonga/storage/r/index_desc.result
+9
-0
storage/mroonga/mysql-test/mroonga/storage/t/index_desc.test
storage/mroonga/mysql-test/mroonga/storage/t/index_desc.test
+15
-0
No files found.
storage/mroonga/ha_mroonga.cpp
View file @
ae8600d5
...
...
@@ -3844,6 +3844,14 @@ int ha_mroonga::storage_create_validate_index(TABLE *table)
KEY
*
key_info
=
&
(
table
->
s
->
key_info
[
i
]);
// must be single column key
int
key_parts
=
KEY_N_KEY_PARTS
(
key_info
);
for
(
int
j
=
0
;
j
<
key_parts
;
j
++
)
{
if
(
key_info
->
key_part
[
j
].
key_part_flag
&
HA_REVERSE_SORT
)
{
GRN_LOG
(
ctx
,
GRN_LOG_ERROR
,
"DESC indexes are not supported"
);
error
=
ER_CANT_CREATE_TABLE
;
my_message
(
error
,
"DESC indexes are not supported"
,
MYF
(
0
));
DBUG_RETURN
(
error
);
}
}
if
(
key_parts
!=
1
)
{
continue
;
}
...
...
storage/mroonga/mysql-test/mroonga/storage/r/index_desc.result
0 → 100644
View file @
ae8600d5
#
# MDEV-27408 DESC index on a Mroonga table causes wrong order of result set
#
create table t1 (a int, key(a desc));
ERROR HY000: DESC indexes are not supported
show warnings;
Level Code Message
Error 1005 DESC indexes are not supported
Warning 1030 Got error 1005 "Unknown error 1005" from storage engine Mroonga
storage/mroonga/mysql-test/mroonga/storage/t/index_desc.test
0 → 100644
View file @
ae8600d5
--
source
../../
include
/
mroonga
/
have_mroonga
.
inc
--
echo
#
--
echo
# MDEV-27408 DESC index on a Mroonga table causes wrong order of result set
--
echo
#
--
error
ER_CANT_CREATE_TABLE
create
table
t1
(
a
int
,
key
(
a
desc
));
show
warnings
;
#show create table t1;
#insert into t1 values (1),(3),(2);
#select * from t1 order by a;
#drop table t1;
--
source
../../
include
/
mroonga
/
have_mroonga_deinit
.
inc
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