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
81db111e
Commit
81db111e
authored
Apr 20, 2007
by
mikael@dator3.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#18198
Added new test cases, fixed bugs in relation to those
parent
647ca9f0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
4 deletions
+24
-4
mysql-test/r/partition_charset.result
mysql-test/r/partition_charset.result
+6
-0
mysql-test/r/partition_list.result
mysql-test/r/partition_list.result
+4
-0
mysql-test/t/partition_list.test
mysql-test/t/partition_list.test
+1
-1
sql/partition_info.cc
sql/partition_info.cc
+1
-0
sql/sql_partition.cc
sql/sql_partition.cc
+12
-3
No files found.
mysql-test/r/partition_charset.result
View file @
81db111e
...
@@ -16,3 +16,9 @@ s1
...
@@ -16,3 +16,9 @@ s1
1
1
3
3
drop table t1;
drop table t1;
create table t1 (a varchar(1), primary key (a))
partition by list (ascii(a))
(partition p1 values in (65));
insert into t1 values ('A');
replace into t1 values ('A');
drop table t1;
mysql-test/r/partition_list.result
View file @
81db111e
...
@@ -295,3 +295,7 @@ select * from t1;
...
@@ -295,3 +295,7 @@ select * from t1;
a
a
100
100
drop table t1;
drop table t1;
create table t1 (a char(1))
partition by list (ascii(ucase(a)))
(partition p1 values in (2));
ERROR HY000: This partition function is not allowed
mysql-test/t/partition_list.test
View file @
81db111e
...
@@ -179,7 +179,7 @@ insert into t1 values (null);
...
@@ -179,7 +179,7 @@ insert into t1 values (null);
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
--
error
ER_PARTITION_FUNC
_NOT_ALLOWED
--
error
ER_PARTITION_FUNCTION_IS
_NOT_ALLOWED
create
table
t1
(
a
char
(
1
))
create
table
t1
(
a
char
(
1
))
partition
by
list
(
ascii
(
ucase
(
a
)))
partition
by
list
(
ascii
(
ucase
(
a
)))
(
partition
p1
values
in
(
2
));
(
partition
p1
values
in
(
2
));
...
...
sql/partition_info.cc
View file @
81db111e
...
@@ -951,6 +951,7 @@ bool partition_info::set_up_charset_field_preps()
...
@@ -951,6 +951,7 @@ bool partition_info::set_up_charset_field_preps()
if
(
!
(
char_ptrs
=
(
char
**
)
sql_alloc
(
size
)))
if
(
!
(
char_ptrs
=
(
char
**
)
sql_alloc
(
size
)))
goto
error
;
goto
error
;
subpart_charset_field_array
=
(
Field
**
)
char_ptrs
;
subpart_charset_field_array
=
(
Field
**
)
char_ptrs
;
ptr
=
subpart_field_array
;
i
=
0
;
i
=
0
;
while
((
field
=
*
(
ptr
++
)))
while
((
field
=
*
(
ptr
++
)))
{
{
...
...
sql/sql_partition.cc
View file @
81db111e
...
@@ -3315,13 +3315,16 @@ static uint32 get_sub_part_id_from_key(const TABLE *table,byte *buf,
...
@@ -3315,13 +3315,16 @@ static uint32 get_sub_part_id_from_key(const TABLE *table,byte *buf,
uint32
part_id
;
uint32
part_id
;
DBUG_ENTER
(
"get_sub_part_id_from_key"
);
DBUG_ENTER
(
"get_sub_part_id_from_key"
);
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
if
(
likely
(
rec0
==
buf
))
if
(
likely
(
rec0
==
buf
))
{
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
part_id
=
part_info
->
get_subpartition_id
(
part_info
);
part_id
=
part_info
->
get_subpartition_id
(
part_info
);
}
else
else
{
{
Field
**
part_field_array
=
part_info
->
subpart_field_array
;
Field
**
part_field_array
=
part_info
->
subpart_field_array
;
set_field_ptr
(
part_field_array
,
buf
,
rec0
);
set_field_ptr
(
part_field_array
,
buf
,
rec0
);
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
part_id
=
part_info
->
get_subpartition_id
(
part_info
);
part_id
=
part_info
->
get_subpartition_id
(
part_info
);
set_field_ptr
(
part_field_array
,
rec0
,
buf
);
set_field_ptr
(
part_field_array
,
rec0
,
buf
);
}
}
...
@@ -3358,14 +3361,17 @@ bool get_part_id_from_key(const TABLE *table, byte *buf, KEY *key_info,
...
@@ -3358,14 +3361,17 @@ bool get_part_id_from_key(const TABLE *table, byte *buf, KEY *key_info,
longlong
func_value
;
longlong
func_value
;
DBUG_ENTER
(
"get_part_id_from_key"
);
DBUG_ENTER
(
"get_part_id_from_key"
);
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
if
(
likely
(
rec0
==
buf
))
if
(
likely
(
rec0
==
buf
))
{
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
result
=
part_info
->
get_part_partition_id
(
part_info
,
part_id
,
result
=
part_info
->
get_part_partition_id
(
part_info
,
part_id
,
&
func_value
);
&
func_value
);
}
else
else
{
{
Field
**
part_field_array
=
part_info
->
part_field_array
;
Field
**
part_field_array
=
part_info
->
part_field_array
;
set_field_ptr
(
part_field_array
,
buf
,
rec0
);
set_field_ptr
(
part_field_array
,
buf
,
rec0
);
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
result
=
part_info
->
get_part_partition_id
(
part_info
,
part_id
,
result
=
part_info
->
get_part_partition_id
(
part_info
,
part_id
,
&
func_value
);
&
func_value
);
set_field_ptr
(
part_field_array
,
rec0
,
buf
);
set_field_ptr
(
part_field_array
,
rec0
,
buf
);
...
@@ -3405,14 +3411,17 @@ void get_full_part_id_from_key(const TABLE *table, byte *buf,
...
@@ -3405,14 +3411,17 @@ void get_full_part_id_from_key(const TABLE *table, byte *buf,
longlong
func_value
;
longlong
func_value
;
DBUG_ENTER
(
"get_full_part_id_from_key"
);
DBUG_ENTER
(
"get_full_part_id_from_key"
);
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
if
(
likely
(
rec0
==
buf
))
if
(
likely
(
rec0
==
buf
))
{
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
result
=
part_info
->
get_partition_id
(
part_info
,
&
part_spec
->
start_part
,
result
=
part_info
->
get_partition_id
(
part_info
,
&
part_spec
->
start_part
,
&
func_value
);
&
func_value
);
}
else
else
{
{
Field
**
part_field_array
=
part_info
->
full_part_field_array
;
Field
**
part_field_array
=
part_info
->
full_part_field_array
;
set_field_ptr
(
part_field_array
,
buf
,
rec0
);
set_field_ptr
(
part_field_array
,
buf
,
rec0
);
key_restore
(
buf
,
(
byte
*
)
key_spec
->
key
,
key_info
,
key_spec
->
length
);
result
=
part_info
->
get_partition_id
(
part_info
,
&
part_spec
->
start_part
,
result
=
part_info
->
get_partition_id
(
part_info
,
&
part_spec
->
start_part
,
&
func_value
);
&
func_value
);
set_field_ptr
(
part_field_array
,
rec0
,
buf
);
set_field_ptr
(
part_field_array
,
rec0
,
buf
);
...
...
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