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
295d50b2
Commit
295d50b2
authored
Aug 31, 2006
by
mikael/pappa@dator5.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#21658: Crash partition test in prepared statement protocol
Review fixes
parent
cb77c9b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
sql/sql_partition.cc
sql/sql_partition.cc
+3
-10
sql/table.cc
sql/table.cc
+2
-2
No files found.
sql/sql_partition.cc
View file @
295d50b2
...
...
@@ -869,12 +869,9 @@ bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
bool
is_sub_part
,
bool
is_field_to_be_setup
)
{
MEM_ROOT
new_mem_root
;
Query_arena
partition_arena
(
&
new_mem_root
,
Query_arena
::
INITIALIZED
);
Query_arena
backup_arena
;
partition_info
*
part_info
=
table
->
part_info
;
uint
dir_length
,
home_dir_length
;
bool
result
=
TRUE
;
bool
is_prepare
;
TABLE_LIST
tables
;
TABLE_LIST
*
save_table_list
,
*
save_first_table
,
*
save_last_table
;
int
error
;
...
...
@@ -1424,7 +1421,6 @@ bool fix_partition_func(THD *thd, TABLE *table,
bool
result
=
TRUE
;
partition_info
*
part_info
=
table
->
part_info
;
enum_mark_columns
save_mark_used_columns
=
thd
->
mark_used_columns
;
Item
*
thd_free_list
=
thd
->
free_list
;
DBUG_ENTER
(
"fix_partition_func"
);
if
(
part_info
->
fixed
)
...
...
@@ -3426,8 +3422,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
DBUG_PRINT
(
"info"
,
(
"Parse: %s"
,
part_buf
));
if
(
MYSQLparse
((
void
*
)
thd
)
||
thd
->
is_fatal_error
)
{
free_items
(
thd
->
free_list
);
thd
->
free_list
=
NULL
;
thd
->
free_items
();
goto
end
;
}
/*
...
...
@@ -3485,9 +3480,8 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
just to ensure we don't get into strange situations with the
item objects.
*/
free_items
(
thd
->
free_list
);
thd
->
free_items
(
);
part_info
=
thd
->
work_part_info
;
thd
->
free_list
=
NULL
;
table
->
s
->
version
=
0UL
;
}
}
...
...
@@ -3517,8 +3511,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
!
((
subpart_func_string
=
thd
->
alloc
(
subpart_func_len
)))))
{
mem_alloc_error
(
part_func_len
);
free_items
(
thd
->
free_list
);
thd
->
free_list
=
NULL
;
thd
->
free_items
();
goto
end
;
}
if
(
part_func_len
)
...
...
sql/table.cc
View file @
295d50b2
...
...
@@ -1499,10 +1499,10 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
DBUG_PRINT
(
"info"
,
(
"autopartitioned: %u"
,
share
->
auto_partitioned
));
if
(
!
tmp
)
tmp
=
fix_partition_func
(
thd
,
outparam
,
is_create_table
);
if
(
!
tmp
)
outparam
->
part_info
->
item_free_list
=
part_func_arena
.
free_list
;
thd
->
stmt_arena
=
backup_stmt_arena_ptr
;
thd
->
restore_active_arena
(
&
part_func_arena
,
&
backup_arena
);
if
(
!
tmp
)
outparam
->
part_info
->
item_free_list
=
part_func_arena
.
free_list
;
if
(
tmp
)
{
if
(
is_create_table
)
...
...
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