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
b5b72271
Commit
b5b72271
authored
Nov 25, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-qc
parents
526a67fb
32f93da0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
80 additions
and
18 deletions
+80
-18
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/rpl_start_stop_slave.result
mysql-test/r/rpl_start_stop_slave.result
+12
-0
mysql-test/t/rpl_start_stop_slave.test
mysql-test/t/rpl_start_stop_slave.test
+34
-0
sql/item_func.cc
sql/item_func.cc
+11
-8
sql/item_sum.h
sql/item_sum.h
+1
-1
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+2
-2
sql/slave.cc
sql/slave.cc
+11
-3
sql/slave.h
sql/slave.h
+2
-1
sql/sql_repl.cc
sql/sql_repl.cc
+4
-2
sql/sql_udf.h
sql/sql_udf.h
+2
-1
No files found.
BitKeeper/etc/logging_ok
View file @
b5b72271
...
...
@@ -101,6 +101,7 @@ lenz@mysql.com
magnus@neptunus.(none)
magnus@shellback.(none)
marko@hundin.mysql.fi
mats@mysql.com
matt@mysql.com
matthias@three.local.lan
miguel@hegel.(none)
...
...
mysql-test/r/rpl_start_stop_slave.result
0 → 100644
View file @
b5b72271
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;
stop slave;
create table t1(n int);
start slave;
stop slave io_thread;
start slave io_thread;
drop table t1;
mysql-test/t/rpl_start_stop_slave.test
0 → 100644
View file @
b5b72271
source
include
/
master
-
slave
.
inc
;
#
# Bug#6148 ()
#
connection
slave
;
stop
slave
;
# Let the master do lots of insertions
connection
master
;
create
table
t1
(
n
int
);
let
$
1
=
5000
;
disable_query_log
;
while
(
$
1
)
{
eval
insert
into
t1
values
(
$
1
);
dec
$
1
;
}
enable_query_log
;
save_master_pos
;
connection
slave
;
start
slave
;
sleep
1
;
stop
slave
io_thread
;
start
slave
io_thread
;
sync_with_master
;
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sql/item_func.cc
View file @
b5b72271
...
...
@@ -1602,18 +1602,21 @@ longlong Item_func_bit_count::val_int()
udf_handler
::~
udf_handler
()
{
if
(
initialized
)
if
(
!
not_original
)
{
if
(
u_d
->
func_deinit
!=
NULL
)
if
(
initialized
)
{
void
(
*
deinit
)(
UDF_INIT
*
)
=
(
void
(
*
)(
UDF_INIT
*
))
u_d
->
func_deinit
;
(
*
deinit
)(
&
initid
);
if
(
u_d
->
func_deinit
!=
NULL
)
{
void
(
*
deinit
)(
UDF_INIT
*
)
=
(
void
(
*
)(
UDF_INIT
*
))
u_d
->
func_deinit
;
(
*
deinit
)(
&
initid
);
}
free_udf
(
u_d
);
}
free_udf
(
u_d
);
if
(
buffers
)
// Because of bug in ecc
delete
[]
buffers
;
}
if
(
buffers
)
// Because of bug in ecc
delete
[]
buffers
;
}
...
...
sql/item_sum.h
View file @
b5b72271
...
...
@@ -531,7 +531,7 @@ public:
:
Item_sum
(
list
),
udf
(
udf_arg
)
{
quick_group
=
0
;}
Item_udf_sum
(
THD
*
thd
,
Item_udf_sum
*
item
)
:
Item_sum
(
thd
,
item
),
udf
(
item
->
udf
)
{}
:
Item_sum
(
thd
,
item
),
udf
(
item
->
udf
)
{
udf
.
not_original
=
TRUE
;
}
const
char
*
func_name
()
const
{
return
udf
.
name
();
}
bool
fix_fields
(
THD
*
thd
,
TABLE_LIST
*
tables
,
Item
**
ref
)
{
...
...
sql/repl_failsafe.cc
View file @
b5b72271
...
...
@@ -921,8 +921,8 @@ int load_master_data(THD* thd)
*/
int
error
;
if
(
init_master_info
(
active_mi
,
master_info_file
,
relay_log_info_file
,
0
))
if
(
init_master_info
(
active_mi
,
master_info_file
,
relay_log_info_file
,
0
,
(
SLAVE_IO
|
SLAVE_SQL
)
))
send_error
(
thd
,
ER_MASTER_INFO
);
strmake
(
active_mi
->
master_log_name
,
row
[
0
],
sizeof
(
active_mi
->
master_log_name
));
...
...
sql/slave.cc
View file @
b5b72271
...
...
@@ -161,7 +161,7 @@ int init_slave()
}
if
(
init_master_info
(
active_mi
,
master_info_file
,
relay_log_info_file
,
!
master_host
))
!
master_host
,
(
SLAVE_IO
|
SLAVE_SQL
)
))
{
sql_print_error
(
"Failed to initialize the master info structure"
);
goto
err
;
...
...
@@ -1799,7 +1799,8 @@ void clear_until_condition(RELAY_LOG_INFO* rli)
int
init_master_info
(
MASTER_INFO
*
mi
,
const
char
*
master_info_fname
,
const
char
*
slave_info_fname
,
bool
abort_if_no_master_info_file
)
bool
abort_if_no_master_info_file
,
int
thread_mask
)
{
int
fd
,
error
;
char
fname
[
FN_REFLEN
+
128
];
...
...
@@ -1813,8 +1814,15 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
last time. If this case pos_in_file would be set and we would
get a crash when trying to read the signature for the binary
relay log.
We only rewind the read position if we are starting the SQL
thread. The handle_slave_sql thread assumes that the read
position is at the beginning of the file, and will read the
"signature" and then fast-forward to the last position read.
*/
my_b_seek
(
mi
->
rli
.
cur_log
,
(
my_off_t
)
0
);
if
(
thread_mask
&
SLAVE_SQL
)
{
my_b_seek
(
mi
->
rli
.
cur_log
,
(
my_off_t
)
0
);
}
DBUG_RETURN
(
0
);
}
...
...
sql/slave.h
View file @
b5b72271
...
...
@@ -522,7 +522,8 @@ void clear_until_condition(RELAY_LOG_INFO* rli);
void
clear_slave_error_timestamp
(
RELAY_LOG_INFO
*
rli
);
int
init_master_info
(
MASTER_INFO
*
mi
,
const
char
*
master_info_fname
,
const
char
*
slave_info_fname
,
bool
abort_if_no_master_info_file
);
bool
abort_if_no_master_info_file
,
int
thread_mask
);
void
end_master_info
(
MASTER_INFO
*
mi
);
int
init_relay_log_info
(
RELAY_LOG_INFO
*
rli
,
const
char
*
info_fname
);
void
end_relay_log_info
(
RELAY_LOG_INFO
*
rli
);
...
...
sql/sql_repl.cc
View file @
b5b72271
...
...
@@ -683,7 +683,8 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
thread_mask
&=
thd
->
lex
->
slave_thd_opt
;
if
(
thread_mask
)
//some threads are stopped, start them
{
if
(
init_master_info
(
mi
,
master_info_file
,
relay_log_info_file
,
0
))
if
(
init_master_info
(
mi
,
master_info_file
,
relay_log_info_file
,
0
,
thread_mask
))
slave_errno
=
ER_MASTER_INFO
;
else
if
(
server_id_supplied
&&
*
mi
->
host
)
{
...
...
@@ -978,7 +979,8 @@ int change_master(THD* thd, MASTER_INFO* mi)
thd
->
proc_info
=
"Changing master"
;
LEX_MASTER_INFO
*
lex_mi
=
&
thd
->
lex
->
mi
;
// TODO: see if needs re-write
if
(
init_master_info
(
mi
,
master_info_file
,
relay_log_info_file
,
0
))
if
(
init_master_info
(
mi
,
master_info_file
,
relay_log_info_file
,
0
,
thread_mask
))
{
send_error
(
thd
,
ER_MASTER_INFO
);
unlock_slave_threads
(
mi
);
...
...
sql/sql_udf.h
View file @
b5b72271
...
...
@@ -56,8 +56,9 @@ class udf_handler :public Sql_alloc
public:
table_map
used_tables_cache
;
bool
const_item_cache
;
bool
not_original
;
udf_handler
(
udf_func
*
udf_arg
)
:
u_d
(
udf_arg
),
buffers
(
0
),
error
(
0
),
is_null
(
0
),
initialized
(
0
)
is_null
(
0
),
initialized
(
0
)
,
not_original
(
0
)
{}
~
udf_handler
();
const
char
*
name
()
const
{
return
u_d
?
u_d
->
name
.
str
:
"?"
;
}
...
...
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