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
3d79db97
Commit
3d79db97
authored
Apr 21, 2006
by
elliot@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/emurphy/src/mysql/bk-clean/mysql-5.1-merge
parents
5ec05822
c13fc693
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
177 deletions
+9
-177
sql/ha_innodb.cc
sql/ha_innodb.cc
+0
-130
sql/ha_innodb.h
sql/ha_innodb.h
+0
-3
sql/mysqld.cc
sql/mysqld.cc
+0
-17
sql/set_var.cc
sql/set_var.cc
+0
-13
sql/sql_class.h
sql/sql_class.h
+0
-5
sql/sql_repl.cc
sql/sql_repl.cc
+9
-9
No files found.
sql/ha_innodb.cc
View file @
3d79db97
...
@@ -1769,25 +1769,6 @@ innobase_report_binlog_offset_and_commit(
...
@@ -1769,25 +1769,6 @@ innobase_report_binlog_offset_and_commit(
trx
->
mysql_log_file_name
=
log_file_name
;
trx
->
mysql_log_file_name
=
log_file_name
;
trx
->
mysql_log_offset
=
(
ib_longlong
)
end_offset
;
trx
->
mysql_log_offset
=
(
ib_longlong
)
end_offset
;
#ifdef HAVE_REPLICATION
if
(
thd
->
variables
.
sync_replication
)
{
/* Let us store the binlog file name and the position, so that
we know how long to wait for the binlog to the replicated to
the slave in synchronous replication. */
if
(
trx
->
repl_wait_binlog_name
==
NULL
)
{
trx
->
repl_wait_binlog_name
=
(
char
*
)
mem_alloc_noninline
(
FN_REFLEN
+
100
);
}
ut_a
(
strlen
(
log_file_name
)
<
FN_REFLEN
+
100
);
strcpy
(
trx
->
repl_wait_binlog_name
,
log_file_name
);
trx
->
repl_wait_binlog_pos
=
(
ib_longlong
)
end_offset
;
}
#endif
/* HAVE_REPLICATION */
trx
->
flush_log_later
=
TRUE
;
trx
->
flush_log_later
=
TRUE
;
innobase_commit
(
thd
,
TRUE
);
innobase_commit
(
thd
,
TRUE
);
...
@@ -1856,117 +1837,6 @@ innobase_commit_complete(
...
@@ -1856,117 +1837,6 @@ innobase_commit_complete(
trx_commit_complete_for_mysql
(
trx
);
trx_commit_complete_for_mysql
(
trx
);
}
}
#ifdef HAVE_REPLICATION
if
(
thd
->
variables
.
sync_replication
&&
trx
->
repl_wait_binlog_name
&&
innobase_repl_state
!=
0
)
{
struct
timespec
abstime
;
int
cmp
;
int
ret
;
/* In synchronous replication, let us wait until the MySQL
replication has sent the relevant binlog segment to the
replication slave. */
pthread_mutex_lock
(
&
innobase_repl_cond_mutex
);
try_again:
if
(
innobase_repl_state
==
0
)
{
pthread_mutex_unlock
(
&
innobase_repl_cond_mutex
);
return
(
0
);
}
cmp
=
strcmp
(
innobase_repl_file_name
,
trx
->
repl_wait_binlog_name
);
if
(
cmp
>
0
||
(
cmp
==
0
&&
innobase_repl_pos
>=
(
my_off_t
)
trx
->
repl_wait_binlog_pos
))
{
/* We have already sent the relevant binlog to the
slave: no need to wait here */
pthread_mutex_unlock
(
&
innobase_repl_cond_mutex
);
/* printf("Binlog now sent\n"); */
return
(
0
);
}
/* Let us update the info about the minimum binlog position
of waiting threads in the innobase_repl_... variables */
if
(
innobase_repl_wait_file_name_inited
!=
0
)
{
cmp
=
strcmp
(
trx
->
repl_wait_binlog_name
,
innobase_repl_wait_file_name
);
if
(
cmp
<
0
||
(
cmp
==
0
&&
(
my_off_t
)
trx
->
repl_wait_binlog_pos
<=
innobase_repl_wait_pos
))
{
/* This thd has an even lower position, let
us update the minimum info */
strcpy
(
innobase_repl_wait_file_name
,
trx
->
repl_wait_binlog_name
);
innobase_repl_wait_pos
=
trx
->
repl_wait_binlog_pos
;
}
}
else
{
strcpy
(
innobase_repl_wait_file_name
,
trx
->
repl_wait_binlog_name
);
innobase_repl_wait_pos
=
trx
->
repl_wait_binlog_pos
;
innobase_repl_wait_file_name_inited
=
1
;
}
set_timespec
(
abstime
,
thd
->
variables
.
sync_replication_timeout
);
/* Let us suspend this thread to wait on the condition;
when replication has progressed far enough, we will release
these waiting threads. The following call
pthread_cond_timedwait also atomically unlocks
innobase_repl_cond_mutex. */
innobase_repl_n_wait_threads
++
;
/* printf("Waiting for binlog to be sent\n"); */
ret
=
pthread_cond_timedwait
(
&
innobase_repl_cond
,
&
innobase_repl_cond_mutex
,
&
abstime
);
innobase_repl_n_wait_threads
--
;
if
(
ret
!=
0
)
{
ut_print_timestamp
(
stderr
);
sql_print_error
(
"MySQL synchronous replication was "
"not able to send the binlog to the "
"slave within the timeout %lu. We "
"assume that the slave has become "
"inaccessible, and switch off "
"synchronous replication until the "
"communication to the slave works "
"again. MySQL synchronous replication "
"has sent binlog to the slave up to "
"file %s, position %lu. This "
"transaction needs it to be sent up "
"to file %s, position %lu."
,
thd
->
variables
.
sync_replication_timeout
,
innobase_repl_file_name
,
(
ulong
)
innobase_repl_pos
,
trx
->
repl_wait_binlog_name
,
(
ulong
)
trx
->
repl_wait_binlog_pos
);
innobase_repl_state
=
0
;
pthread_mutex_unlock
(
&
innobase_repl_cond_mutex
);
return
(
0
);
}
goto
try_again
;
}
#endif // HAVE_REPLICATION
return
(
0
);
return
(
0
);
}
}
...
...
sql/ha_innodb.h
View file @
3d79db97
...
@@ -316,9 +316,6 @@ int innobase_rollback_by_xid(
...
@@ -316,9 +316,6 @@ int innobase_rollback_by_xid(
XID
*
xid
);
/* in : X/Open XA Transaction Identification */
XID
*
xid
);
/* in : X/Open XA Transaction Identification */
int
innobase_repl_report_sent_binlog
(
THD
*
thd
,
char
*
log_file_name
,
my_off_t
end_offset
);
/***********************************************************************
/***********************************************************************
Create a consistent view for a cursor based on current transaction
Create a consistent view for a cursor based on current transaction
which is created if the corresponding MySQL thread still lacks one.
which is created if the corresponding MySQL thread still lacks one.
...
...
sql/mysqld.cc
View file @
3d79db97
...
@@ -6160,23 +6160,6 @@ The minimum value for this variable is 4096.",
...
@@ -6160,23 +6160,6 @@ The minimum value for this variable is 4096.",
{
"sync-frm"
,
OPT_SYNC_FRM
,
"Sync .frm to disk on create. Enabled by default."
,
{
"sync-frm"
,
OPT_SYNC_FRM
,
"Sync .frm to disk on create. Enabled by default."
,
(
gptr
*
)
&
opt_sync_frm
,
(
gptr
*
)
&
opt_sync_frm
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
(
gptr
*
)
&
opt_sync_frm
,
(
gptr
*
)
&
opt_sync_frm
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
},
#ifdef HAVE_REPLICATION
{
"sync-replication"
,
OPT_SYNC_REPLICATION
,
"Enable synchronous replication."
,
(
gptr
*
)
&
global_system_variables
.
sync_replication
,
(
gptr
*
)
&
global_system_variables
.
sync_replication
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
0
,
0
,
1
,
0
,
1
,
0
},
{
"sync-replication-slave-id"
,
OPT_SYNC_REPLICATION_SLAVE_ID
,
"Synchronous replication is wished for this slave."
,
(
gptr
*
)
&
global_system_variables
.
sync_replication_slave_id
,
(
gptr
*
)
&
global_system_variables
.
sync_replication_slave_id
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
0
,
0
,
~
0L
,
0
,
1
,
0
},
{
"sync-replication-timeout"
,
OPT_SYNC_REPLICATION_TIMEOUT
,
"Synchronous replication timeout."
,
(
gptr
*
)
&
global_system_variables
.
sync_replication_timeout
,
(
gptr
*
)
&
global_system_variables
.
sync_replication_timeout
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
10
,
0
,
~
0L
,
0
,
1
,
0
},
#endif
/* HAVE_REPLICATION */
{
"table_cache"
,
OPT_TABLE_OPEN_CACHE
,
{
"table_cache"
,
OPT_TABLE_OPEN_CACHE
,
"Deprecated; use --table_open_cache instead."
,
"Deprecated; use --table_open_cache instead."
,
(
gptr
*
)
&
table_cache_size
,
(
gptr
*
)
&
table_cache_size
,
0
,
GET_ULONG
,
(
gptr
*
)
&
table_cache_size
,
(
gptr
*
)
&
table_cache_size
,
0
,
GET_ULONG
,
...
...
sql/set_var.cc
View file @
3d79db97
...
@@ -436,14 +436,6 @@ sys_var_thd_storage_engine sys_storage_engine("storage_engine",
...
@@ -436,14 +436,6 @@ sys_var_thd_storage_engine sys_storage_engine("storage_engine",
&
SV
::
table_type
);
&
SV
::
table_type
);
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
sys_var_sync_binlog_period
sys_sync_binlog_period
(
"sync_binlog"
,
&
sync_binlog_period
);
sys_var_sync_binlog_period
sys_sync_binlog_period
(
"sync_binlog"
,
&
sync_binlog_period
);
sys_var_thd_ulong
sys_sync_replication
(
"sync_replication"
,
&
SV
::
sync_replication
);
sys_var_thd_ulong
sys_sync_replication_slave_id
(
"sync_replication_slave_id"
,
&
SV
::
sync_replication_slave_id
);
sys_var_thd_ulong
sys_sync_replication_timeout
(
"sync_replication_timeout"
,
&
SV
::
sync_replication_timeout
);
#endif
#endif
sys_var_bool_ptr
sys_sync_frm
(
"sync_frm"
,
&
opt_sync_frm
);
sys_var_bool_ptr
sys_sync_frm
(
"sync_frm"
,
&
opt_sync_frm
);
sys_var_long_ptr
sys_table_def_size
(
"table_definition_cache"
,
sys_var_long_ptr
sys_table_def_size
(
"table_definition_cache"
,
...
@@ -966,11 +958,6 @@ SHOW_VAR init_vars[]= {
...
@@ -966,11 +958,6 @@ SHOW_VAR init_vars[]= {
{
sys_sync_binlog_period
.
name
,(
char
*
)
&
sys_sync_binlog_period
,
SHOW_SYS
},
{
sys_sync_binlog_period
.
name
,(
char
*
)
&
sys_sync_binlog_period
,
SHOW_SYS
},
#endif
#endif
{
sys_sync_frm
.
name
,
(
char
*
)
&
sys_sync_frm
,
SHOW_SYS
},
{
sys_sync_frm
.
name
,
(
char
*
)
&
sys_sync_frm
,
SHOW_SYS
},
#ifdef HAVE_REPLICATION
{
sys_sync_replication
.
name
,
(
char
*
)
&
sys_sync_replication
,
SHOW_SYS
},
{
sys_sync_replication_slave_id
.
name
,
(
char
*
)
&
sys_sync_replication_slave_id
,
SHOW_SYS
},
{
sys_sync_replication_timeout
.
name
,
(
char
*
)
&
sys_sync_replication_timeout
,
SHOW_SYS
},
#endif
#ifdef HAVE_TZNAME
#ifdef HAVE_TZNAME
{
"system_time_zone"
,
system_time_zone
,
SHOW_CHAR
},
{
"system_time_zone"
,
system_time_zone
,
SHOW_CHAR
},
#endif
#endif
...
...
sql/sql_class.h
View file @
3d79db97
...
@@ -241,11 +241,6 @@ struct system_variables
...
@@ -241,11 +241,6 @@ struct system_variables
my_bool
new_mode
;
my_bool
new_mode
;
my_bool
query_cache_wlock_invalidate
;
my_bool
query_cache_wlock_invalidate
;
my_bool
engine_condition_pushdown
;
my_bool
engine_condition_pushdown
;
#ifdef HAVE_REPLICATION
ulong
sync_replication
;
ulong
sync_replication_slave_id
;
ulong
sync_replication_timeout
;
#endif
/* HAVE_REPLICATION */
my_bool
innodb_table_locks
;
my_bool
innodb_table_locks
;
my_bool
innodb_support_xa
;
my_bool
innodb_support_xa
;
my_bool
ndb_force_send
;
my_bool
ndb_force_send
;
...
...
sql/sql_repl.cc
View file @
3d79db97
...
@@ -694,7 +694,7 @@ impossible position";
...
@@ -694,7 +694,7 @@ impossible position";
if
(
loop_breaker
)
if
(
loop_breaker
)
break
;
break
;
end_io_cache
(
&
log
);
end_io_cache
(
&
log
);
(
void
)
my_close
(
file
,
MYF
(
MY_WME
));
(
void
)
my_close
(
file
,
MYF
(
MY_WME
));
...
@@ -834,7 +834,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
...
@@ -834,7 +834,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
/* Issuing warning then started without --skip-slave-start */
/* Issuing warning then started without --skip-slave-start */
if
(
!
opt_skip_slave_start
)
if
(
!
opt_skip_slave_start
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_MISSING_SKIP_SLAVE
,
ER_MISSING_SKIP_SLAVE
,
ER
(
ER_MISSING_SKIP_SLAVE
));
ER
(
ER_MISSING_SKIP_SLAVE
));
}
}
...
@@ -860,7 +860,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
...
@@ -860,7 +860,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SLAVE_WAS_RUNNING
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SLAVE_WAS_RUNNING
,
ER
(
ER_SLAVE_WAS_RUNNING
));
ER
(
ER_SLAVE_WAS_RUNNING
));
}
}
unlock_slave_threads
(
mi
);
unlock_slave_threads
(
mi
);
if
(
slave_errno
)
if
(
slave_errno
)
...
@@ -1023,7 +1023,7 @@ err:
...
@@ -1023,7 +1023,7 @@ err:
slave_server_id the slave's server id
slave_server_id the slave's server id
*/
*/
void
kill_zombie_dump_threads
(
uint32
slave_server_id
)
void
kill_zombie_dump_threads
(
uint32
slave_server_id
)
{
{
...
@@ -1088,9 +1088,9 @@ bool change_master(THD* thd, MASTER_INFO* mi)
...
@@ -1088,9 +1088,9 @@ bool change_master(THD* thd, MASTER_INFO* mi)
*/
*/
/*
/*
If the user specified host or port without binlog or position,
If the user specified host or port without binlog or position,
reset binlog's name to FIRST and position to 4.
reset binlog's name to FIRST and position to 4.
*/
*/
if
((
lex_mi
->
host
||
lex_mi
->
port
)
&&
!
lex_mi
->
log_file_name
&&
!
lex_mi
->
pos
)
if
((
lex_mi
->
host
||
lex_mi
->
port
)
&&
!
lex_mi
->
log_file_name
&&
!
lex_mi
->
pos
)
{
{
...
@@ -1117,7 +1117,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
...
@@ -1117,7 +1117,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
mi
->
port
=
lex_mi
->
port
;
mi
->
port
=
lex_mi
->
port
;
if
(
lex_mi
->
connect_retry
)
if
(
lex_mi
->
connect_retry
)
mi
->
connect_retry
=
lex_mi
->
connect_retry
;
mi
->
connect_retry
=
lex_mi
->
connect_retry
;
if
(
lex_mi
->
ssl
!=
LEX_MASTER_INFO
::
SSL_UNCHANGED
)
if
(
lex_mi
->
ssl
!=
LEX_MASTER_INFO
::
SSL_UNCHANGED
)
mi
->
ssl
=
(
lex_mi
->
ssl
==
LEX_MASTER_INFO
::
SSL_ENABLE
);
mi
->
ssl
=
(
lex_mi
->
ssl
==
LEX_MASTER_INFO
::
SSL_ENABLE
);
if
(
lex_mi
->
ssl_ca
)
if
(
lex_mi
->
ssl_ca
)
...
@@ -1133,7 +1133,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
...
@@ -1133,7 +1133,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
#ifndef HAVE_OPENSSL
#ifndef HAVE_OPENSSL
if
(
lex_mi
->
ssl
||
lex_mi
->
ssl_ca
||
lex_mi
->
ssl_capath
||
if
(
lex_mi
->
ssl
||
lex_mi
->
ssl_ca
||
lex_mi
->
ssl_capath
||
lex_mi
->
ssl_cert
||
lex_mi
->
ssl_cipher
||
lex_mi
->
ssl_key
)
lex_mi
->
ssl_cert
||
lex_mi
->
ssl_cipher
||
lex_mi
->
ssl_key
)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SLAVE_IGNORED_SSL_PARAMS
,
ER
(
ER_SLAVE_IGNORED_SSL_PARAMS
));
ER_SLAVE_IGNORED_SSL_PARAMS
,
ER
(
ER_SLAVE_IGNORED_SSL_PARAMS
));
#endif
#endif
...
@@ -1500,7 +1500,7 @@ bool show_binlogs(THD* thd)
...
@@ -1500,7 +1500,7 @@ bool show_binlogs(THD* thd)
}
}
field_list
.
push_back
(
new
Item_empty_string
(
"Log_name"
,
255
));
field_list
.
push_back
(
new
Item_empty_string
(
"Log_name"
,
255
));
field_list
.
push_back
(
new
Item_return_int
(
"File_size"
,
20
,
field_list
.
push_back
(
new
Item_return_int
(
"File_size"
,
20
,
MYSQL_TYPE_LONGLONG
));
MYSQL_TYPE_LONGLONG
));
if
(
protocol
->
send_fields
(
&
field_list
,
if
(
protocol
->
send_fields
(
&
field_list
,
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
))
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
))
...
...
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