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
edff3f3f
Commit
edff3f3f
authored
Apr 02, 2015
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MDEV-6877] Update Update, Delete and Write row log event
The row events no longer require columns arguments.
parent
724d5ae5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
36 deletions
+19
-36
sql/log_event.cc
sql/log_event.cc
+8
-18
sql/log_event.h
sql/log_event.h
+3
-10
sql/sql_class.cc
sql/sql_class.cc
+8
-8
No files found.
sql/log_event.cc
View file @
edff3f3f
...
@@ -11117,9 +11117,9 @@ void Table_map_log_event::print(FILE *, PRINT_EVENT_INFO *print_event_info)
...
@@ -11117,9 +11117,9 @@ void Table_map_log_event::print(FILE *, PRINT_EVENT_INFO *print_event_info)
#if !defined(MYSQL_CLIENT)
#if !defined(MYSQL_CLIENT)
Write_rows_log_event
::
Write_rows_log_event
(
THD
*
thd_arg
,
TABLE
*
tbl_arg
,
Write_rows_log_event
::
Write_rows_log_event
(
THD
*
thd_arg
,
TABLE
*
tbl_arg
,
ulong
tid_arg
,
ulong
tid_arg
,
MY_BITMAP
const
*
cols
,
bool
is_transactional
)
bool
is_transactional
)
:
Rows_log_event
(
thd_arg
,
tbl_arg
,
tid_arg
,
cols
,
is_transactional
,
WRITE_ROWS_EVENT_V1
)
:
Rows_log_event
(
thd_arg
,
tbl_arg
,
tid_arg
,
tbl_arg
->
write_set
,
is_transactional
,
WRITE_ROWS_EVENT_V1
)
{
{
}
}
#endif
#endif
...
@@ -12131,9 +12131,9 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
...
@@ -12131,9 +12131,9 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
#ifndef MYSQL_CLIENT
#ifndef MYSQL_CLIENT
Delete_rows_log_event
::
Delete_rows_log_event
(
THD
*
thd_arg
,
TABLE
*
tbl_arg
,
Delete_rows_log_event
::
Delete_rows_log_event
(
THD
*
thd_arg
,
TABLE
*
tbl_arg
,
ulong
tid
,
MY_BITMAP
const
*
cols
,
ulong
tid
,
bool
is_transactional
)
bool
is_transactional
)
:
Rows_log_event
(
thd_arg
,
tbl_arg
,
tid
,
tbl_arg
->
read_set
,
is_transactional
,
:
Rows_log_event
(
thd_arg
,
tbl_arg
,
tid
,
cols
,
is_transactional
,
DELETE_ROWS_EVENT_V1
)
DELETE_ROWS_EVENT_V1
)
{
{
}
}
#endif
/* #if !defined(MYSQL_CLIENT) */
#endif
/* #if !defined(MYSQL_CLIENT) */
...
@@ -12261,21 +12261,11 @@ uint8 Delete_rows_log_event::get_trg_event_map()
...
@@ -12261,21 +12261,11 @@ uint8 Delete_rows_log_event::get_trg_event_map()
#if !defined(MYSQL_CLIENT)
#if !defined(MYSQL_CLIENT)
Update_rows_log_event
::
Update_rows_log_event
(
THD
*
thd_arg
,
TABLE
*
tbl_arg
,
Update_rows_log_event
::
Update_rows_log_event
(
THD
*
thd_arg
,
TABLE
*
tbl_arg
,
ulong
tid
,
ulong
tid
,
MY_BITMAP
const
*
cols_bi
,
MY_BITMAP
const
*
cols_ai
,
bool
is_transactional
)
:
Rows_log_event
(
thd_arg
,
tbl_arg
,
tid
,
cols_bi
,
is_transactional
,
UPDATE_ROWS_EVENT_V1
)
{
init
(
cols_ai
);
}
Update_rows_log_event
::
Update_rows_log_event
(
THD
*
thd_arg
,
TABLE
*
tbl_arg
,
ulong
tid
,
MY_BITMAP
const
*
cols
,
bool
is_transactional
)
bool
is_transactional
)
:
Rows_log_event
(
thd_arg
,
tbl_arg
,
tid
,
cols
,
is_transactional
,
UPDATE_ROWS_EVENT_V1
)
:
Rows_log_event
(
thd_arg
,
tbl_arg
,
tid
,
tbl_arg
->
read_set
,
is_transactional
,
UPDATE_ROWS_EVENT_V1
)
{
{
init
(
cols
);
init
(
tbl_arg
->
write_set
);
}
}
void
Update_rows_log_event
::
init
(
MY_BITMAP
const
*
cols
)
void
Update_rows_log_event
::
init
(
MY_BITMAP
const
*
cols
)
...
...
sql/log_event.h
View file @
edff3f3f
...
@@ -4518,8 +4518,8 @@ class Write_rows_log_event : public Rows_log_event
...
@@ -4518,8 +4518,8 @@ class Write_rows_log_event : public Rows_log_event
};
};
#if defined(MYSQL_SERVER)
#if defined(MYSQL_SERVER)
Write_rows_log_event
(
THD
*
,
TABLE
*
,
ulong
table_id
,
Write_rows_log_event
(
THD
*
,
TABLE
*
,
ulong
table_id
,
MY_BITMAP
const
*
cols
,
bool
is_transactional
);
bool
is_transactional
);
#endif
#endif
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
Write_rows_log_event
(
const
char
*
buf
,
uint
event_len
,
Write_rows_log_event
(
const
char
*
buf
,
uint
event_len
,
...
@@ -4581,12 +4581,6 @@ class Update_rows_log_event : public Rows_log_event
...
@@ -4581,12 +4581,6 @@ class Update_rows_log_event : public Rows_log_event
#ifdef MYSQL_SERVER
#ifdef MYSQL_SERVER
Update_rows_log_event
(
THD
*
,
TABLE
*
,
ulong
table_id
,
Update_rows_log_event
(
THD
*
,
TABLE
*
,
ulong
table_id
,
MY_BITMAP
const
*
cols_bi
,
MY_BITMAP
const
*
cols_ai
,
bool
is_transactional
);
Update_rows_log_event
(
THD
*
,
TABLE
*
,
ulong
table_id
,
MY_BITMAP
const
*
cols
,
bool
is_transactional
);
bool
is_transactional
);
void
init
(
MY_BITMAP
const
*
cols
);
void
init
(
MY_BITMAP
const
*
cols
);
...
@@ -4665,8 +4659,7 @@ class Delete_rows_log_event : public Rows_log_event
...
@@ -4665,8 +4659,7 @@ class Delete_rows_log_event : public Rows_log_event
};
};
#ifdef MYSQL_SERVER
#ifdef MYSQL_SERVER
Delete_rows_log_event
(
THD
*
,
TABLE
*
,
ulong
,
Delete_rows_log_event
(
THD
*
,
TABLE
*
,
ulong
,
bool
is_transactional
);
MY_BITMAP
const
*
cols
,
bool
is_transactional
);
#endif
#endif
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
Delete_rows_log_event
(
const
char
*
buf
,
uint
event_len
,
Delete_rows_log_event
(
const
char
*
buf
,
uint
event_len
,
...
...
sql/sql_class.cc
View file @
edff3f3f
...
@@ -5967,7 +5967,7 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
...
@@ -5967,7 +5967,7 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
{
{
/* Create a new RowsEventT... */
/* Create a new RowsEventT... */
Rows_log_event
*
const
Rows_log_event
*
const
ev
=
new
RowsEventT
(
this
,
table
,
table
->
s
->
table_map_id
,
ev
=
new
RowsEventT
(
this
,
table
,
table
->
s
->
table_map_id
,
is_transactional
);
is_transactional
);
if
(
unlikely
(
!
ev
))
if
(
unlikely
(
!
ev
))
DBUG_RETURN
(
NULL
);
DBUG_RETURN
(
NULL
);
...
@@ -6136,7 +6136,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
...
@@ -6136,7 +6136,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
is_trans
=
1
;
is_trans
=
1
;
Rows_log_event
*
const
ev
=
Rows_log_event
*
const
ev
=
binlog_prepare_pending_rows_event
(
table
,
variables
.
server_id
,
cols
,
colcnt
,
binlog_prepare_pending_rows_event
(
table
,
variables
.
server_id
,
len
,
is_trans
,
len
,
is_trans
,
static_cast
<
Write_rows_log_event
*>
(
0
));
static_cast
<
Write_rows_log_event
*>
(
0
));
...
@@ -6185,9 +6185,9 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
...
@@ -6185,9 +6185,9 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
#endif
#endif
Rows_log_event
*
const
ev
=
Rows_log_event
*
const
ev
=
binlog_prepare_pending_rows_event
(
table
,
variables
.
server_id
,
cols
,
colcnt
,
binlog_prepare_pending_rows_event
(
table
,
variables
.
server_id
,
before_size
+
after_size
,
is_trans
,
before_size
+
after_size
,
is_trans
,
static_cast
<
Update_rows_log_event
*>
(
0
));
static_cast
<
Update_rows_log_event
*>
(
0
));
if
(
unlikely
(
ev
==
0
))
if
(
unlikely
(
ev
==
0
))
return
HA_ERR_OUT_OF_MEM
;
return
HA_ERR_OUT_OF_MEM
;
...
@@ -6221,9 +6221,9 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
...
@@ -6221,9 +6221,9 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
is_trans
=
1
;
is_trans
=
1
;
Rows_log_event
*
const
ev
=
Rows_log_event
*
const
ev
=
binlog_prepare_pending_rows_event
(
table
,
variables
.
server_id
,
cols
,
colcnt
,
binlog_prepare_pending_rows_event
(
table
,
variables
.
server_id
,
len
,
is_trans
,
len
,
is_trans
,
static_cast
<
Delete_rows_log_event
*>
(
0
));
static_cast
<
Delete_rows_log_event
*>
(
0
));
if
(
unlikely
(
ev
==
0
))
if
(
unlikely
(
ev
==
0
))
return
HA_ERR_OUT_OF_MEM
;
return
HA_ERR_OUT_OF_MEM
;
...
...
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