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
d42757f8
Commit
d42757f8
authored
Feb 20, 2006
by
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL 2826: Error handling of ALTER TABLE for partitioning
Bug fixes
parent
6ee7ab8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
sql/ha_partition.cc
sql/ha_partition.cc
+7
-7
sql/sql_partition.cc
sql/sql_partition.cc
+3
-3
sql/sql_table.cc
sql/sql_table.cc
+4
-1
No files found.
sql/ha_partition.cc
View file @
d42757f8
...
...
@@ -714,10 +714,10 @@ int ha_partition::rename_partitions(const char *path)
DBUG_PRINT
(
"info"
,
(
"Delete partition %s"
,
norm_name_buff
));
if
((
ret_error
=
file
->
delete_table
((
const
char
*
)
norm_name_buff
)))
error
=
ret_error
;
else
if
(
inactivate_table_log_entry
(
sub
_elem
->
log_entry
->
entry_pos
))
else
if
(
inactivate_table_log_entry
(
part
_elem
->
log_entry
->
entry_pos
))
error
=
1
;
else
sub
_elem
->
log_entry
=
NULL
;
/* Indicate success */
part
_elem
->
log_entry
=
NULL
;
/* Indicate success */
}
}
while
(
++
i
<
temp_partitions
);
VOID
(
sync_table_log
());
...
...
@@ -780,8 +780,8 @@ int ha_partition::rename_partitions(const char *path)
TEMP_PART_NAME
);
DBUG_PRINT
(
"info"
,
(
"Rename subpartition from %s to %s"
,
part_name_buff
,
norm_name_buff
));
if
((
ret_error
=
file
->
rename_table
((
const
char
*
)
norm
_name_buff
,
(
const
char
*
)
part
_name_buff
)))
if
((
ret_error
=
file
->
rename_table
((
const
char
*
)
part
_name_buff
,
(
const
char
*
)
norm
_name_buff
)))
error
=
ret_error
;
else
if
(
inactivate_table_log_entry
(
sub_elem
->
log_entry
->
entry_pos
))
error
=
1
;
...
...
@@ -797,7 +797,7 @@ int ha_partition::rename_partitions(const char *path)
if
(
part_elem
->
part_state
==
PART_IS_CHANGED
)
{
file
=
m_reorged_file
[
part_count
++
];
DBUG_PRINT
(
"info"
,
(
"Delete
sub
partition %s"
,
norm_name_buff
));
DBUG_PRINT
(
"info"
,
(
"Delete partition %s"
,
norm_name_buff
));
if
((
ret_error
=
file
->
delete_table
((
const
char
*
)
norm_name_buff
)))
error
=
ret_error
;
else
if
(
inactivate_table_log_entry
(
part_elem
->
log_entry
->
entry_pos
))
...
...
@@ -810,8 +810,8 @@ int ha_partition::rename_partitions(const char *path)
TRUE
);
DBUG_PRINT
(
"info"
,
(
"Rename partition from %s to %s"
,
part_name_buff
,
norm_name_buff
));
if
((
ret_error
=
file
->
rename_table
((
const
char
*
)
norm
_name_buff
,
(
const
char
*
)
part
_name_buff
)))
if
((
ret_error
=
file
->
rename_table
((
const
char
*
)
part
_name_buff
,
(
const
char
*
)
norm
_name_buff
)))
error
=
ret_error
;
else
if
(
inactivate_table_log_entry
(
part_elem
->
log_entry
->
entry_pos
))
error
=
1
;
...
...
sql/sql_partition.cc
View file @
d42757f8
...
...
@@ -5678,7 +5678,7 @@ write_log_completed(ALTER_PARTITION_PARAM_TYPE *lpt, bool dont_crash)
{
partition_info
*
part_info
=
lpt
->
part_info
;
uint
count_loop
=
0
;
bool
success
;
bool
not_
success
;
TABLE_LOG_MEMORY_ENTRY
*
log_entry
=
part_info
->
exec_log_entry
;
DBUG_ENTER
(
"write_log_completed"
);
...
...
@@ -5686,11 +5686,11 @@ write_log_completed(ALTER_PARTITION_PARAM_TYPE *lpt, bool dont_crash)
lock_global_table_log
();
do
{
if
(
!
(
success
=
write_execute_table_log_entry
(
0UL
,
TRUE
,
&
log_entry
)))
if
(
!
(
not_
success
=
write_execute_table_log_entry
(
0UL
,
TRUE
,
&
log_entry
)))
break
;
my_sleep
(
1
);
}
while
(
count_loop
++
<
20
);
if
(
!
success
&&
!
dont_crash
)
if
(
not_
success
&&
!
dont_crash
)
{
/*
Failed to write 20 consecutive attempts to write. Bad...
...
...
sql/sql_table.cc
View file @
d42757f8
...
...
@@ -435,7 +435,7 @@ read_table_log_header()
{
if
(
read_table_log_file_entry
(
0UL
))
{
/* Write message into error log */
;
/* Write message into error log */
}
else
successful_open
=
TRUE
;
...
...
@@ -446,6 +446,8 @@ read_table_log_header()
uint4korr
(
&
file_entry
[
TLOG_HANDLER_TYPE_POS
]);
if
(
successful_open
)
global_table_log
.
io_size
=
uint4korr
(
&
file_entry
[
TLOG_IO_SIZE_POS
]);
else
global_table_log
.
io_size
=
IO_SIZE
;
global_table_log
.
first_free
=
NULL
;
global_table_log
.
first_used
=
NULL
;
global_table_log
.
no_entries
=
0
;
...
...
@@ -513,6 +515,7 @@ init_table_log()
char
file_name
[
FN_REFLEN
];
DBUG_ENTER
(
"init_table_log"
);
global_table_log
.
io_size
=
IO_SIZE
;
create_table_log_file_name
(
file_name
);
VOID
(
my_delete
(
file_name
,
MYF
(
0
)));
if
((
global_table_log
.
file_id
=
my_create
(
file_name
,
...
...
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