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
e56c8c61
Commit
e56c8c61
authored
Dec 16, 2003
by
guilhem@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
parents
53108977
db2d812d
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
84 additions
and
5 deletions
+84
-5
mysql-test/r/rpl_EE_error.result
mysql-test/r/rpl_EE_error.result
+16
-0
mysql-test/t/rpl_EE_error.test
mysql-test/t/rpl_EE_error.test
+30
-0
sql/log_event.cc
sql/log_event.cc
+3
-3
sql/sql_acl.cc
sql/sql_acl.cc
+1
-0
sql/sql_base.cc
sql/sql_base.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+9
-0
sql/sql_db.cc
sql/sql_db.cc
+2
-0
sql/sql_delete.cc
sql/sql_delete.cc
+5
-0
sql/sql_insert.cc
sql/sql_insert.cc
+5
-1
sql/sql_parse.cc
sql/sql_parse.cc
+2
-0
sql/sql_rename.cc
sql/sql_rename.cc
+1
-0
sql/sql_table.cc
sql/sql_table.cc
+5
-0
sql/sql_update.cc
sql/sql_update.cc
+4
-0
No files found.
mysql-test/r/rpl_EE_error.result
0 → 100644
View file @
e56c8c61
slave stop;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
create table t1 (a int) type=myisam;
flush tables;
drop table t1;
create table t1 (a int, unique(a)) type=myisam;
set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
insert into t1 values(1),(2);
Duplicate entry '2' for key 1
drop table t1;
mysql-test/t/rpl_EE_error.test
0 → 100644
View file @
e56c8c61
# See if an EE_ error in one event of the master's binlog stops replication
# (it should not: in this configuration the EE_ error is probably not
# critical). Example: you do a DROP TABLE on a table which has no MYI file
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986).
source
include
/
master
-
slave
.
inc
;
create
table
t1
(
a
int
)
type
=
myisam
;
flush
tables
;
system
rm
./
var
/
master
-
data
/
test
/
t1
.
MYI
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
# Now a real error.
connection
master
;
create
table
t1
(
a
int
,
unique
(
a
))
type
=
myisam
;
set
sql_log_bin
=
0
;
insert
into
t1
values
(
2
);
set
sql_log_bin
=
1
;
save_master_pos
;
--
error
1062
;
insert
into
t1
values
(
1
),(
2
);
drop
table
t1
;
save_master_pos
;
connection
slave
;
wait_for_slave_to_stop
;
sql/log_event.cc
View file @
e56c8c61
...
...
@@ -1922,7 +1922,7 @@ Default database: '%s'",
// assume no convert for next query unless set explictly
thd
->
variables
.
convert_set
=
0
;
close_thread_tables
(
thd
);
free_root
(
&
thd
->
mem_root
,
0
);
free_root
(
&
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
)
);
return
(
thd
->
query_error
?
thd
->
query_error
:
Log_event
::
exec_event
(
rli
));
}
...
...
@@ -2094,10 +2094,10 @@ Slave: load data infile on table '%s' at log position %s in log \
slave_print_error
(
rli
,
sql_errno
,
"\
Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'"
,
err
,
(
char
*
)
table_name
,
print_slave_db_safe
(
db
));
free_root
(
&
thd
->
mem_root
,
0
);
free_root
(
&
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
)
);
return
1
;
}
free_root
(
&
thd
->
mem_root
,
0
);
free_root
(
&
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
)
);
if
(
thd
->
fatal_error
)
{
...
...
sql/sql_acl.cc
View file @
e56c8c61
...
...
@@ -1130,6 +1130,7 @@ bool change_password(THD *thd, const char *host, const char *user,
acl_user
->
user
?
acl_user
->
user
:
""
,
acl_user
->
host
.
hostname
?
acl_user
->
host
.
hostname
:
""
,
new_password
));
thd
->
clear_error
();
mysql_update_log
.
write
(
thd
,
buff
,
query_length
);
Query_log_event
qinfo
(
thd
,
buff
,
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
...
...
sql/sql_base.cc
View file @
e56c8c61
...
...
@@ -575,8 +575,8 @@ void close_temporary_tables(THD *thd)
if
(
query
&&
found_user_tables
&&
mysql_bin_log
.
is_open
())
{
/* The -1 is to remove last ',' */
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
query
,
(
ulong
)(
end
-
query
)
-
1
,
0
);
qinfo
.
error_code
=
0
;
mysql_bin_log
.
write
(
&
qinfo
);
}
thd
->
temporary_tables
=
0
;
...
...
sql/sql_class.h
View file @
e56c8c61
...
...
@@ -590,6 +590,15 @@ public:
void
add_changed_table
(
TABLE
*
table
);
void
add_changed_table
(
const
char
*
key
,
long
key_length
);
CHANGED_TABLE_LIST
*
changed_table_dup
(
const
char
*
key
,
long
key_length
);
#ifndef EMBEDDED_LIBRARY
inline
void
clear_error
()
{
net
.
last_error
[
0
]
=
0
;
net
.
last_errno
=
0
;
}
#else
void
clear_error
();
#endif
};
/* Flags for the THD::system_thread (bitmap) variable */
...
...
sql/sql_db.cc
View file @
e56c8c61
...
...
@@ -86,6 +86,7 @@ int mysql_create_db(THD *thd, char *db, uint create_options, bool silent)
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
@@ -176,6 +177,7 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
sql/sql_delete.cc
View file @
e56c8c61
...
...
@@ -181,6 +181,8 @@ cleanup:
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
if
(
error
<=
0
)
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
log_delayed
);
if
(
mysql_bin_log
.
write
(
&
qinfo
)
&&
transactional_table
)
...
...
@@ -488,6 +490,8 @@ bool multi_delete::send_eof()
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
if
(
error
<=
0
)
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
log_delayed
);
if
(
mysql_bin_log
.
write
(
&
qinfo
)
&&
!
normal_tables
)
...
...
@@ -600,6 +604,7 @@ end:
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
thd
->
tmp_table
);
mysql_bin_log
.
write
(
&
qinfo
);
...
...
sql/sql_insert.cc
View file @
e56c8c61
...
...
@@ -310,6 +310,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
if
(
error
<=
0
)
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
log_delayed
);
if
(
mysql_bin_log
.
write
(
&
qinfo
)
&&
transactional_table
)
...
...
@@ -1196,7 +1198,7 @@ bool delayed_insert::handle_inserts(void)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
using_ignore
=
1
;
}
thd
.
net
.
last_errno
=
0
;
// reset error for binlog
thd
.
clear_error
()
;
// reset error for binlog
if
(
write_record
(
table
,
&
info
))
{
info
.
error_count
++
;
// Ignore errors
...
...
@@ -1391,6 +1393,8 @@ bool select_insert::send_eof()
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
if
(
!
error
)
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
table
->
file
->
has_transactions
());
mysql_bin_log
.
write
(
&
qinfo
);
...
...
sql/sql_parse.cc
View file @
e56c8c61
...
...
@@ -2462,6 +2462,7 @@ mysql_execute_command(void)
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
@@ -2482,6 +2483,7 @@ mysql_execute_command(void)
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
sql/sql_rename.cc
View file @
e56c8c61
...
...
@@ -82,6 +82,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
sql/sql_table.cc
View file @
e56c8c61
...
...
@@ -237,6 +237,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
tmp_table_deleted
&&
!
some_tables_deleted
);
mysql_bin_log
.
write
(
&
qinfo
);
...
...
@@ -779,6 +780,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
test
(
create_info
->
options
&
HA_LEX_CREATE_TMP_TABLE
));
...
...
@@ -1561,6 +1563,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
@@ -1931,6 +1934,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
@@ -2063,6 +2067,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
0
);
mysql_bin_log
.
write
(
&
qinfo
);
}
...
...
sql/sql_update.cc
View file @
e56c8c61
...
...
@@ -319,6 +319,8 @@ int mysql_update(THD *thd,
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
if
(
error
<=
0
)
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
log_delayed
);
if
(
mysql_bin_log
.
write
(
&
qinfo
)
&&
transactional_table
)
...
...
@@ -962,6 +964,8 @@ bool multi_update::send_eof()
mysql_update_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
);
if
(
mysql_bin_log
.
is_open
())
{
if
(
local_error
<=
0
)
thd
->
clear_error
();
Query_log_event
qinfo
(
thd
,
thd
->
query
,
thd
->
query_length
,
log_delayed
);
if
(
mysql_bin_log
.
write
(
&
qinfo
)
&&
trans_safe
)
...
...
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