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
23cb067a
Commit
23cb067a
authored
Jul 31, 2006
by
mikael/pappa@dator5.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#18198: More fixes
parent
d870e355
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
30 deletions
+28
-30
mysql-test/r/partition.result
mysql-test/r/partition.result
+0
-5
mysql-test/r/partition_error.result
mysql-test/r/partition_error.result
+1
-1
mysql-test/r/partition_pruning.result
mysql-test/r/partition_pruning.result
+3
-9
mysql-test/t/partition.test
mysql-test/t/partition.test
+7
-5
mysql-test/t/partition_error.test
mysql-test/t/partition_error.test
+1
-1
mysql-test/t/partition_pruning.test
mysql-test/t/partition_pruning.test
+11
-7
sql/sql_partition.cc
sql/sql_partition.cc
+5
-2
No files found.
mysql-test/r/partition.result
View file @
23cb067a
...
@@ -750,11 +750,6 @@ t2 CREATE TABLE `t2` (
...
@@ -750,11 +750,6 @@ t2 CREATE TABLE `t2` (
PRIMARY KEY (`a`)
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='no comment' /*!50100 PARTITION BY KEY (a) */
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='no comment' /*!50100 PARTITION BY KEY (a) */
drop table t2;
drop table t2;
create table t1 (s1 char(2) character set utf8)
partition by list (cast(s1 as signed))
(partition p1 values in (1),
partition p2 values in (2));
drop table t1;
create table t1 (f1 int) partition by hash (f1) as select 1;
create table t1 (f1 int) partition by hash (f1) as select 1;
drop table t1;
drop table t1;
prepare stmt1 from 'create table t1 (s1 int) partition by hash (s1)';
prepare stmt1 from 'create table t1 (s1 int) partition by hash (s1)';
...
...
mysql-test/r/partition_error.result
View file @
23cb067a
...
@@ -641,7 +641,7 @@ ERROR HY000: Partition constant is out of partition function domain
...
@@ -641,7 +641,7 @@ ERROR HY000: Partition constant is out of partition function domain
create table t1 (v varchar(12))
create table t1 (v varchar(12))
partition by range (ascii(v))
partition by range (ascii(v))
(partition p0 values less than (10));
(partition p0 values less than (10));
drop table t1;
ERROR HY000: This partition function is not allowed
create table t1 (a int)
create table t1 (a int)
partition by hash (rand(a));
partition by hash (rand(a));
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
...
...
mysql-test/r/partition_pruning.result
View file @
23cb067a
...
@@ -284,13 +284,6 @@ explain partitions select * from t9 where a <= '2004-12-19';
...
@@ -284,13 +284,6 @@ explain partitions select * from t9 where a <= '2004-12-19';
id select_type table partitions type possible_keys key key_len ref rows Extra
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t9 p0,p1 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE t9 p0,p1 ALL NULL NULL NULL NULL 2 Using where
drop table t5,t6,t7,t8,t9;
drop table t5,t6,t7,t8,t9;
create table t1 (a enum('a','b','c','d') default 'a')
partition by hash (ascii(a)) partitions 2;
insert into t1 values ('a'),('b'),('c');
explain partitions select * from t1 where a='b';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 3 Using where
drop table t1;
create table t1 (
create table t1 (
a1 int not null
a1 int not null
)
)
...
@@ -643,8 +636,9 @@ f_int1 f_int2
...
@@ -643,8 +636,9 @@ f_int1 f_int2
8 8
8 8
9 9
9 9
drop table t1;
drop table t1;
create table t1 (a char(10)) partition by list(length(a)) (
create table t1 (a char(10) binary)
partition p1 values in (1),
partition by list(length(a))
(partition p1 values in (1),
partition p2 values in (2),
partition p2 values in (2),
partition p3 values in (3),
partition p3 values in (3),
partition p4 values in (4),
partition p4 values in (4),
...
...
mysql-test/t/partition.test
View file @
23cb067a
...
@@ -883,11 +883,13 @@ drop table t2;
...
@@ -883,11 +883,13 @@ drop table t2;
#
#
# Bug#14367: Partitions: crash if utf8 column
# Bug#14367: Partitions: crash if utf8 column
#
#
create
table
t1
(
s1
char
(
2
)
character
set
utf8
)
# utf columns not supported after Bug #18198 is fixed
partition
by
list
(
cast
(
s1
as
signed
))
#
(
partition
p1
values
in
(
1
),
#create table t1 (s1 char(2) character set utf8)
partition
p2
values
in
(
2
));
#partition by list (cast(s1 as signed))
drop
table
t1
;
#(partition p1 values in (1),
# partition p2 values in (2));
#drop table t1;
#
#
# Bug#15336 Partitions: crash if create table as select
# Bug#15336 Partitions: crash if create table as select
...
...
mysql-test/t/partition_error.test
View file @
23cb067a
...
@@ -809,10 +809,10 @@ partition by range (a)
...
@@ -809,10 +809,10 @@ partition by range (a)
#
#
# Bug 18198 Partitions: Verify that erroneus partition functions doesn't work
# Bug 18198 Partitions: Verify that erroneus partition functions doesn't work
#
#
--
error
ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create
table
t1
(
v
varchar
(
12
))
create
table
t1
(
v
varchar
(
12
))
partition
by
range
(
ascii
(
v
))
partition
by
range
(
ascii
(
v
))
(
partition
p0
values
less
than
(
10
));
(
partition
p0
values
less
than
(
10
));
drop
table
t1
;
--
error
1064
--
error
1064
create
table
t1
(
a
int
)
create
table
t1
(
a
int
)
...
...
mysql-test/t/partition_pruning.test
View file @
23cb067a
...
@@ -238,11 +238,14 @@ explain partitions select * from t9 where a <= '2004-12-19';
...
@@ -238,11 +238,14 @@ explain partitions select * from t9 where a <= '2004-12-19';
drop
table
t5
,
t6
,
t7
,
t8
,
t9
;
drop
table
t5
,
t6
,
t7
,
t8
,
t9
;
# Test the case where we can't create partitioning 'index'
# Test the case where we can't create partitioning 'index'
create
table
t1
(
a
enum
(
'a'
,
'b'
,
'c'
,
'd'
)
default
'a'
)
#
partition
by
hash
(
ascii
(
a
))
partitions
2
;
# Not supported after bug#18198 is fixed
insert
into
t1
values
(
'a'
),(
'b'
),(
'c'
);
#
explain
partitions
select
*
from
t1
where
a
=
'b'
;
#create table t1 (a enum('a','b','c','d') default 'a')
drop
table
t1
;
# partition by hash (ascii(a)) partitions 2;
#insert into t1 values ('a'),('b'),('c');
#explain partitions select * from t1 where a='b';
#drop table t1;
#
#
# Test cases for bugs found in code review:
# Test cases for bugs found in code review:
...
@@ -519,8 +522,9 @@ select * from t1 where f_int1 between 5 and 15 order by f_int1;
...
@@ -519,8 +522,9 @@ select * from t1 where f_int1 between 5 and 15 order by f_int1;
drop
table
t1
;
drop
table
t1
;
# part2: bug in pruning code
# part2: bug in pruning code
create
table
t1
(
a
char
(
10
))
partition
by
list
(
length
(
a
))
(
create
table
t1
(
a
char
(
10
)
binary
)
partition
p1
values
in
(
1
),
partition
by
list
(
length
(
a
))
(
partition
p1
values
in
(
1
),
partition
p2
values
in
(
2
),
partition
p2
values
in
(
2
),
partition
p3
values
in
(
3
),
partition
p3
values
in
(
3
),
partition
p4
values
in
(
4
),
partition
p4
values
in
(
4
),
...
...
sql/sql_partition.cc
View file @
23cb067a
...
@@ -1553,8 +1553,11 @@ bool fix_partition_func(THD *thd, TABLE *table,
...
@@ -1553,8 +1553,11 @@ bool fix_partition_func(THD *thd, TABLE *table,
goto
end
;
goto
end
;
}
}
}
}
if
((
check_part_func_fields
(
part_info
->
part_field_array
))
||
if
(((
part_info
->
part_type
!=
HASH_PARTITION
||
(
part_info
->
is_sub_partitioned
()
&&
part_info
->
list_of_part_fields
==
FALSE
)
&&
check_part_func_fields
(
part_info
->
part_field_array
))
||
(
part_info
->
list_of_part_fields
==
FALSE
&&
part_info
->
is_sub_partitioned
()
&&
check_part_func_fields
(
part_info
->
subpart_field_array
)))
check_part_func_fields
(
part_info
->
subpart_field_array
)))
{
{
my_error
(
ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
,
MYF
(
0
));
my_error
(
ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
,
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