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
1e2191c4
Commit
1e2191c4
authored
Nov 04, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/my/mysql-5.0
parents
10edbfe2
303f6b4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
35 deletions
+34
-35
sql/log.cc
sql/log.cc
+4
-3
sql/sql_class.h
sql/sql_class.h
+30
-32
No files found.
sql/log.cc
View file @
1e2191c4
...
...
@@ -356,9 +356,10 @@ static int find_uniq_filename(char *name)
MYSQL_LOG
::
MYSQL_LOG
()
:
bytes_written
(
0
),
last_time
(
0
),
query_start
(
0
),
name
(
0
),
file_id
(
1
),
open_count
(
1
),
log_type
(
LOG_CLOSED
),
write_error
(
0
),
inited
(
0
),
need_start_event
(
1
),
prepared_xids
(
0
),
description_event_for_exec
(
0
),
description_event_for_queue
(
0
),
readers_count
(
0
),
reset_pending
(
FALSE
)
prepared_xids
(
0
),
log_type
(
LOG_CLOSED
),
file_id
(
1
),
open_count
(
1
),
readers_count
(
0
),
reset_pending
(
FALSE
),
write_error
(
FALSE
),
inited
(
FALSE
),
need_start_event
(
TRUE
),
description_event_for_exec
(
0
),
description_event_for_queue
(
0
)
{
/*
We don't want to initialize LOCK_Log here as such initialization depends on
...
...
sql/sql_class.h
View file @
1e2191c4
...
...
@@ -190,10 +190,10 @@ class MYSQL_LOG: public TC_LOG
private:
/* LOCK_log and LOCK_index are inited by init_pthread_objects() */
pthread_mutex_t
LOCK_log
,
LOCK_index
,
LOCK_readers
;
pthread_mutex_t
LOCK_prep_xids
;
pthread_cond_t
COND_prep_xids
;
pthread_cond_t
update_cond
;
pthread_cond_t
reset_cond
;
bool
reset_pending
;
int
readers_count
;
ulonglong
bytes_written
;
time_t
last_time
,
query_start
;
IO_CACHE
log_file
;
...
...
@@ -201,21 +201,6 @@ class MYSQL_LOG: public TC_LOG
char
*
name
;
char
time_buff
[
20
],
db
[
NAME_LEN
+
1
];
char
log_file_name
[
FN_REFLEN
],
index_file_name
[
FN_REFLEN
];
// current file sequence number for load data infile binary logging
uint
file_id
;
uint
open_count
;
// For replication
volatile
enum_log_type
log_type
;
enum
cache_type
io_cache_type
;
bool
write_error
,
inited
;
bool
need_start_event
;
/*
no_auto_events means we don't want any of these automatic events :
Start/Rotate/Stop. That is, in 4.x when we rotate a relay log, we don't want
a Rotate_log event to be written to the relay log. When we start a relay log
etc. So in 4.x this is 1 for relay logs, 0 for binlogs.
In 5.0 it's 0 for relay logs too!
*/
bool
no_auto_events
;
/*
The max size before rotation (usable only if log_type == LOG_BIN: binary
logs and relay logs).
...
...
@@ -227,13 +212,38 @@ class MYSQL_LOG: public TC_LOG
fix_max_relay_log_size).
*/
ulong
max_size
;
ulong
prepared_xids
;
/* for tc log - number of xids to remember */
pthread_mutex_t
LOCK_prep_xids
;
pthread_cond_t
COND_prep_xids
;
volatile
enum_log_type
log_type
;
enum
cache_type
io_cache_type
;
// current file sequence number for load data infile binary logging
uint
file_id
;
uint
open_count
;
// For replication
int
readers_count
;
bool
reset_pending
;
bool
write_error
,
inited
;
bool
need_start_event
;
/*
no_auto_events means we don't want any of these automatic events :
Start/Rotate/Stop. That is, in 4.x when we rotate a relay log, we don't
want a Rotate_log event to be written to the relay log. When we start a
relay log etc. So in 4.x this is 1 for relay logs, 0 for binlogs.
In 5.0 it's 0 for relay logs too!
*/
bool
no_auto_events
;
friend
class
Log_event
;
public:
/*
These describe the log's format. This is used only for relay logs.
_for_exec is used by the SQL thread, _for_queue by the I/O thread. It's
necessary to have 2 distinct objects, because the I/O thread may be reading
events in a different format from what the SQL thread is reading (consider
the case of a master which has been upgraded from 5.0 to 5.1 without doing
RESET MASTER, or from 4.x to 5.0).
*/
Format_description_log_event
*
description_event_for_exec
,
*
description_event_for_queue
;
MYSQL_LOG
();
/*
note that there's no destructor ~MYSQL_LOG() !
...
...
@@ -246,18 +256,6 @@ public:
int
log
(
THD
*
thd
,
my_xid
xid
);
void
unlog
(
ulong
cookie
,
my_xid
xid
);
int
recover
(
IO_CACHE
*
log
,
Format_description_log_event
*
fdle
);
/*
These describe the log's format. This is used only for relay logs.
_for_exec is used by the SQL thread, _for_queue by the I/O thread. It's
necessary to have 2 distinct objects, because the I/O thread may be reading
events in a different format from what the SQL thread is reading (consider
the case of a master which has been upgraded from 5.0 to 5.1 without doing
RESET MASTER, or from 4.x to 5.0).
*/
Format_description_log_event
*
description_event_for_exec
,
*
description_event_for_queue
;
void
reset_bytes_written
()
{
bytes_written
=
0
;
...
...
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