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
4581efe9
Commit
4581efe9
authored
Aug 27, 2007
by
rafal@quant.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post merge fixes.
parent
fedc0a3c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
62 deletions
+56
-62
sql/log_event.cc
sql/log_event.cc
+23
-18
sql/log_event.h
sql/log_event.h
+12
-12
sql/log_event_old.cc
sql/log_event_old.cc
+12
-12
sql/log_event_old.h
sql/log_event_old.h
+8
-8
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-12
No files found.
sql/log_event.cc
View file @
4581efe9
...
@@ -5653,9 +5653,10 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid,
...
@@ -5653,9 +5653,10 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid,
m_table
(
tbl_arg
),
m_table
(
tbl_arg
),
m_table_id
(
tid
),
m_table_id
(
tid
),
m_width
(
tbl_arg
?
tbl_arg
->
s
->
fields
:
1
),
m_width
(
tbl_arg
?
tbl_arg
->
s
->
fields
:
1
),
m_rows_buf
(
0
),
m_rows_cur
(
0
),
m_rows_end
(
0
),
m_rows_buf
(
0
),
m_rows_cur
(
0
),
m_rows_end
(
0
),
m_flags
(
0
)
m_curr_row
(
NULL
),
m_curr_row_end
(
NULL
),
#ifdef HAVE_REPLICATION
m_flags
(
0
),
m_key
(
NULL
)
,
m_key
(
NULL
),
m_curr_row
(
NULL
),
m_curr_row_end
(
NULL
)
#endif
{
{
/*
/*
We allow a special form of dummy event when the table, and cols
We allow a special form of dummy event when the table, and cols
...
@@ -5697,10 +5698,13 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
...
@@ -5697,10 +5698,13 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
*
description_event
)
*
description_event
)
:
Log_event
(
buf
,
description_event
),
:
Log_event
(
buf
,
description_event
),
m_row_count
(
0
),
m_row_count
(
0
),
#ifndef MYSQL_CLIENT
m_table
(
NULL
),
m_table
(
NULL
),
m_rows_buf
(
0
),
m_rows_cur
(
0
),
m_rows_end
(
0
),
#endif
m_curr_row
(
NULL
),
m_curr_row_end
(
NULL
),
m_rows_buf
(
0
),
m_rows_cur
(
0
),
m_rows_end
(
0
)
m_key
(
NULL
)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
,
m_key
(
NULL
),
m_curr_row
(
NULL
),
m_curr_row_end
(
NULL
)
#endif
{
{
DBUG_ENTER
(
"Rows_log_event::Rows_log_event(const char*,...)"
);
DBUG_ENTER
(
"Rows_log_event::Rows_log_event(const char*,...)"
);
uint8
const
common_header_len
=
description_event
->
common_header_len
;
uint8
const
common_header_len
=
description_event
->
common_header_len
;
...
@@ -5789,7 +5793,9 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
...
@@ -5789,7 +5793,9 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
m_rows_buf
=
(
uchar
*
)
my_malloc
(
data_size
,
MYF
(
MY_WME
));
m_rows_buf
=
(
uchar
*
)
my_malloc
(
data_size
,
MYF
(
MY_WME
));
if
(
likely
((
bool
)
m_rows_buf
))
if
(
likely
((
bool
)
m_rows_buf
))
{
{
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
m_curr_row
=
m_rows_buf
;
m_curr_row
=
m_rows_buf
;
#endif
m_rows_end
=
m_rows_buf
+
data_size
;
m_rows_end
=
m_rows_buf
+
data_size
;
m_rows_cur
=
m_rows_end
;
m_rows_cur
=
m_rows_end
;
memcpy
(
m_rows_buf
,
ptr_rows_data
,
data_size
);
memcpy
(
m_rows_buf
,
ptr_rows_data
,
data_size
);
...
@@ -6055,7 +6061,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
...
@@ -6055,7 +6061,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
TABLE
*
TABLE
*
table
=
table
=
m_table
=
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
m_table_map
.
get_table
(
m_table_id
);
m_table
=
const_cast
<
R
elay_log_info
*>
(
rli
)
->
m_table_map
.
get_table
(
m_table_id
);
if
(
table
)
if
(
table
)
{
{
...
@@ -6100,7 +6106,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
...
@@ -6100,7 +6106,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
inside a statement and halting abruptly might cause problems
inside a statement and halting abruptly might cause problems
when restarting.
when restarting.
*/
*/
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
set_flag
(
RELAY_LOG_INFO
::
IN_STMT
);
const_cast
<
R
elay_log_info
*>
(
rli
)
->
set_flag
(
Relay_log_info
::
IN_STMT
);
if
(
m_width
==
table
->
s
->
fields
&&
bitmap_is_set_all
(
&
m_cols
))
if
(
m_width
==
table
->
s
->
fields
&&
bitmap_is_set_all
(
&
m_cols
))
set_flags
(
COMPLETE_ROWS_F
);
set_flags
(
COMPLETE_ROWS_F
);
...
@@ -6187,8 +6193,8 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
...
@@ -6187,8 +6193,8 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
}
// if (table)
}
// if (table)
/*
/*
We need to delay this clear until
the table def stored in m_table_def is no
We need to delay this clear until
here bacause unpack_current_row() uses
longer needed. It is used in unpack_current_row()
.
master-side table definitions stored in rli
.
*/
*/
if
(
rli
->
tables_to_lock
&&
get_flags
(
STMT_END_F
))
if
(
rli
->
tables_to_lock
&&
get_flags
(
STMT_END_F
))
const_cast
<
Relay_log_info
*>
(
rli
)
->
clear_tables_to_lock
();
const_cast
<
Relay_log_info
*>
(
rli
)
->
clear_tables_to_lock
();
...
@@ -7136,7 +7142,7 @@ is_duplicate_key_error(int errcode)
...
@@ -7136,7 +7142,7 @@ is_duplicate_key_error(int errcode)
*/
*/
int
int
Rows_log_event
::
write_row
(
const
R
ELAY_LOG_INFO
*
const
rli
,
Rows_log_event
::
write_row
(
const
R
elay_log_info
*
const
rli
,
const
bool
overwrite
)
const
bool
overwrite
)
{
{
DBUG_ENTER
(
"write_row"
);
DBUG_ENTER
(
"write_row"
);
...
@@ -7323,7 +7329,7 @@ Rows_log_event::write_row(const RELAY_LOG_INFO *const rli,
...
@@ -7323,7 +7329,7 @@ Rows_log_event::write_row(const RELAY_LOG_INFO *const rli,
#endif
#endif
int
int
Write_rows_log_event
::
do_exec_row
(
const
R
ELAY_LOG_INFO
*
const
rli
)
Write_rows_log_event
::
do_exec_row
(
const
R
elay_log_info
*
const
rli
)
{
{
DBUG_ASSERT
(
m_table
!=
NULL
);
DBUG_ASSERT
(
m_table
!=
NULL
);
int
error
=
write_row
(
rli
,
TRUE
/* overwrite */
);
int
error
=
write_row
(
rli
,
TRUE
/* overwrite */
);
...
@@ -7453,7 +7459,7 @@ static bool record_compare(TABLE *table)
...
@@ -7453,7 +7459,7 @@ static bool record_compare(TABLE *table)
@c position() and @c rnd_pos() will be used.
@c position() and @c rnd_pos() will be used.
*/
*/
int
Rows_log_event
::
find_row
(
const
R
ELAY_LOG_INFO
*
rli
)
int
Rows_log_event
::
find_row
(
const
R
elay_log_info
*
rli
)
{
{
DBUG_ENTER
(
"find_row"
);
DBUG_ENTER
(
"find_row"
);
...
@@ -7505,7 +7511,7 @@ int Rows_log_event::find_row(const RELAY_LOG_INFO *rli)
...
@@ -7505,7 +7511,7 @@ int Rows_log_event::find_row(const RELAY_LOG_INFO *rli)
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
// We can't use p
i
sition() - try other methods.
// We can't use p
o
sition() - try other methods.
/*
/*
We need to retrieve all fields
We need to retrieve all fields
...
@@ -7721,8 +7727,7 @@ Delete_rows_log_event::do_before_row_operations(const Slave_reporting_capability
...
@@ -7721,8 +7727,7 @@ Delete_rows_log_event::do_before_row_operations(const Slave_reporting_capability
m_table
->
s
->
primary_key
<
MAX_KEY
)
m_table
->
s
->
primary_key
<
MAX_KEY
)
{
{
/*
/*
We don't need to allocate any memory for m_after_image and
We don't need to allocate any memory for m_key since it is not used.
m_key since they are not used.
*/
*/
return
0
;
return
0
;
}
}
...
@@ -7749,7 +7754,7 @@ Delete_rows_log_event::do_after_row_operations(const Slave_reporting_capability
...
@@ -7749,7 +7754,7 @@ Delete_rows_log_event::do_after_row_operations(const Slave_reporting_capability
return
error
;
return
error
;
}
}
int
Delete_rows_log_event
::
do_exec_row
(
const
R
ELAY_LOG_INFO
*
const
rli
)
int
Delete_rows_log_event
::
do_exec_row
(
const
R
elay_log_info
*
const
rli
)
{
{
int
error
;
int
error
;
DBUG_ASSERT
(
m_table
!=
NULL
);
DBUG_ASSERT
(
m_table
!=
NULL
);
...
@@ -7873,7 +7878,7 @@ Update_rows_log_event::do_after_row_operations(const Slave_reporting_capability
...
@@ -7873,7 +7878,7 @@ Update_rows_log_event::do_after_row_operations(const Slave_reporting_capability
}
}
int
int
Update_rows_log_event
::
do_exec_row
(
const
R
ELAY_LOG_INFO
*
const
rli
)
Update_rows_log_event
::
do_exec_row
(
const
R
elay_log_info
*
const
rli
)
{
{
DBUG_ASSERT
(
m_table
!=
NULL
);
DBUG_ASSERT
(
m_table
!=
NULL
);
...
...
sql/log_event.h
View file @
4581efe9
...
@@ -829,7 +829,7 @@ class Log_event
...
@@ -829,7 +829,7 @@ class Log_event
@see do_apply_event
@see do_apply_event
*/
*/
int
apply_event
(
R
ELAY_LOG_INFO
const
*
rli
)
int
apply_event
(
R
elay_log_info
const
*
rli
)
{
{
return
do_apply_event
(
rli
);
return
do_apply_event
(
rli
);
}
}
...
@@ -2291,20 +2291,20 @@ class Rows_log_event : public Log_event
...
@@ -2291,20 +2291,20 @@ class Rows_log_event : public Log_event
uchar
*
m_rows_cur
;
/* One-after the end of the data */
uchar
*
m_rows_cur
;
/* One-after the end of the data */
uchar
*
m_rows_end
;
/* One-after the end of the allocated space */
uchar
*
m_rows_end
;
/* One-after the end of the allocated space */
const
uchar
*
m_curr_row
;
/* Start of the row being processed */
const
uchar
*
m_curr_row_end
;
/* One-after the end of the current row */
flag_set
m_flags
;
/* Flags for row-level events */
flag_set
m_flags
;
/* Flags for row-level events */
uchar
*
m_key
;
/* Buffer to keep key value during searches */
/* helper functions */
/* helper functions */
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
int
find_row
(
const
RELAY_LOG_INFO
*
const
);
const
uchar
*
m_curr_row
;
/* Start of the row being processed */
int
write_row
(
const
RELAY_LOG_INFO
*
const
,
const
bool
);
const
uchar
*
m_curr_row_end
;
/* One-after the end of the current row */
uchar
*
m_key
;
/* Buffer to keep key value during searches */
int
find_row
(
const
Relay_log_info
*
const
);
int
write_row
(
const
Relay_log_info
*
const
,
const
bool
);
// Unpack the current row into m_table->record[0]
// Unpack the current row into m_table->record[0]
int
unpack_current_row
(
const
R
ELAY_LOG_INFO
*
const
rli
)
int
unpack_current_row
(
const
R
elay_log_info
*
const
rli
)
{
{
DBUG_ASSERT
(
m_table
);
DBUG_ASSERT
(
m_table
);
return
::
unpack_row
(
rli
,
m_table
,
m_width
,
m_curr_row
,
&
m_cols
,
return
::
unpack_row
(
rli
,
m_table
,
m_width
,
m_curr_row
,
&
m_cols
,
...
@@ -2368,7 +2368,7 @@ class Rows_log_event : public Log_event
...
@@ -2368,7 +2368,7 @@ class Rows_log_event : public Log_event
0 if execution succeeded, 1 if execution failed.
0 if execution succeeded, 1 if execution failed.
*/
*/
virtual
int
do_exec_row
(
const
R
ELAY_LOG_INFO
*
const
rli
)
=
0
;
virtual
int
do_exec_row
(
const
R
elay_log_info
*
const
rli
)
=
0
;
#endif
/* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
#endif
/* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
friend
class
Old_rows_log_event
;
friend
class
Old_rows_log_event
;
...
@@ -2424,7 +2424,7 @@ class Write_rows_log_event : public Rows_log_event
...
@@ -2424,7 +2424,7 @@ class Write_rows_log_event : public Rows_log_event
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
virtual
int
do_before_row_operations
(
const
Slave_reporting_capability
*
const
);
virtual
int
do_before_row_operations
(
const
Slave_reporting_capability
*
const
);
virtual
int
do_after_row_operations
(
const
Slave_reporting_capability
*
const
,
int
);
virtual
int
do_after_row_operations
(
const
Slave_reporting_capability
*
const
,
int
);
virtual
int
do_exec_row
(
const
R
ELAY_LOG_INFO
*
const
);
virtual
int
do_exec_row
(
const
R
elay_log_info
*
const
);
#endif
#endif
};
};
...
@@ -2498,7 +2498,7 @@ class Update_rows_log_event : public Rows_log_event
...
@@ -2498,7 +2498,7 @@ class Update_rows_log_event : public Rows_log_event
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
virtual
int
do_before_row_operations
(
const
Slave_reporting_capability
*
const
);
virtual
int
do_before_row_operations
(
const
Slave_reporting_capability
*
const
);
virtual
int
do_after_row_operations
(
const
Slave_reporting_capability
*
const
,
int
);
virtual
int
do_after_row_operations
(
const
Slave_reporting_capability
*
const
,
int
);
virtual
int
do_exec_row
(
const
R
ELAY_LOG_INFO
*
const
);
virtual
int
do_exec_row
(
const
R
elay_log_info
*
const
);
#endif
/* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
#endif
/* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
};
};
...
@@ -2563,7 +2563,7 @@ class Delete_rows_log_event : public Rows_log_event
...
@@ -2563,7 +2563,7 @@ class Delete_rows_log_event : public Rows_log_event
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
virtual
int
do_before_row_operations
(
const
Slave_reporting_capability
*
const
);
virtual
int
do_before_row_operations
(
const
Slave_reporting_capability
*
const
);
virtual
int
do_after_row_operations
(
const
Slave_reporting_capability
*
const
,
int
);
virtual
int
do_after_row_operations
(
const
Slave_reporting_capability
*
const
,
int
);
virtual
int
do_exec_row
(
const
R
ELAY_LOG_INFO
*
const
);
virtual
int
do_exec_row
(
const
R
elay_log_info
*
const
);
#endif
#endif
};
};
...
...
sql/log_event_old.cc
View file @
4581efe9
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
// Old implementation of do_apply_event()
// Old implementation of do_apply_event()
int
int
Old_rows_log_event
::
do_apply_event
(
Rows_log_event
*
ev
,
const
R
ELAY_LOG_INFO
*
rli
)
Old_rows_log_event
::
do_apply_event
(
Rows_log_event
*
ev
,
const
R
elay_log_info
*
rli
)
{
{
DBUG_ENTER
(
"Rows_log_event::do_apply_event(st_relay_log_info*)"
);
DBUG_ENTER
(
"Rows_log_event::do_apply_event(st_relay_log_info*)"
);
int
error
=
0
;
int
error
=
0
;
...
@@ -32,7 +32,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -32,7 +32,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
*/
*/
DBUG_ASSERT
(
ev
->
get_flags
(
Rows_log_event
::
STMT_END_F
));
DBUG_ASSERT
(
ev
->
get_flags
(
Rows_log_event
::
STMT_END_F
));
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
clear_tables_to_lock
();
const_cast
<
R
elay_log_info
*>
(
rli
)
->
clear_tables_to_lock
();
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
thd
->
clear_error
();
thd
->
clear_error
();
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
@@ -88,7 +88,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -88,7 +88,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
"Error in %s event: when locking tables"
,
"Error in %s event: when locking tables"
,
ev
->
get_type_str
());
ev
->
get_type_str
());
}
}
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
clear_tables_to_lock
();
const_cast
<
R
elay_log_info
*>
(
rli
)
->
clear_tables_to_lock
();
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
...
@@ -125,7 +125,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -125,7 +125,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
"unexpected success or fatal error"
));
"unexpected success or fatal error"
));
thd
->
query_error
=
1
;
thd
->
query_error
=
1
;
}
}
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
clear_tables_to_lock
();
const_cast
<
R
elay_log_info
*>
(
rli
)
->
clear_tables_to_lock
();
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
}
}
...
@@ -147,7 +147,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -147,7 +147,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
mysql_unlock_tables
(
thd
,
thd
->
lock
);
mysql_unlock_tables
(
thd
,
thd
->
lock
);
thd
->
lock
=
0
;
thd
->
lock
=
0
;
thd
->
query_error
=
1
;
thd
->
query_error
=
1
;
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
clear_tables_to_lock
();
const_cast
<
R
elay_log_info
*>
(
rli
)
->
clear_tables_to_lock
();
DBUG_RETURN
(
Rows_log_event
::
ERR_BAD_TABLE_DEF
);
DBUG_RETURN
(
Rows_log_event
::
ERR_BAD_TABLE_DEF
);
}
}
}
}
...
@@ -169,14 +169,14 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -169,14 +169,14 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
*/
*/
for
(
TABLE_LIST
*
ptr
=
rli
->
tables_to_lock
;
ptr
;
ptr
=
ptr
->
next_global
)
for
(
TABLE_LIST
*
ptr
=
rli
->
tables_to_lock
;
ptr
;
ptr
=
ptr
->
next_global
)
{
{
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
m_table_map
.
set_table
(
ptr
->
table_id
,
ptr
->
table
);
const_cast
<
R
elay_log_info
*>
(
rli
)
->
m_table_map
.
set_table
(
ptr
->
table_id
,
ptr
->
table
);
}
}
#ifdef HAVE_QUERY_CACHE
#ifdef HAVE_QUERY_CACHE
query_cache
.
invalidate_locked_for_write
(
rli
->
tables_to_lock
);
query_cache
.
invalidate_locked_for_write
(
rli
->
tables_to_lock
);
#endif
#endif
}
}
TABLE
*
table
=
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
m_table_map
.
get_table
(
ev
->
m_table_id
);
TABLE
*
table
=
const_cast
<
R
elay_log_info
*>
(
rli
)
->
m_table_map
.
get_table
(
ev
->
m_table_id
);
if
(
table
)
if
(
table
)
{
{
...
@@ -221,7 +221,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -221,7 +221,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
inside a statement and halting abruptly might cause problems
inside a statement and halting abruptly might cause problems
when restarting.
when restarting.
*/
*/
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
set_flag
(
RELAY_LOG_INFO
::
IN_STMT
);
const_cast
<
R
elay_log_info
*>
(
rli
)
->
set_flag
(
Relay_log_info
::
IN_STMT
);
error
=
do_before_row_operations
(
table
);
error
=
do_before_row_operations
(
table
);
while
(
error
==
0
&&
row_start
<
ev
->
m_rows_end
)
while
(
error
==
0
&&
row_start
<
ev
->
m_rows_end
)
...
@@ -262,7 +262,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -262,7 +262,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
row_start
=
row_end
;
row_start
=
row_end
;
}
}
DBUG_EXECUTE_IF
(
"STOP_SLAVE_after_first_Rows_event"
,
DBUG_EXECUTE_IF
(
"STOP_SLAVE_after_first_Rows_event"
,
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
abort_slave
=
1
;);
const_cast
<
R
elay_log_info
*>
(
rli
)
->
abort_slave
=
1
;);
error
=
do_after_row_operations
(
table
,
error
);
error
=
do_after_row_operations
(
table
,
error
);
if
(
!
ev
->
cache_stmt
)
if
(
!
ev
->
cache_stmt
)
{
{
...
@@ -276,7 +276,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -276,7 +276,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
The table def is needed in unpack_row().
The table def is needed in unpack_row().
*/
*/
if
(
rli
->
tables_to_lock
&&
ev
->
get_flags
(
Rows_log_event
::
STMT_END_F
))
if
(
rli
->
tables_to_lock
&&
ev
->
get_flags
(
Rows_log_event
::
STMT_END_F
))
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
clear_tables_to_lock
();
const_cast
<
R
elay_log_info
*>
(
rli
)
->
clear_tables_to_lock
();
if
(
error
)
if
(
error
)
{
/* error has occured during the transaction */
{
/* error has occured during the transaction */
...
@@ -299,7 +299,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -299,7 +299,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
rollback at the caller along with sbr.
rollback at the caller along with sbr.
*/
*/
thd
->
reset_current_stmt_binlog_row_based
();
thd
->
reset_current_stmt_binlog_row_based
();
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
cleanup_context
(
thd
,
error
);
const_cast
<
R
elay_log_info
*>
(
rli
)
->
cleanup_context
(
thd
,
error
);
thd
->
query_error
=
1
;
thd
->
query_error
=
1
;
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
...
@@ -329,7 +329,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
...
@@ -329,7 +329,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
problem. When WL#2975 is implemented, just remove the member
problem. When WL#2975 is implemented, just remove the member
st_relay_log_info::last_event_start_time and all its occurences.
st_relay_log_info::last_event_start_time and all its occurences.
*/
*/
const_cast
<
R
ELAY_LOG_INFO
*>
(
rli
)
->
last_event_start_time
=
my_time
(
0
);
const_cast
<
R
elay_log_info
*>
(
rli
)
->
last_event_start_time
=
my_time
(
0
);
}
}
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
...
sql/log_event_old.h
View file @
4581efe9
...
@@ -31,7 +31,7 @@ class Old_rows_log_event
...
@@ -31,7 +31,7 @@ class Old_rows_log_event
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
int
do_apply_event
(
Rows_log_event
*
,
const
R
ELAY_LOG_INFO
*
);
int
do_apply_event
(
Rows_log_event
*
,
const
R
elay_log_info
*
);
/*
/*
Primitive to prepare for a sequence of row executions.
Primitive to prepare for a sequence of row executions.
...
@@ -80,7 +80,7 @@ class Old_rows_log_event
...
@@ -80,7 +80,7 @@ class Old_rows_log_event
RETURN VALUE
RETURN VALUE
Error code, if something went wrong, 0 otherwise.
Error code, if something went wrong, 0 otherwise.
*/
*/
virtual
int
do_prepare_row
(
THD
*
,
R
ELAY_LOG_INFO
const
*
,
TABLE
*
,
virtual
int
do_prepare_row
(
THD
*
,
R
elay_log_info
const
*
,
TABLE
*
,
uchar
const
*
row_start
,
uchar
const
*
row_start
,
uchar
const
**
row_end
)
=
0
;
uchar
const
**
row_end
)
=
0
;
...
@@ -131,13 +131,13 @@ class Write_rows_log_event_old
...
@@ -131,13 +131,13 @@ class Write_rows_log_event_old
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
// use old definition of do_apply_event()
// use old definition of do_apply_event()
virtual
int
do_apply_event
(
const
R
ELAY_LOG_INFO
*
rli
)
virtual
int
do_apply_event
(
const
R
elay_log_info
*
rli
)
{
return
Old_rows_log_event
::
do_apply_event
(
this
,
rli
);
}
{
return
Old_rows_log_event
::
do_apply_event
(
this
,
rli
);
}
// primitives for old version of do_apply_event()
// primitives for old version of do_apply_event()
virtual
int
do_before_row_operations
(
TABLE
*
table
);
virtual
int
do_before_row_operations
(
TABLE
*
table
);
virtual
int
do_after_row_operations
(
TABLE
*
table
,
int
error
);
virtual
int
do_after_row_operations
(
TABLE
*
table
,
int
error
);
virtual
int
do_prepare_row
(
THD
*
,
R
ELAY_LOG_INFO
const
*
,
TABLE
*
,
virtual
int
do_prepare_row
(
THD
*
,
R
elay_log_info
const
*
,
TABLE
*
,
uchar
const
*
row_start
,
uchar
const
**
row_end
);
uchar
const
*
row_start
,
uchar
const
**
row_end
);
virtual
int
do_exec_row
(
TABLE
*
table
);
virtual
int
do_exec_row
(
TABLE
*
table
);
...
@@ -179,13 +179,13 @@ class Update_rows_log_event_old
...
@@ -179,13 +179,13 @@ class Update_rows_log_event_old
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
// use old definition of do_apply_event()
// use old definition of do_apply_event()
virtual
int
do_apply_event
(
const
R
ELAY_LOG_INFO
*
rli
)
virtual
int
do_apply_event
(
const
R
elay_log_info
*
rli
)
{
return
Old_rows_log_event
::
do_apply_event
(
this
,
rli
);
}
{
return
Old_rows_log_event
::
do_apply_event
(
this
,
rli
);
}
// primitives for old version of do_apply_event()
// primitives for old version of do_apply_event()
virtual
int
do_before_row_operations
(
TABLE
*
table
);
virtual
int
do_before_row_operations
(
TABLE
*
table
);
virtual
int
do_after_row_operations
(
TABLE
*
table
,
int
error
);
virtual
int
do_after_row_operations
(
TABLE
*
table
,
int
error
);
virtual
int
do_prepare_row
(
THD
*
,
R
ELAY_LOG_INFO
const
*
,
TABLE
*
,
virtual
int
do_prepare_row
(
THD
*
,
R
elay_log_info
const
*
,
TABLE
*
,
uchar
const
*
row_start
,
uchar
const
**
row_end
);
uchar
const
*
row_start
,
uchar
const
**
row_end
);
virtual
int
do_exec_row
(
TABLE
*
table
);
virtual
int
do_exec_row
(
TABLE
*
table
);
#endif
/* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
#endif
/* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
...
@@ -226,13 +226,13 @@ class Delete_rows_log_event_old
...
@@ -226,13 +226,13 @@ class Delete_rows_log_event_old
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
// use old definition of do_apply_event()
// use old definition of do_apply_event()
virtual
int
do_apply_event
(
const
R
ELAY_LOG_INFO
*
rli
)
virtual
int
do_apply_event
(
const
R
elay_log_info
*
rli
)
{
return
Old_rows_log_event
::
do_apply_event
(
this
,
rli
);
}
{
return
Old_rows_log_event
::
do_apply_event
(
this
,
rli
);
}
// primitives for old version of do_apply_event()
// primitives for old version of do_apply_event()
virtual
int
do_before_row_operations
(
TABLE
*
table
);
virtual
int
do_before_row_operations
(
TABLE
*
table
);
virtual
int
do_after_row_operations
(
TABLE
*
table
,
int
error
);
virtual
int
do_after_row_operations
(
TABLE
*
table
,
int
error
);
virtual
int
do_prepare_row
(
THD
*
,
R
ELAY_LOG_INFO
const
*
,
TABLE
*
,
virtual
int
do_prepare_row
(
THD
*
,
R
elay_log_info
const
*
,
TABLE
*
,
uchar
const
*
row_start
,
uchar
const
**
row_end
);
uchar
const
*
row_start
,
uchar
const
**
row_end
);
virtual
int
do_exec_row
(
TABLE
*
table
);
virtual
int
do_exec_row
(
TABLE
*
table
);
#endif
#endif
...
...
sql/sql_yacc.yy
View file @
4581efe9
...
@@ -857,7 +857,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
...
@@ -857,7 +857,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token OUT_SYM /* SQL-2003-R */
%token OUT_SYM /* SQL-2003-R */
%token OWNER_SYM
%token OWNER_SYM
%token PACK_KEYS_SYM
%token PACK_KEYS_SYM
%token PAGE_SYM
%token PARAM_MARKER
%token PARAM_MARKER
%token PARSER_SYM
%token PARSER_SYM
%token PARTIAL /* SQL-2003-N */
%token PARTIAL /* SQL-2003-N */
...
@@ -1010,7 +1009,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
...
@@ -1010,7 +1009,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token TO_SYM /* SQL-2003-R */
%token TO_SYM /* SQL-2003-R */
%token TRAILING /* SQL-2003-R */
%token TRAILING /* SQL-2003-R */
%token TRANSACTION_SYM
%token TRANSACTION_SYM
%token TRANSACTIONAL_SYM
%token TRIGGERS_SYM
%token TRIGGERS_SYM
%token TRIGGER_SYM /* SQL-2003-R */
%token TRIGGER_SYM /* SQL-2003-R */
%token TRIM /* SQL-2003-N */
%token TRIM /* SQL-2003-N */
...
@@ -4366,12 +4364,6 @@ create_table_option:
...
@@ -4366,12 +4364,6 @@ create_table_option:
Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
Lex->create_info.key_block_size= $3;
Lex->create_info.key_block_size= $3;
}
}
| TRANSACTIONAL_SYM opt_equal ulong_num
{
Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
Lex->create_info.transactional= ($3 != 0 ? HA_CHOICE_YES :
HA_CHOICE_NO);
}
;
;
default_charset:
default_charset:
...
@@ -4450,8 +4442,7 @@ row_types:
...
@@ -4450,8 +4442,7 @@ row_types:
| DYNAMIC_SYM { $$= ROW_TYPE_DYNAMIC; }
| DYNAMIC_SYM { $$= ROW_TYPE_DYNAMIC; }
| COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; }
| COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; }
| REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; }
| REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; }
| COMPACT_SYM { $$= ROW_TYPE_COMPACT; }
| COMPACT_SYM { $$= ROW_TYPE_COMPACT; };
| PAGE_SYM { $$= ROW_TYPE_PAGE; };
merge_insert_types:
merge_insert_types:
NO_SYM { $$= MERGE_INSERT_DISABLED; }
NO_SYM { $$= MERGE_INSERT_DISABLED; }
...
@@ -10082,7 +10073,6 @@ keyword_sp:
...
@@ -10082,7 +10073,6 @@ keyword_sp:
| ONE_SHOT_SYM {}
| ONE_SHOT_SYM {}
| ONE_SYM {}
| ONE_SYM {}
| PACK_KEYS_SYM {}
| PACK_KEYS_SYM {}
| PAGE_SYM {}
| PARTIAL {}
| PARTIAL {}
| PARTITIONING_SYM {}
| PARTITIONING_SYM {}
| PARTITIONS_SYM {}
| PARTITIONS_SYM {}
...
@@ -10152,7 +10142,6 @@ keyword_sp:
...
@@ -10152,7 +10142,6 @@ keyword_sp:
| TEXT_SYM {}
| TEXT_SYM {}
| THAN_SYM {}
| THAN_SYM {}
| TRANSACTION_SYM {}
| TRANSACTION_SYM {}
| TRANSACTIONAL_SYM {}
| TRIGGERS_SYM {}
| TRIGGERS_SYM {}
| TIMESTAMP {}
| TIMESTAMP {}
| TIMESTAMP_ADD {}
| TIMESTAMP_ADD {}
...
...
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