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
a4dbb3b0
Commit
a4dbb3b0
authored
Feb 22, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility fixes, crashing tests
parent
82571d6b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
9 deletions
+28
-9
include/my_sys.h
include/my_sys.h
+6
-1
mysql-test/t/rpl_rotate_logs.test
mysql-test/t/rpl_rotate_logs.test
+1
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+2
-2
sql/handler.cc
sql/handler.cc
+6
-2
sql/handler.h
sql/handler.h
+4
-0
sql/log.cc
sql/log.cc
+8
-3
sql/mysqld.cc
sql/mysqld.cc
+1
-1
No files found.
include/my_sys.h
View file @
a4dbb3b0
...
@@ -804,8 +804,13 @@ my_bool my_gethwaddr(uchar *to);
...
@@ -804,8 +804,13 @@ my_bool my_gethwaddr(uchar *to);
#endif
#endif
#define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f)
#define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f)
#ifdef HAVE_GETPAGESIZE
#define my_getpagesize() getpagesize()
#define my_getpagesize() getpagesize()
#define my_munmap(a,b) munmap(a,b)
#else
/* qnx ? */
#define my_getpagesize() 8192
#endif
#define my_munmap(a,b) munmap((char*)(a),(b))
#else
#else
/* not a complete set of mmap() flags, but only those that nesessary */
/* not a complete set of mmap() flags, but only those that nesessary */
...
...
mysql-test/t/rpl_rotate_logs.test
View file @
a4dbb3b0
...
@@ -174,6 +174,7 @@ while ($1)
...
@@ -174,6 +174,7 @@ while ($1)
--
enable_query_log
--
enable_query_log
commit
;
commit
;
drop
table
t1
;
drop
table
t1
;
--
replace_result
"xid=373"
"xid=146"
show
binlog
events
in
'master-bin.000001'
;
show
binlog
events
in
'master-bin.000001'
;
show
binlog
events
in
'master-bin.000002'
;
show
binlog
events
in
'master-bin.000002'
;
sql/ha_innodb.cc
View file @
a4dbb3b0
...
@@ -1346,14 +1346,14 @@ innobase_commit_low(
...
@@ -1346,14 +1346,14 @@ innobase_commit_low(
return
;
return
;
}
}
#ifdef HAVE_REPLICATION
#ifdef
DISABLE_
HAVE_REPLICATION
if
(
current_thd
->
slave_thread
)
{
if
(
current_thd
->
slave_thread
)
{
/* Update the replication position info inside InnoDB */
/* Update the replication position info inside InnoDB */
trx
->
mysql_master_log_file_name
trx
->
mysql_master_log_file_name
=
active_mi
->
rli
.
group_master_log_name
;
=
active_mi
->
rli
.
group_master_log_name
;
trx
->
mysql_master_log_pos
=
((
ib_longlong
)
trx
->
mysql_master_log_pos
=
((
ib_longlong
)
active_mi
->
rli
.
future_group_master_log_pos
);
active_mi
->
rli
.
future_group_master_log_pos
);
}
}
#endif
/* HAVE_REPLICATION */
#endif
/* HAVE_REPLICATION */
...
...
sql/handler.cc
View file @
a4dbb3b0
...
@@ -553,6 +553,7 @@ int ha_commit_trans(THD *thd, bool all)
...
@@ -553,6 +553,7 @@ int ha_commit_trans(THD *thd, bool all)
#ifdef USING_TRANSACTIONS
#ifdef USING_TRANSACTIONS
if
(
trans
->
nht
)
if
(
trans
->
nht
)
{
{
DBUG_EXECUTE_IF
(
"crash_commit_before"
,
abort
(););
if
(
!
trans
->
no_2pc
&&
trans
->
nht
>
1
)
if
(
!
trans
->
no_2pc
&&
trans
->
nht
>
1
)
{
{
for
(;
*
ht
&&
!
error
;
ht
++
)
for
(;
*
ht
&&
!
error
;
ht
++
)
...
@@ -565,16 +566,20 @@ int ha_commit_trans(THD *thd, bool all)
...
@@ -565,16 +566,20 @@ int ha_commit_trans(THD *thd, bool all)
}
}
statistic_increment
(
thd
->
status_var
.
ha_prepare_count
,
&
LOCK_status
);
statistic_increment
(
thd
->
status_var
.
ha_prepare_count
,
&
LOCK_status
);
}
}
DBUG_EXECUTE_IF
(
"crash_commit_after_prepare"
,
abort
(););
if
(
error
||
(
is_real_trans
&&
xid
&&
if
(
error
||
(
is_real_trans
&&
xid
&&
(
error
=
!
(
cookie
=
tc_log
->
log
(
thd
,
xid
)))))
(
error
=
!
(
cookie
=
tc_log
->
log
(
thd
,
xid
)))))
{
{
ha_rollback_trans
(
thd
,
all
);
ha_rollback_trans
(
thd
,
all
);
return
1
;
return
1
;
}
}
DBUG_EXECUTE_IF
(
"crash_commit_after_log"
,
abort
(););
}
}
error
=
ha_commit_one_phase
(
thd
,
all
)
?
cookie
?
2
:
1
:
0
;
error
=
ha_commit_one_phase
(
thd
,
all
)
?
cookie
?
2
:
1
:
0
;
DBUG_EXECUTE_IF
(
"crash_commit_before_unlog"
,
abort
(););
if
(
cookie
)
if
(
cookie
)
tc_log
->
unlog
(
cookie
,
xid
);
tc_log
->
unlog
(
cookie
,
xid
);
DBUG_EXECUTE_IF
(
"crash_commit_after"
,
abort
(););
}
}
#endif
/* USING_TRANSACTIONS */
#endif
/* USING_TRANSACTIONS */
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
...
@@ -738,8 +743,7 @@ int ha_recover(HASH *commit_list)
...
@@ -738,8 +743,7 @@ int ha_recover(HASH *commit_list)
DBUG_ASSERT
(
total_ha_2pc
);
DBUG_ASSERT
(
total_ha_2pc
);
DBUG_ASSERT
(
commit_list
||
tc_heuristic_recover
);
DBUG_ASSERT
(
commit_list
||
tc_heuristic_recover
);
for
(
len
=
commit_list
?
commit_list
->
records
:
MAX_XID_LIST_SIZE
;
for
(
len
=
MAX_XID_LIST_SIZE
;
list
==
0
&&
len
>
MIN_XID_LIST_SIZE
;
len
/=
2
)
list
==
0
&&
len
>
MIN_XID_LIST_SIZE
;
len
/=
2
)
{
{
list
=
(
XID
*
)
my_malloc
(
len
*
sizeof
(
XID
),
MYF
(
0
));
list
=
(
XID
*
)
my_malloc
(
len
*
sizeof
(
XID
),
MYF
(
0
));
}
}
...
...
sql/handler.h
View file @
a4dbb3b0
...
@@ -253,7 +253,11 @@ typedef struct xid_t XID;
...
@@ -253,7 +253,11 @@ typedef struct xid_t XID;
/* for recover() handlerton call */
/* for recover() handlerton call */
#define MIN_XID_LIST_SIZE 128
#define MIN_XID_LIST_SIZE 128
#ifdef SAFEMALLOC
#define MAX_XID_LIST_SIZE 256
#else
#define MAX_XID_LIST_SIZE (1024*128)
#define MAX_XID_LIST_SIZE (1024*128)
#endif
/*
/*
handlerton is a singleton structure - one instance per storage engine -
handlerton is a singleton structure - one instance per storage engine -
...
...
sql/log.cc
View file @
a4dbb3b0
...
@@ -2903,7 +2903,12 @@ int TC_LOG_BINLOG::open(const char *opt_name)
...
@@ -2903,7 +2903,12 @@ int TC_LOG_BINLOG::open(const char *opt_name)
pthread_cond_init
(
&
COND_prep_xids
,
0
);
pthread_cond_init
(
&
COND_prep_xids
,
0
);
if
(
using_heuristic_recover
())
if
(
using_heuristic_recover
())
{
/* generate a new binlog to mask a corrupted one */
open
(
opt_name
,
LOG_BIN
,
0
,
WRITE_CACHE
,
0
,
max_binlog_size
,
0
);
cleanup
();
return
1
;
return
1
;
}
if
((
error
=
find_log_pos
(
&
log_info
,
NullS
,
1
)))
if
((
error
=
find_log_pos
(
&
log_info
,
NullS
,
1
)))
{
{
...
@@ -2946,9 +2951,9 @@ int TC_LOG_BINLOG::open(const char *opt_name)
...
@@ -2946,9 +2951,9 @@ int TC_LOG_BINLOG::open(const char *opt_name)
if
((
ev
=
Log_event
::
read_log_event
(
&
log
,
0
,
&
fdle
))
&&
if
((
ev
=
Log_event
::
read_log_event
(
&
log
,
0
,
&
fdle
))
&&
ev
->
get_type_code
()
==
FORMAT_DESCRIPTION_EVENT
&&
ev
->
get_type_code
()
==
FORMAT_DESCRIPTION_EVENT
&&
ev
->
flags
&
LOG_EVENT_BINLOG_IN_USE_F
)
ev
->
flags
&
LOG_EVENT_BINLOG_IN_USE_F
)
error
=
recover
(
&
log
,
(
Format_description_log_event
*
)
ev
);
error
=
recover
(
&
log
,
(
Format_description_log_event
*
)
ev
);
else
else
error
=
0
;
error
=
0
;
delete
ev
;
delete
ev
;
end_io_cache
(
&
log
);
end_io_cache
(
&
log
);
...
...
sql/mysqld.cc
View file @
a4dbb3b0
...
@@ -2738,7 +2738,7 @@ server.");
...
@@ -2738,7 +2738,7 @@ server.");
(
TC_LOG
*
)
&
tc_log_mmap
:
(
TC_LOG
*
)
&
tc_log_mmap
:
(
TC_LOG
*
)
&
tc_log_dummy
;
(
TC_LOG
*
)
&
tc_log_dummy
;
if
(
tc_log
->
open
(
opt_
tc_log_fil
e
))
if
(
tc_log
->
open
(
opt_
bin_lognam
e
))
{
{
sql_print_error
(
"Can't init tc log"
);
sql_print_error
(
"Can't init tc log"
);
unireg_abort
(
1
);
unireg_abort
(
1
);
...
...
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