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
ab0dbb1f
Commit
ab0dbb1f
authored
Apr 27, 2005
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ha_innodb.cc, mysqld.cc:
Fix compilation error if HAVE_REPLICATION is not defined
parent
e93f8ec4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
sql/ha_innodb.cc
sql/ha_innodb.cc
+10
-12
sql/mysqld.cc
sql/mysqld.cc
+2
-0
No files found.
sql/ha_innodb.cc
View file @
ab0dbb1f
...
@@ -1611,6 +1611,7 @@ innobase_report_binlog_offset_and_commit(
...
@@ -1611,6 +1611,7 @@ 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
)
{
if
(
thd
->
variables
.
sync_replication
)
{
/* Let us store the binlog file name and the position, so that
/* 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
we know how long to wait for the binlog to the replicated to
...
@@ -1628,7 +1629,7 @@ innobase_report_binlog_offset_and_commit(
...
@@ -1628,7 +1629,7 @@ innobase_report_binlog_offset_and_commit(
trx
->
repl_wait_binlog_pos
=
(
ib_longlong
)
end_offset
;
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
,
trx_handle
);
innobase_commit
(
thd
,
trx_handle
);
...
@@ -1681,10 +1682,7 @@ innobase_commit_complete(
...
@@ -1681,10 +1682,7 @@ innobase_commit_complete(
/* out: 0 */
/* out: 0 */
THD
*
thd
)
/* in: user thread */
THD
*
thd
)
/* in: user thread */
{
{
struct
timespec
abstime
;
trx_t
*
trx
;
trx_t
*
trx
;
int
cmp
;
int
ret
;
trx
=
(
trx_t
*
)
thd
->
ha_data
[
innobase_hton
.
slot
];
trx
=
(
trx_t
*
)
thd
->
ha_data
[
innobase_hton
.
slot
];
...
@@ -1700,21 +1698,19 @@ innobase_commit_complete(
...
@@ -1700,21 +1698,19 @@ innobase_commit_complete(
trx_commit_complete_for_mysql
(
trx
);
trx_commit_complete_for_mysql
(
trx
);
}
}
printf
(
"Wait binlog name %s, repl state %lu
\n
"
,
#ifdef HAVE_REPLICATION
trx
->
repl_wait_binlog_name
,
(
uint
)
innobase_repl_state
);
if
(
thd
->
variables
.
sync_replication
if
(
thd
->
variables
.
sync_replication
&&
trx
->
repl_wait_binlog_name
&&
trx
->
repl_wait_binlog_name
&&
innobase_repl_state
!=
0
)
{
&&
innobase_repl_state
!=
0
)
{
struct
timespec
abstime
;
int
cmp
;
int
ret
;
/* In synchronous replication, let us wait until the MySQL
/* In synchronous replication, let us wait until the MySQL
replication has sent the relevant binlog segment to the
replication has sent the relevant binlog segment to the
replication slave. */
replication slave. */
/* TODO: Make sure MySQL uses some way (TCP_NODELAY?) to ensure that the data
has been received in the slave! */
pthread_mutex_lock
(
&
innobase_repl_cond_mutex
);
pthread_mutex_lock
(
&
innobase_repl_cond_mutex
);
try_again:
try_again:
if
(
innobase_repl_state
==
0
)
{
if
(
innobase_repl_state
==
0
)
{
...
@@ -1809,10 +1805,11 @@ has been received in the slave! */
...
@@ -1809,10 +1805,11 @@ has been received in the slave! */
goto
try_again
;
goto
try_again
;
}
}
#endif HAVE_REPLICATION
return
(
0
);
return
(
0
);
}
}
#ifdef HAVE_REPLICATION
/*********************************************************************
/*********************************************************************
In synchronous replication, reports to InnoDB up to which binlog position
In synchronous replication, reports to InnoDB up to which binlog position
we have sent the binlog to the slave. Note that replication is synchronous
we have sent the binlog to the slave. Note that replication is synchronous
...
@@ -1908,6 +1905,7 @@ innobase_repl_report_sent_binlog(
...
@@ -1908,6 +1905,7 @@ innobase_repl_report_sent_binlog(
pthread_cond_broadcast
(
&
innobase_repl_cond
);
pthread_cond_broadcast
(
&
innobase_repl_cond
);
}
}
}
}
#endif
/* HAVE_REPLICATION */
/*********************************************************************
/*********************************************************************
Rolls back a transaction or the latest SQL statement. */
Rolls back a transaction or the latest SQL statement. */
...
...
sql/mysqld.cc
View file @
ab0dbb1f
...
@@ -5495,6 +5495,7 @@ The minimum value for this variable is 4096.",
...
@@ -5495,6 +5495,7 @@ 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
,
{
"sync-replication"
,
OPT_SYNC_REPLICATION
,
"Enable synchronous replication."
,
"Enable synchronous replication."
,
(
gptr
*
)
&
global_system_variables
.
sync_replication
,
(
gptr
*
)
&
global_system_variables
.
sync_replication
,
...
@@ -5510,6 +5511,7 @@ The minimum value for this variable is 4096.",
...
@@ -5510,6 +5511,7 @@ The minimum value for this variable is 4096.",
(
gptr
*
)
&
global_system_variables
.
sync_replication_timeout
,
(
gptr
*
)
&
global_system_variables
.
sync_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
},
0
,
GET_ULONG
,
REQUIRED_ARG
,
10
,
0
,
~
0L
,
0
,
1
,
0
},
#endif
/* HAVE_REPLICATION */
{
"table_cache"
,
OPT_TABLE_CACHE
,
{
"table_cache"
,
OPT_TABLE_CACHE
,
"The number of open tables for all threads."
,
(
gptr
*
)
&
table_cache_size
,
"The number of open tables for all threads."
,
(
gptr
*
)
&
table_cache_size
,
(
gptr
*
)
&
table_cache_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
64
,
1
,
512
*
1024L
,
(
gptr
*
)
&
table_cache_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
64
,
1
,
512
*
1024L
,
...
...
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