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
e5acb070
Commit
e5acb070
authored
Jun 19, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.1-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B26418-5.1-opt
parents
46405f5a
bef15b27
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
168 additions
and
150 deletions
+168
-150
mysql-test/r/rpl_innodb.result
mysql-test/r/rpl_innodb.result
+70
-0
mysql-test/t/rpl_innodb.test
mysql-test/t/rpl_innodb.test
+71
-0
sql/events.cc
sql/events.cc
+3
-18
sql/sp.cc
sql/sp.cc
+2
-14
sql/sql_acl.cc
sql/sql_acl.cc
+7
-38
sql/sql_class.cc
sql/sql_class.cc
+0
-9
sql/sql_class.h
sql/sql_class.h
+0
-1
sql/sql_delete.cc
sql/sql_delete.cc
+5
-10
sql/sql_parse.cc
sql/sql_parse.cc
+4
-23
sql/sql_rename.cc
sql/sql_rename.cc
+1
-6
sql/sql_tablespace.cc
sql/sql_tablespace.cc
+1
-5
sql/sql_trigger.cc
sql/sql_trigger.cc
+1
-8
sql/sql_udf.cc
sql/sql_udf.cc
+2
-12
sql/sql_view.cc
sql/sql_view.cc
+1
-6
No files found.
mysql-test/r/rpl_innodb.result
View file @
e5acb070
...
@@ -35,3 +35,73 @@ SELECT * FROM t4;
...
@@ -35,3 +35,73 @@ SELECT * FROM t4;
id name number
id name number
3 XXX 12345
3 XXX 12345
4 XXY 12345
4 XXY 12345
FLUSH LOGS;
FLUSH LOGS;
DROP DATABASE IF EXISTS mysqltest1;
CREATE DATABASE mysqltest1;
CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT);
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB";
SET AUTOCOMMIT = 0;
-------- switch to slave --------
SHOW CREATE TABLE mysqltest1.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` bigint(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-------- switch to master --------
INSERT INTO mysqltest1.t1 SET f1= 1;
DROP TEMPORARY TABLE mysqltest1.tmp;
ROLLBACK;
SHOW CREATE TABLE mysqltest1.tmp;
ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*)
0
INSERT INTO mysqltest1.t1 SET f1= 2;
CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT);
ROLLBACK;
SHOW CREATE TABLE mysqltest1.tmp2;
Table Create Table
tmp2 CREATE TEMPORARY TABLE `tmp2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*)
0
-------- switch to slave --------
SHOW CREATE TABLE mysqltest1.tmp;
ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
SHOW CREATE TABLE mysqltest1.tmp2;
ERROR 42S02: Table 'mysqltest1.tmp2' doesn't exist
SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*)
2
FLUSH LOGS;
SHOW BINLOG EVENTS IN 'slave-bin.000002' LIMIT 1,8;
Log_name Pos Event_type Server_id End_log_pos Info
x x x x x DROP DATABASE IF EXISTS mysqltest1
x x x x x CREATE DATABASE mysqltest1
x x x x x use `test`; CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT)
x x x x x use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB"
x x x x x use `test`; INSERT INTO mysqltest1.t1 SET f1= 1
x x x x x use `test`; DROP TEMPORARY TABLE mysqltest1.tmp
x x x x x use `test`; INSERT INTO mysqltest1.t1 SET f1= 2
x x x x x use `test`; CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT)
-------- switch to master --------
FLUSH LOGS;
SHOW BINLOG EVENTS IN 'master-bin.000002' LIMIT 1,12;
Log_name Pos Event_type Server_id End_log_pos Info
x x x x x DROP DATABASE IF EXISTS mysqltest1
x x x x x CREATE DATABASE mysqltest1
x x x x x use `test`; CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT)
x x x x x use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB"
x x x x x use `test`; BEGIN
x x x x x use `test`; INSERT INTO mysqltest1.t1 SET f1= 1
x x x x x use `test`; DROP TEMPORARY TABLE mysqltest1.tmp
x x x x x use `test`; ROLLBACK
x x x x x use `test`; BEGIN
x x x x x use `test`; INSERT INTO mysqltest1.t1 SET f1= 2
x x x x x use `test`; CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT)
x x x x x use `test`; ROLLBACK
DROP DATABASE mysqltest1;
End of 5.1 tests
mysql-test/t/rpl_innodb.test
View file @
e5acb070
...
@@ -44,5 +44,76 @@ connection master;
...
@@ -44,5 +44,76 @@ connection master;
DROP
TABLE
t4
;
DROP
TABLE
t4
;
--
enable_query_log
--
enable_query_log
sync_slave_with_master
;
sync_slave_with_master
;
connection
master
;
# End of 4.1 tests
# End of 4.1 tests
#
# Bug #26418: Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK
# on master
#
#Note Matthias: to be merged to rpl_ddl.test
--
source
include
/
not_ndb_default
.
inc
FLUSH
LOGS
;
sync_slave_with_master
;
FLUSH
LOGS
;
connection
master
;
let
$engine_type
=
"InnoDB"
;
--
disable_warnings
DROP
DATABASE
IF
EXISTS
mysqltest1
;
--
enable_warnings
CREATE
DATABASE
mysqltest1
;
CREATE
TEMPORARY
TABLE
mysqltest1
.
tmp
(
f1
BIGINT
);
eval
CREATE
TABLE
mysqltest1
.
t1
(
f1
BIGINT
)
ENGINE
=
$engine_type
;
SET
AUTOCOMMIT
=
0
;
sync_slave_with_master
;
--
echo
--------
switch
to
slave
--------
connection
slave
;
SHOW
CREATE
TABLE
mysqltest1
.
t1
;
--
echo
--------
switch
to
master
--------
connection
master
;
INSERT
INTO
mysqltest1
.
t1
SET
f1
=
1
;
DROP
TEMPORARY
TABLE
mysqltest1
.
tmp
;
ROLLBACK
;
--
error
ER_NO_SUCH_TABLE
SHOW
CREATE
TABLE
mysqltest1
.
tmp
;
# Must return no rows here
SELECT
COUNT
(
*
)
FROM
mysqltest1
.
t1
;
INSERT
INTO
mysqltest1
.
t1
SET
f1
=
2
;
CREATE
TEMPORARY
TABLE
mysqltest1
.
tmp2
(
a
INT
);
ROLLBACK
;
SHOW
CREATE
TABLE
mysqltest1
.
tmp2
;
# Must return no rows here
SELECT
COUNT
(
*
)
FROM
mysqltest1
.
t1
;
sync_slave_with_master
;
--
echo
--------
switch
to
slave
--------
connection
slave
;
--
error
ER_NO_SUCH_TABLE
SHOW
CREATE
TABLE
mysqltest1
.
tmp
;
--
error
ER_NO_SUCH_TABLE
SHOW
CREATE
TABLE
mysqltest1
.
tmp2
;
# has two rows here : as the default is MyISAM and
# it can't be rolled back by the master's ROLLBACK.
SELECT
COUNT
(
*
)
FROM
mysqltest1
.
t1
;
FLUSH
LOGS
;
--
replace_column
1
x
2
x
3
x
4
x
5
x
SHOW
BINLOG
EVENTS
IN
'slave-bin.000002'
LIMIT
1
,
8
;
--
echo
--------
switch
to
master
--------
connection
master
;
FLUSH
LOGS
;
--
replace_column
1
x
2
x
3
x
4
x
5
x
SHOW
BINLOG
EVENTS
IN
'master-bin.000002'
LIMIT
1
,
12
;
DROP
DATABASE
mysqltest1
;
--
source
include
/
master
-
slave
-
end
.
inc
--
echo
End
of
5.1
tests
sql/events.cc
View file @
e5acb070
...
@@ -425,12 +425,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data,
...
@@ -425,12 +425,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data,
event_queue
->
create_event
(
thd
,
new_element
,
&
created
);
event_queue
->
create_event
(
thd
,
new_element
,
&
created
);
/* Binlog the create event. */
/* Binlog the create event. */
DBUG_ASSERT
(
thd
->
query
&&
thd
->
query_length
);
DBUG_ASSERT
(
thd
->
query
&&
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
}
}
}
}
pthread_mutex_unlock
(
&
LOCK_event_metadata
);
pthread_mutex_unlock
(
&
LOCK_event_metadata
);
...
@@ -551,12 +546,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data,
...
@@ -551,12 +546,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data,
new_element
);
new_element
);
/* Binlog the alter event. */
/* Binlog the alter event. */
DBUG_ASSERT
(
thd
->
query
&&
thd
->
query_length
);
DBUG_ASSERT
(
thd
->
query
&&
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
}
}
}
}
pthread_mutex_unlock
(
&
LOCK_event_metadata
);
pthread_mutex_unlock
(
&
LOCK_event_metadata
);
...
@@ -631,12 +621,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists)
...
@@ -631,12 +621,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists)
event_queue
->
drop_event
(
thd
,
dbname
,
name
);
event_queue
->
drop_event
(
thd
,
dbname
,
name
);
/* Binlog the drop event. */
/* Binlog the drop event. */
DBUG_ASSERT
(
thd
->
query
&&
thd
->
query_length
);
DBUG_ASSERT
(
thd
->
query
&&
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
}
}
pthread_mutex_unlock
(
&
LOCK_event_metadata
);
pthread_mutex_unlock
(
&
LOCK_event_metadata
);
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
...
...
sql/sp.cc
View file @
e5acb070
...
@@ -650,13 +650,7 @@ sp_drop_routine(THD *thd, int type, sp_name *name)
...
@@ -650,13 +650,7 @@ sp_drop_routine(THD *thd, int type, sp_name *name)
if
(
ret
==
SP_OK
)
if
(
ret
==
SP_OK
)
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
sp_cache_invalidate
();
sp_cache_invalidate
();
}
}
...
@@ -723,13 +717,7 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
...
@@ -723,13 +717,7 @@ sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
if
(
ret
==
SP_OK
)
if
(
ret
==
SP_OK
)
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
sp_cache_invalidate
();
sp_cache_invalidate
();
}
}
...
...
sql/sql_acl.cc
View file @
e5acb070
...
@@ -3143,12 +3143,7 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list,
...
@@ -3143,12 +3143,7 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list,
if
(
!
result
)
/* success */
if
(
!
result
)
/* success */
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
}
}
rw_unlock
(
&
LOCK_grant
);
rw_unlock
(
&
LOCK_grant
);
...
@@ -3315,12 +3310,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc,
...
@@ -3315,12 +3310,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc,
pthread_mutex_unlock
(
&
acl_cache
->
lock
);
pthread_mutex_unlock
(
&
acl_cache
->
lock
);
if
(
!
result
&&
!
no_error
)
if
(
!
result
&&
!
no_error
)
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
}
}
rw_unlock
(
&
LOCK_grant
);
rw_unlock
(
&
LOCK_grant
);
...
@@ -3435,12 +3425,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
...
@@ -3435,12 +3425,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
if
(
!
result
)
if
(
!
result
)
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
}
}
rw_unlock
(
&
LOCK_grant
);
rw_unlock
(
&
LOCK_grant
);
...
@@ -5469,11 +5454,7 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list)
...
@@ -5469,11 +5454,7 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list)
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
FALSE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
rw_unlock
(
&
LOCK_grant
);
rw_unlock
(
&
LOCK_grant
);
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
...
@@ -5539,11 +5520,7 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list)
...
@@ -5539,11 +5520,7 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list)
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
FALSE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
rw_unlock
(
&
LOCK_grant
);
rw_unlock
(
&
LOCK_grant
);
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
...
@@ -5622,11 +5599,7 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list)
...
@@ -5622,11 +5599,7 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list)
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
FALSE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
rw_unlock
(
&
LOCK_grant
);
rw_unlock
(
&
LOCK_grant
);
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
...
@@ -5810,11 +5783,7 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
...
@@ -5810,11 +5783,7 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
FALSE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
rw_unlock
(
&
LOCK_grant
);
rw_unlock
(
&
LOCK_grant
);
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
...
...
sql/sql_class.cc
View file @
e5acb070
...
@@ -3028,15 +3028,6 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end)
...
@@ -3028,15 +3028,6 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end)
}
}
void
THD
::
binlog_delete_pending_rows_event
()
{
if
(
Rows_log_event
*
pending
=
binlog_get_pending_rows_event
())
{
delete
pending
;
binlog_set_pending_rows_event
(
0
);
}
}
/*
/*
Member function that will log query, either row-based or
Member function that will log query, either row-based or
statement-based depending on the value of the 'current_stmt_binlog_row_based'
statement-based depending on the value of the 'current_stmt_binlog_row_based'
...
...
sql/sql_class.h
View file @
e5acb070
...
@@ -1096,7 +1096,6 @@ public:
...
@@ -1096,7 +1096,6 @@ public:
Rows_log_event
*
binlog_get_pending_rows_event
()
const
;
Rows_log_event
*
binlog_get_pending_rows_event
()
const
;
void
binlog_set_pending_rows_event
(
Rows_log_event
*
ev
);
void
binlog_set_pending_rows_event
(
Rows_log_event
*
ev
);
int
binlog_flush_pending_rows_event
(
bool
stmt_end
);
int
binlog_flush_pending_rows_event
(
bool
stmt_end
);
void
binlog_delete_pending_rows_event
();
private:
private:
uint
binlog_table_maps
;
// Number of table maps currently in the binlog
uint
binlog_table_maps
;
// Number of table maps currently in the binlog
...
...
sql/sql_delete.cc
View file @
e5acb070
...
@@ -974,17 +974,12 @@ end:
...
@@ -974,17 +974,12 @@ end:
if
(
!
dont_send_ok
)
if
(
!
dont_send_ok
)
{
{
if
(
!
error
)
if
(
!
error
)
{
if
(
mysql_bin_log
.
is_open
())
{
{
/*
/*
TRUNCATE must always be statement-based binlogged (not row-based) so
TRUNCATE must always be statement-based binlogged (not row-based) so
we don't test current_stmt_binlog_row_based.
we don't test current_stmt_binlog_row_based.
*/
*/
thd
->
clear_error
();
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
send_ok
(
thd
);
// This should return record count
send_ok
(
thd
);
// This should return record count
}
}
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
...
...
sql/sql_parse.cc
View file @
e5acb070
...
@@ -2506,12 +2506,7 @@ end_with_restore_list:
...
@@ -2506,12 +2506,7 @@ end_with_restore_list:
/*
/*
Presumably, REPAIR and binlog writing doesn't require synchronization
Presumably, REPAIR and binlog writing doesn't require synchronization
*/
*/
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
// No binlog error generated
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
0
,
FALSE
);
}
}
}
select_lex
->
table_list
.
first
=
(
uchar
*
)
first_table
;
select_lex
->
table_list
.
first
=
(
uchar
*
)
first_table
;
lex
->
query_tables
=
all_tables
;
lex
->
query_tables
=
all_tables
;
...
@@ -2541,12 +2536,7 @@ end_with_restore_list:
...
@@ -2541,12 +2536,7 @@ end_with_restore_list:
/*
/*
Presumably, ANALYZE and binlog writing doesn't require synchronization
Presumably, ANALYZE and binlog writing doesn't require synchronization
*/
*/
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
// No binlog error generated
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
0
,
FALSE
);
}
}
}
select_lex
->
table_list
.
first
=
(
uchar
*
)
first_table
;
select_lex
->
table_list
.
first
=
(
uchar
*
)
first_table
;
lex
->
query_tables
=
all_tables
;
lex
->
query_tables
=
all_tables
;
...
@@ -2568,12 +2558,7 @@ end_with_restore_list:
...
@@ -2568,12 +2558,7 @@ end_with_restore_list:
/*
/*
Presumably, OPTIMIZE and binlog writing doesn't require synchronization
Presumably, OPTIMIZE and binlog writing doesn't require synchronization
*/
*/
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
// No binlog error generated
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
0
,
FALSE
);
}
}
}
select_lex
->
table_list
.
first
=
(
uchar
*
)
first_table
;
select_lex
->
table_list
.
first
=
(
uchar
*
)
first_table
;
lex
->
query_tables
=
all_tables
;
lex
->
query_tables
=
all_tables
;
...
@@ -3473,11 +3458,7 @@ end_with_restore_list:
...
@@ -3473,11 +3458,7 @@ end_with_restore_list:
*/
*/
if
(
!
lex
->
no_write_to_binlog
&&
write_to_binlog
)
if
(
!
lex
->
no_write_to_binlog
&&
write_to_binlog
)
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
FALSE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
0
,
FALSE
);
}
}
}
send_ok
(
thd
);
send_ok
(
thd
);
}
}
...
...
sql/sql_rename.cc
View file @
e5acb070
...
@@ -174,12 +174,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
...
@@ -174,12 +174,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
/* Lets hope this doesn't fail as the result will be messy */
/* Lets hope this doesn't fail as the result will be messy */
if
(
!
silent
&&
!
error
)
if
(
!
silent
&&
!
error
)
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
send_ok
(
thd
);
send_ok
(
thd
);
}
}
...
...
sql/sql_tablespace.cc
View file @
e5acb070
...
@@ -66,10 +66,6 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info)
...
@@ -66,10 +66,6 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info)
ha_resolve_storage_engine_name
(
hton
),
ha_resolve_storage_engine_name
(
hton
),
"TABLESPACE or LOGFILE GROUP"
);
"TABLESPACE or LOGFILE GROUP"
);
}
}
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
FALSE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
TRUE
);
}
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
}
}
sql/sql_trigger.cc
View file @
e5acb070
...
@@ -306,14 +306,7 @@ end:
...
@@ -306,14 +306,7 @@ end:
if
(
!
result
)
if
(
!
result
)
{
{
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
stmt_query
.
ptr
(),
stmt_query
.
length
());
{
thd
->
clear_error
();
/* Such a statement can always go directly to binlog, no trans cache. */
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
stmt_query
.
ptr
(),
stmt_query
.
length
(),
FALSE
,
FALSE
);
}
}
}
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
...
...
sql/sql_udf.cc
View file @
e5acb070
...
@@ -493,12 +493,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
...
@@ -493,12 +493,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
rw_unlock
(
&
THR_LOCK_udf
);
rw_unlock
(
&
THR_LOCK_udf
);
/* Binlog the create function. */
/* Binlog the create function. */
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
@@ -569,12 +564,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
...
@@ -569,12 +564,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
rw_unlock
(
&
THR_LOCK_udf
);
rw_unlock
(
&
THR_LOCK_udf
);
/* Binlog the drop function. */
/* Binlog the drop function. */
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
MYSQL_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
err:
err:
...
...
sql/sql_view.cc
View file @
e5acb070
...
@@ -1467,12 +1467,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
...
@@ -1467,12 +1467,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
if
(
mysql_bin_log
.
is_open
())
write_bin_log
(
thd
,
TRUE
,
thd
->
query
,
thd
->
query_length
);
{
thd
->
clear_error
();
thd
->
binlog_query
(
THD
::
STMT_QUERY_TYPE
,
thd
->
query
,
thd
->
query_length
,
FALSE
,
FALSE
);
}
send_ok
(
thd
);
send_ok
(
thd
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
...
...
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