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
c2963e5f
Commit
c2963e5f
authored
Sep 30, 2024
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-35021 Behavior for RTREE indexes changed, assertion fails
disallow USING RTREE for not SPATIAL index
parent
e5b48fae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
mysql-test/main/create_drop_index.result
mysql-test/main/create_drop_index.result
+8
-0
mysql-test/main/create_drop_index.test
mysql-test/main/create_drop_index.test
+10
-0
sql/sql_table.cc
sql/sql_table.cc
+1
-1
No files found.
mysql-test/main/create_drop_index.result
View file @
c2963e5f
...
...
@@ -42,3 +42,11 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE OR REPLACE INDEX IF NOT EXISTS i1 ON t1(b,a);
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
#
# MDEV-35021 Behavior for RTREE indexes changed, assertion fails
#
create table t (f int not null);
create index ind using rtree on t (f);
ERROR HY000: Incorrect arguments to RTREE INDEX
drop table t;
# End of 11.7 tests
mysql-test/main/create_drop_index.test
View file @
c2963e5f
...
...
@@ -14,3 +14,13 @@ DROP TABLE t1;
--
error
ER_WRONG_USAGE
CREATE
OR
REPLACE
INDEX
IF
NOT
EXISTS
i1
ON
t1
(
b
,
a
);
--
echo
#
--
echo
# MDEV-35021 Behavior for RTREE indexes changed, assertion fails
--
echo
#
create
table
t
(
f
int
not
null
);
--
error
ER_WRONG_ARGUMENTS
create
index
ind
using
rtree
on
t
(
f
);
drop
table
t
;
--
echo
# End of 11.7 tests
sql/sql_table.cc
View file @
c2963e5f
...
...
@@ -3347,7 +3347,7 @@ mysql_prepare_create_table_finalize(THD *thd, HA_CREATE_INFO *create_info,
my_error
(
ER_TABLE_CANT_HANDLE_SPKEYS
,
MYF
(
0
),
file
->
table_type
());
DBUG_RETURN
(
TRUE
);
}
if
(
key_info
->
user_defined_key_parts
!=
1
)
if
(
key
->
type
!=
Key
::
SPATIAL
||
key
_info
->
user_defined_key_parts
!=
1
)
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
"RTREE INDEX"
);
DBUG_RETURN
(
TRUE
);
...
...
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