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
e29191e5
Commit
e29191e5
authored
Feb 19, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows compilation fixes
parent
cee85887
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
+17
-10
include/config-win.h
include/config-win.h
+3
-0
include/my_sys.h
include/my_sys.h
+2
-1
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+1
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+3
-3
sql/handler.cc
sql/handler.cc
+1
-1
sql/log.cc
sql/log.cc
+7
-5
No files found.
include/config-win.h
View file @
e29191e5
...
@@ -353,6 +353,8 @@ inline double ulonglong2double(ulonglong value)
...
@@ -353,6 +353,8 @@ inline double ulonglong2double(ulonglong value)
#define DO_NOT_REMOVE_THREAD_WRAPPERS
#define DO_NOT_REMOVE_THREAD_WRAPPERS
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
#define thread_safe_dec_and_test(V, L) thread_safe_decrement(V,L)
/* The following is only used for statistics, so it should be good enough */
/* The following is only used for statistics, so it should be good enough */
#ifdef __NT__
/* This should also work on Win98 but .. */
#ifdef __NT__
/* This should also work on Win98 but .. */
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
...
@@ -366,6 +368,7 @@ inline double ulonglong2double(ulonglong value)
...
@@ -366,6 +368,7 @@ inline double ulonglong2double(ulonglong value)
#define statistic_add(V,C,L) (V)+=(C)
#define statistic_add(V,C,L) (V)+=(C)
#endif
#endif
#define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
#define shared_memory_buffer_length 16000
#define shared_memory_buffer_length 16000
#define default_shared_memory_base_name "MYSQL"
#define default_shared_memory_base_name "MYSQL"
...
...
include/my_sys.h
View file @
e29191e5
...
@@ -811,7 +811,8 @@ my_bool my_gethwaddr(uchar *to);
...
@@ -811,7 +811,8 @@ my_bool my_gethwaddr(uchar *to);
/* not a complete set of mmap() flags, but only those that nesessary */
/* not a complete set of mmap() flags, but only those that nesessary */
#define PROT_READ 1
#define PROT_READ 1
#define PROT_WRITE 2
#define PROT_WRITE 2
#define MAP_NOSYNC 0x800
#define MAP_SHARED 0x0001
#define MAP_NOSYNC 0x0800
#define MAP_FAILED ((void *)-1)
#define MAP_FAILED ((void *)-1)
#define MS_SYNC 0x0000
#define MS_SYNC 0x0000
...
...
sql/ha_berkeley.cc
View file @
e29191e5
...
@@ -215,6 +215,7 @@ bool berkeley_end(void)
...
@@ -215,6 +215,7 @@ bool berkeley_end(void)
static
int
berkeley_close_connection
(
THD
*
thd
)
static
int
berkeley_close_connection
(
THD
*
thd
)
{
{
my_free
((
gptr
)
thd
->
ha_data
[
berkeley_hton
.
slot
],
MYF
(
0
));
my_free
((
gptr
)
thd
->
ha_data
[
berkeley_hton
.
slot
],
MYF
(
0
));
return
0
;
}
}
bool
berkeley_flush_logs
()
bool
berkeley_flush_logs
()
...
...
sql/ha_innodb.cc
View file @
e29191e5
...
@@ -2652,7 +2652,7 @@ ha_innobase::write_row(
...
@@ -2652,7 +2652,7 @@ ha_innobase::write_row(
no need to re-acquire locks on it. */
no need to re-acquire locks on it. */
/* Altering to InnoDB format */
/* Altering to InnoDB format */
innobase_commit
(
user_thd
,
prebuilt
->
trx
);
innobase_commit
(
user_thd
,
1
);
/* Note that this transaction is still active. */
/* Note that this transaction is still active. */
prebuilt
->
trx
->
active_trans
=
1
;
prebuilt
->
trx
->
active_trans
=
1
;
/* We will need an IX lock on the destination table. */
/* We will need an IX lock on the destination table. */
...
@@ -2667,7 +2667,7 @@ ha_innobase::write_row(
...
@@ -2667,7 +2667,7 @@ ha_innobase::write_row(
/* Commit the transaction. This will release the table
/* Commit the transaction. This will release the table
locks, so they have to be acquired again. */
locks, so they have to be acquired again. */
innobase_commit
(
user_thd
,
prebuilt
->
trx
);
innobase_commit
(
user_thd
,
1
);
/* Note that this transaction is still active. */
/* Note that this transaction is still active. */
prebuilt
->
trx
->
active_trans
=
1
;
prebuilt
->
trx
->
active_trans
=
1
;
/* Re-acquire the table lock on the source table. */
/* Re-acquire the table lock on the source table. */
...
@@ -4247,7 +4247,7 @@ ha_innobase::delete_all_rows(void)
...
@@ -4247,7 +4247,7 @@ ha_innobase::delete_all_rows(void)
goto
fallback
;
goto
fallback
;
}
}
innobase_commit
(
thd
,
trx
);
innobase_commit
(
thd
,
1
);
error
=
convert_error_code_to_mysql
(
error
,
NULL
);
error
=
convert_error_code_to_mysql
(
error
,
NULL
);
...
...
sql/handler.cc
View file @
e29191e5
...
@@ -757,7 +757,7 @@ int ha_recover(HASH *commit_list)
...
@@ -757,7 +757,7 @@ int ha_recover(HASH *commit_list)
if
(
!
x
)
// not "mine" - that is generated by external TM
if
(
!
x
)
// not "mine" - that is generated by external TM
continue
;
continue
;
if
(
commit_list
?
if
(
commit_list
?
hash_search
(
commit_list
,
(
char
*
)
&
x
,
sizeof
(
x
))
!=
0
:
hash_search
(
commit_list
,
(
byte
*
)
&
x
,
sizeof
(
x
))
!=
0
:
tc_heuristic_recover
==
TC_HEURISTIC_RECOVER_COMMIT
)
tc_heuristic_recover
==
TC_HEURISTIC_RECOVER_COMMIT
)
(
*
(
*
ht
)
->
commit_by_xid
)(
list
+
i
);
(
*
(
*
ht
)
->
commit_by_xid
)(
list
+
i
);
else
else
...
...
sql/log.cc
View file @
e29191e5
...
@@ -2096,7 +2096,7 @@ void MYSQL_LOG::close(uint exiting)
...
@@ -2096,7 +2096,7 @@ void MYSQL_LOG::close(uint exiting)
if
(
log_file
.
type
==
WRITE_CACHE
&&
log_type
==
LOG_BIN
)
if
(
log_file
.
type
==
WRITE_CACHE
&&
log_type
==
LOG_BIN
)
{
{
my_off_t
offset
=
BIN_LOG_HEADER_SIZE
+
FLAGS_OFFSET
;
my_off_t
offset
=
BIN_LOG_HEADER_SIZE
+
FLAGS_OFFSET
;
char
flags
=
0
;
// clearing LOG_EVENT_BINLOG_IN_USE_F
byte
flags
=
0
;
// clearing LOG_EVENT_BINLOG_IN_USE_F
my_pwrite
(
log_file
.
file
,
&
flags
,
1
,
offset
,
MYF
(
0
));
my_pwrite
(
log_file
.
file
,
&
flags
,
1
,
offset
,
MYF
(
0
));
}
}
...
@@ -2474,10 +2474,10 @@ int TC_LOG_MMAP::open(const char *opt_name)
...
@@ -2474,10 +2474,10 @@ int TC_LOG_MMAP::open(const char *opt_name)
DBUG_ASSERT
(
opt_name
&&
opt_name
[
0
]);
DBUG_ASSERT
(
opt_name
&&
opt_name
[
0
]);
#ifdef HAVE_GETPAGESIZE
#ifdef HAVE_GETPAGESIZE
tc_log_page_size
=
getpagesize
();
tc_log_page_size
=
my_
getpagesize
();
DBUG_ASSERT
(
TC_LOG_PAGE_SIZE
%
tc_log_page_size
==
0
);
DBUG_ASSERT
(
TC_LOG_PAGE_SIZE
%
tc_log_page_size
==
0
);
#else
#else
tc_log_page_size
=
TC_LOG_PAGE_SIZE
;
tc_log_page_size
=
TC_LOG_PAGE_SIZE
;
#endif
#endif
fn_format
(
logname
,
opt_name
,
mysql_data_home
,
""
,
MY_UNPACK_FILENAME
);
fn_format
(
logname
,
opt_name
,
mysql_data_home
,
""
,
MY_UNPACK_FILENAME
);
...
@@ -2781,6 +2781,7 @@ void TC_LOG_MMAP::unlog(ulong cookie, my_xid xid)
...
@@ -2781,6 +2781,7 @@ void TC_LOG_MMAP::unlog(ulong cookie, my_xid xid)
void
TC_LOG_MMAP
::
close
()
void
TC_LOG_MMAP
::
close
()
{
{
uint
i
;
switch
(
inited
)
{
switch
(
inited
)
{
case
6
:
case
6
:
pthread_mutex_destroy
(
&
LOCK_sync
);
pthread_mutex_destroy
(
&
LOCK_sync
);
...
@@ -2790,7 +2791,7 @@ void TC_LOG_MMAP::close()
...
@@ -2790,7 +2791,7 @@ void TC_LOG_MMAP::close()
case
5
:
case
5
:
data
[
0
]
=
'A'
;
// garble the first (signature) byte, in case my_delete fails
data
[
0
]
=
'A'
;
// garble the first (signature) byte, in case my_delete fails
case
4
:
case
4
:
for
(
uint
i
=
0
;
i
<
npages
;
i
++
)
for
(
i
=
0
;
i
<
npages
;
i
++
)
{
{
if
(
pages
[
i
].
ptr
==
0
)
if
(
pages
[
i
].
ptr
==
0
)
break
;
break
;
...
@@ -3015,7 +3016,8 @@ int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle)
...
@@ -3015,7 +3016,8 @@ int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle)
if
(
ev
->
get_type_code
()
==
XID_EVENT
)
if
(
ev
->
get_type_code
()
==
XID_EVENT
)
{
{
Xid_log_event
*
xev
=
(
Xid_log_event
*
)
ev
;
Xid_log_event
*
xev
=
(
Xid_log_event
*
)
ev
;
byte
*
x
=
memdup_root
(
&
mem_root
,
(
char
*
)
&
xev
->
xid
,
sizeof
(
xev
->
xid
));
byte
*
x
=
(
byte
*
)
memdup_root
(
&
mem_root
,
(
char
*
)
&
xev
->
xid
,
sizeof
(
xev
->
xid
));
if
(
!
x
)
if
(
!
x
)
goto
err2
;
goto
err2
;
my_hash_insert
(
&
xids
,
x
);
my_hash_insert
(
&
xids
,
x
);
...
...
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