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
fc94004a
Commit
fc94004a
authored
Mar 20, 2006
by
holyfoot@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merging
parents
936d596a
820731c6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
1 deletion
+29
-1
mysql-test/r/partition.result
mysql-test/r/partition.result
+6
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+15
-0
sql/ha_partition.cc
sql/ha_partition.cc
+1
-0
sql/item.cc
sql/item.cc
+4
-1
sql/sql_partition.cc
sql/sql_partition.cc
+3
-0
No files found.
mysql-test/r/partition.result
View file @
fc94004a
...
...
@@ -557,6 +557,12 @@ t2 CREATE TABLE `t2` (
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='no comment' PARTITION BY KEY (a)
drop table t2;
create table t1 (s1 char(2) character set utf8)
partition by list (case when s1 > 'cz' then 1 else 2 end)
(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;
prepare stmt1 from 'create table t1 (s1 int) partition by hash (s1)';
execute stmt1;
execute stmt1;
...
...
mysql-test/t/partition.test
View file @
fc94004a
...
...
@@ -714,6 +714,21 @@ show create table t2;
drop
table
t2
;
#
# Bug#14367: Partitions: crash if utf8 column
#
create
table
t1
(
s1
char
(
2
)
character
set
utf8
)
partition
by
list
(
case
when
s1
>
'cz'
then
1
else
2
end
)
(
partition
p1
values
in
(
1
),
partition
p2
values
in
(
2
));
drop
table
t1
;
#
# Bug#15336 Partitions: crash if create table as select
#
create
table
t1
(
f1
int
)
partition
by
hash
(
f1
)
as
select
1
;
drop
table
t1
;
#
# bug #14350 Partitions: crash if prepared statement
#
...
...
sql/ha_partition.cc
View file @
fc94004a
...
...
@@ -4703,6 +4703,7 @@ int ha_partition::extra(enum ha_extra_function operation)
break
;
}
case
HA_EXTRA_NO_CACHE
:
case
HA_EXTRA_WRITE_CACHE
:
{
m_extra_cache
=
FALSE
;
m_extra_cache_size
=
0
;
...
...
sql/item.cc
View file @
fc94004a
...
...
@@ -647,6 +647,7 @@ Item *Item_string::safe_charset_converter(CHARSET_INFO *tocs)
{
Item_string
*
conv
;
uint
conv_errors
;
char
*
ptr
;
String
tmp
,
cstr
,
*
ostr
=
val_str
(
&
tmp
);
cstr
.
copy
(
ostr
->
ptr
(),
ostr
->
length
(),
ostr
->
charset
(),
tocs
,
&
conv_errors
);
if
(
conv_errors
||
!
(
conv
=
new
Item_string
(
cstr
.
ptr
(),
cstr
.
length
(),
...
...
@@ -661,7 +662,9 @@ Item *Item_string::safe_charset_converter(CHARSET_INFO *tocs)
*/
return
NULL
;
}
conv
->
str_value
.
copy
();
if
(
!
(
ptr
=
current_thd
->
memdup
(
cstr
.
ptr
(),
cstr
.
length
()
+
1
)))
return
NULL
;
conv
->
str_value
.
set
(
ptr
,
cstr
.
length
(),
cstr
.
charset
());
/* Ensure that no one is going to change the result string */
conv
->
str_value
.
mark_as_const
();
return
conv
;
...
...
sql/sql_partition.cc
View file @
fc94004a
...
...
@@ -1710,6 +1710,7 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table,
char
*
db_name
;
partition_info
*
part_info
=
table
->
part_info
;
ulong
save_set_query_id
=
thd
->
set_query_id
;
Item
*
thd_free_list
=
thd
->
free_list
;
DBUG_ENTER
(
"fix_partition_func"
);
if
(
part_info
->
fixed
)
...
...
@@ -1744,6 +1745,7 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table,
DBUG_RETURN
(
TRUE
);
}
}
thd
->
free_list
=
part_info
->
item_free_list
;
if
(
part_info
->
is_sub_partitioned
())
{
DBUG_ASSERT
(
part_info
->
subpart_type
==
HASH_PARTITION
);
...
...
@@ -1853,6 +1855,7 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table,
set_up_range_analysis_info
(
part_info
);
result
=
FALSE
;
end:
thd
->
free_list
=
thd_free_list
;
thd
->
set_query_id
=
save_set_query_id
;
DBUG_PRINT
(
"info"
,
(
"thd->set_query_id: %d"
,
thd
->
set_query_id
));
DBUG_RETURN
(
result
);
...
...
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