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
9dace135
Commit
9dace135
authored
Mar 08, 2006
by
mats@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#3023 (Use locks in a statement-like manner):
Changes according to review comments.
parent
53f9de6c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
40 deletions
+17
-40
sql/log.cc
sql/log.cc
+7
-4
sql/log_event.cc
sql/log_event.cc
+3
-1
sql/log_event.h
sql/log_event.h
+0
-30
sql/sql_class.cc
sql/sql_class.cc
+7
-5
No files found.
sql/log.cc
View file @
9dace135
...
...
@@ -2607,6 +2607,13 @@ int THD::binlog_setup_trx_data()
DBUG_RETURN
(
0
);
}
/*
Write a table map to the binary log.
This function is called from ha_external_lock() after the storage
engine has registered for the transaction.
*/
int
THD
::
binlog_write_table_map
(
TABLE
*
table
,
bool
is_trans
)
{
DBUG_ENTER
(
"THD::binlog_write_table_map"
);
...
...
@@ -2623,10 +2630,6 @@ int THD::binlog_write_table_map(TABLE *table, bool is_trans)
Table_map_log_event
the_event
(
this
,
table
,
table
->
s
->
table_map_id
,
is_trans
,
flags
);
/*
This function is called from ha_external_lock() after the storage
engine has registered for the transaction.
*/
if
(
is_trans
)
trans_register_ha
(
this
,
options
&
(
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
),
&
binlog_hton
);
...
...
sql/log_event.cc
View file @
9dace135
...
...
@@ -5073,7 +5073,9 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid,
{
/*
We allow a special form of dummy event when the table, and cols
are null and the table id is ULONG_MAX.
are null and the table id is ULONG_MAX. This is a temporary
solution, to be able to terminate a started statement in the
binary log: the extreneous events will be removed in the future.
*/
DBUG_ASSERT
(
tbl_arg
&&
tbl_arg
->
s
&&
tid
!=
ULONG_MAX
||
!
tbl_arg
&&
!
cols
&&
tid
==
ULONG_MAX
);
...
...
sql/log_event.h
View file @
9dace135
...
...
@@ -1833,36 +1833,6 @@ class Rows_log_event : public Log_event
return
m_rows_buf
&&
m_cols
.
bitmap
;
}
/*
If there is no table map active for the event, write one to the
binary log.
LOCK_log has to be aquired before calling this function.
PARAMETERS
thd - Thread to use when writing the table map
RETURN VALUE
Error code, or zero if write succeeded.
*/
#if !defined(MYSQL_CLIENT) && defined(HAVE_ROW_BASED_REPLICATION)
#if 0
int maybe_write_table_map(THD *thd, IO_CACHE *file, MYSQL_LOG *log) const
{
/*
N.B., get_cache_stmt() returns the value of 'using_trans' that
was provided to the constructor, i.e., get_cache_stmt() == true
if and only if the table is transactional.
*/
int result= 0;
if (!log->is_table_mapped(m_table))
result= log->write_table_map(thd, file, m_table, get_cache_stmt());
return result;
}
#endif
#endif
uint
m_row_count
;
/* The number of rows added to the event */
protected:
...
...
sql/sql_class.cc
View file @
9dace135
...
...
@@ -2532,12 +2532,14 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end)
table maps written this far will be included in the table maps
for the following statement.
See if we can replace this with a dummy, maybe constant, event.
TODO: Remove the need for a dummy event altogether. It can be
fixed if we can write table maps to a memory buffer before
writing the first binrow event. We can then flush and clear the
memory buffer with table map events before writing the first
binrow event. In the event of a crash, nothing is lost since
the table maps are only needed if there are binrow events.
*/
#if 0
static unsigned char memory[sizeof(Write_rows_log_event)];
void *const ptr= &memory;
#endif
Rows_log_event
*
ev
=
new
Write_rows_log_event
(
this
,
0
,
ULONG_MAX
,
0
,
FALSE
);
ev
->
set_flags
(
Rows_log_event
::
STMT_END_F
);
...
...
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