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
159b509c
Commit
159b509c
authored
Jan 28, 2008
by
mikael@dator6.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#33429: No check for maxvalue before adding partition
parent
dbcd4d9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
mysql-test/r/partition_range.result
mysql-test/r/partition_range.result
+11
-0
mysql-test/t/partition_range.test
mysql-test/t/partition_range.test
+11
-0
sql/sql_partition.cc
sql/sql_partition.cc
+6
-1
No files found.
mysql-test/r/partition_range.result
View file @
159b509c
drop table if exists t1, t2;
drop table if exists t1, t2;
create table t1 (a int)
partition by range (a)
( partition p0 values less than (maxvalue));
alter table t1 add partition (partition p1 values less than (100000));
ERROR HY000: MAXVALUE can only be used in last partition definition
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
drop table t1;
create table t1 (a int unsigned)
create table t1 (a int unsigned)
partition by range (a)
partition by range (a)
(partition pnull values less than (0),
(partition pnull values less than (0),
...
...
mysql-test/t/partition_range.test
View file @
159b509c
...
@@ -9,6 +9,17 @@
...
@@ -9,6 +9,17 @@
drop
table
if
exists
t1
,
t2
;
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
--
enable_warnings
#
# BUG 33429: Succeeds in adding partition when maxvalue on last partition
#
create
table
t1
(
a
int
)
partition
by
range
(
a
)
(
partition
p0
values
less
than
(
maxvalue
));
--
error
ER_PARTITION_MAXVALUE_ERROR
alter
table
t1
add
partition
(
partition
p1
values
less
than
(
100000
));
show
create
table
t1
;
drop
table
t1
;
#
#
# BUG 18198: Various tests for partition functions
# BUG 18198: Various tests for partition functions
#
#
...
...
sql/sql_partition.cc
View file @
159b509c
...
@@ -4313,7 +4313,12 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
...
@@ -4313,7 +4313,12 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
{
{
my_error
(
ER_NO_BINLOG_ERROR
,
MYF
(
0
));
my_error
(
ER_NO_BINLOG_ERROR
,
MYF
(
0
));
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
if
(
tab_part_info
->
defined_max_value
)
{
my_error
(
ER_PARTITION_MAXVALUE_ERROR
,
MYF
(
0
));
DBUG_RETURN
(
TRUE
);
}
if
(
no_new_partitions
==
0
)
if
(
no_new_partitions
==
0
)
{
{
my_error
(
ER_ADD_PARTITION_NO_NEW_PARTITION
,
MYF
(
0
));
my_error
(
ER_ADD_PARTITION_NO_NEW_PARTITION
,
MYF
(
0
));
...
...
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