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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
83890afe
Commit
83890afe
authored
Feb 06, 2006
by
mikron@c-9c0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL 2826: Step 10
New methods to read/write/initialise table log
parent
a886da98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
133 additions
and
6 deletions
+133
-6
sql/mysql_priv.h
sql/mysql_priv.h
+18
-1
sql/sql_table.cc
sql/sql_table.cc
+115
-5
No files found.
sql/mysql_priv.h
View file @
83890afe
...
...
@@ -1158,7 +1158,24 @@ typedef struct st_lock_param_type
void
mem_alloc_error
(
size_t
size
);
bool
write_table_log
(
ALTER_PARTITION_PARAM_TYPE
*
lpt
);
typedef
struct
st_table_log_entry
{
const
char
*
name
;
const
char
*
from_name
;
const
char
*
handler_type
;
char
action_type
;
}
TABLE_LOG_ENTRY
;
bool
write_table_log_entry
(
TABLE_LOG_ENTRY
*
table_log_entry
,
uint
next_entry
,
uint
*
entry_written
);
bool
write_execute_table_log_entry
(
uint
first_entry
,
uint
*
exec_entry
);
uint
read_table_log_header
();
bool
read_table_log_entry
(
uint
read_entry
,
TABLE_LOG_ENTRY
*
table_log_entry
);
bool
init_table_log
();
void
release_table_log
();
bool
write_log_shadow_frm
(
ALTER_PARTITION_PARAM_TYPE
*
lpt
,
bool
install_flag
);
bool
write_log_drop_partition
(
ALTER_PARTITION_PARAM_TYPE
*
lpt
);
bool
write_log_add_partition
(
ALTER_PARTITION_PARAM_TYPE
*
lpt
);
...
...
sql/sql_table.cc
View file @
83890afe
...
...
@@ -247,11 +247,12 @@ static int mysql_copy_key_list(List<Key> *orig_key,
/*
SYNOPSIS
write_table_log()
lpt Struct carrying parameters to the function
write_table_log_entry()
table_log_entry Information about log entry
out:entry_written Entry information written into
RETURN VALUES
TRUE
Failure in writing the log
TRUE
Error
FALSE Success
DESCRIPTION
...
...
@@ -260,13 +261,122 @@ static int mysql_copy_key_list(List<Key> *orig_key,
*/
bool
write_table_log
(
ALTER_PARTITION_PARAM_TYPE
*
lpt
)
write_table_log_entry
(
TABLE_LOG_ENTRY
*
table_log_entry
,
uint
next_entry
,
uint
*
entry_written
)
{
DBUG_ENTER
(
"write_table_log"
);
DBUG_ENTER
(
"write_table_log
_entry
"
);
DBUG_RETURN
(
FALSE
);
}
/*
Write final entry in the table log
SYNOPSIS
write_execute_table_log_entry()
first_entry First entry in linked list of entries
to execute, if 0 = NULL it means that
the entry is removed and the entries
are put into the free list.
in:out:exec_entry Entry to execute, 0 = NULL if the entry
is written first time and needs to be
returned. In this case the entry written
is returned in this parameter
RETURN VALUES
TRUE Error
FALSE Success
DESCRIPTION
This is the last write in the table log. The previous log entries have
already been written but not yet synched to disk.
*/
bool
write_execute_table_log_entry
(
uint
first_entry
,
uint
*
exec_entry
)
{
DBUG_ENTER
(
"write_execute_table_log_entry"
);
DBUG_RETURN
(
FALSE
);
}
/*
Read header of table log file
SYNOPSIS
read_table_log_header()
RETURN VALUES
> 0 Last entry in table log
0 No entries in table log
DESCRIPTION
When we read the table log header we get information about maximum sizes
of names in the table log and we also get information about the number
of entries in the table log.
*/
uint
read_table_log_header
()
{
DBUG_ENTER
(
"read_table_log_header"
);
DBUG_RETURN
(
0
);
}
/*
Read a table log entry
SYNOPSIS
read_table_log_entry()
read_entry Number of entry to read
out:entry_info Information from entry
RETURN VALUES
TRUE Error
FALSE Success
DESCRIPTION
Read a specified entry in the table log
*/
bool
read_table_log_entry
(
uint
read_entry
,
TABLE_LOG_ENTRY
*
table_log_entry
)
{
DBUG_ENTER
(
"read_table_log_entry"
);
DBUG_RETURN
(
FALSE
);
}
/*
Initialise table log
SYNOPSIS
init_table_log()
RETURN VALUES
TRUE Error
FALSE Success
DESCRIPTION
Write the header of the table log file and length of names. Also set
number of entries to zero.
*/
bool
init_table_log
()
{
DBUG_ENTER
(
"init_table_log"
);
DBUG_RETURN
(
FALSE
);
}
/*
Release all memory allocated to the table log
SYNOPSIS
release_table_log()
RETURN VALUES
NONE
*/
void
release_table_log
()
{
DBUG_ENTER
(
"release_table_log"
);
DBUG_RETURN_VOID
;
}
/*
SYNOPSIS
mysql_write_frm()
...
...
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