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
4089296a
Commit
4089296a
authored
Jan 08, 2024
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-22164 revert "make THAN optional"
parent
7ee16b1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
15 deletions
+9
-15
mysql-test/suite/parts/r/alter_table.result
mysql-test/suite/parts/r/alter_table.result
+4
-5
mysql-test/suite/parts/t/alter_table.test
mysql-test/suite/parts/t/alter_table.test
+4
-5
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-5
No files found.
mysql-test/suite/parts/r/alter_table.result
View file @
4089296a
...
...
@@ -366,8 +366,7 @@ drop table validation;
create table t (a int primary key);
create table tp (a int primary key) partition by range (a) (
partition p0 values less than (100),
# Cunning syntax (same as above)
p1 values less (300));
p1 values less than (300));
insert into t values (1), (99);
insert into tp values (2), (200);
select * from t order by a;
...
...
@@ -486,11 +485,11 @@ a
200
drop prepare validation;
drop prepare without_validation;
alter table tp convert table t to partition p2 values less (maxvalue);
alter table tp convert table t to partition p2 values less
than
(maxvalue);
ERROR HY000: Found a row that does not match the partition
alter table tp convert table t to partition p2 values less (maxvalue) with validation;
alter table tp convert table t to partition p2 values less
than
(maxvalue) with validation;
ERROR HY000: Found a row that does not match the partition
alter table tp convert table t to partition p2 values less (maxvalue) without validation;
alter table tp convert table t to partition p2 values less
than
(maxvalue) without validation;
select * from tp partition (p0) order by a;
a
2
...
...
mysql-test/suite/parts/t/alter_table.test
View file @
4089296a
...
...
@@ -331,8 +331,7 @@ create table t (a int primary key);
create
table
tp
(
a
int
primary
key
)
partition
by
range
(
a
)
(
partition
p0
values
less
than
(
100
),
# Cunning syntax (same as above)
p1
values
less
(
300
));
p1
values
less
than
(
300
));
insert
into
t
values
(
1
),
(
99
);
insert
into
tp
values
(
2
),
(
200
);
...
...
@@ -407,10 +406,10 @@ drop prepare without_validation;
# CONVERT IN
--
error
ER_ROW_DOES_NOT_MATCH_PARTITION
alter
table
tp
convert
table
t
to
partition
p2
values
less
(
maxvalue
);
alter
table
tp
convert
table
t
to
partition
p2
values
less
than
(
maxvalue
);
--
error
ER_ROW_DOES_NOT_MATCH_PARTITION
alter
table
tp
convert
table
t
to
partition
p2
values
less
(
maxvalue
)
with
validation
;
alter
table
tp
convert
table
t
to
partition
p2
values
less
(
maxvalue
)
without
validation
;
alter
table
tp
convert
table
t
to
partition
p2
values
less
than
(
maxvalue
)
with
validation
;
alter
table
tp
convert
table
t
to
partition
p2
values
less
than
(
maxvalue
)
without
validation
;
select
*
from
tp
partition
(
p0
)
order
by
a
;
select
*
from
tp
partition
(
p1
)
order
by
a
;
select
*
from
tp
partition
(
p2
)
order
by
a
;
...
...
sql/sql_yacc.yy
View file @
4089296a
...
...
@@ -4960,10 +4960,6 @@ part_name:
}
;
opt_than:
/* empty */
| THAN_SYM;
opt_part_values:
/* empty */
{
...
...
@@ -4981,7 +4977,7 @@ opt_part_values:
else
part_info->part_type= HASH_PARTITION;
}
| VALUES_LESS_SYM
opt_than
| VALUES_LESS_SYM
THAN_SYM
{
LEX *lex= Lex;
partition_info *part_info= lex->part_info;
...
...
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