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
1bc6ae89
Commit
1bc6ae89
authored
Feb 20, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portability fixes
parent
69043988
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
17 deletions
+22
-17
include/config-win.h
include/config-win.h
+0
-3
include/my_sys.h
include/my_sys.h
+2
-1
mysql-test/r/mysqlbinlog.result
mysql-test/r/mysqlbinlog.result
+6
-2
mysys/my_mmap.c
mysys/my_mmap.c
+2
-2
sql/log.cc
sql/log.cc
+6
-8
sql/sql_class.h
sql/sql_class.h
+6
-1
No files found.
include/config-win.h
View file @
1bc6ae89
...
...
@@ -310,9 +310,6 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_SETFILEPOINTER
#define HAVE_VIO
#define HAME_MMAP
/* in mysys/my_mmap.c */
#define HAVE_GETPAGESIZE
/* in mysys/my_mmap.c */
#ifdef NOT_USED
#define HAVE_SNPRINTF
/* Gave link error */
#define _snprintf snprintf
...
...
include/my_sys.h
View file @
1bc6ae89
...
...
@@ -796,7 +796,7 @@ void my_free_open_file_info(void);
ulonglong
my_getsystime
(
void
);
my_bool
my_gethwaddr
(
uchar
*
to
);
#ifdef HAVE_
MMAP
#ifdef HAVE_
SYS_MMAN_H
#include <sys/mman.h>
#ifndef MAP_NOSYNC
...
...
@@ -815,6 +815,7 @@ my_bool my_gethwaddr(uchar *to);
#define MAP_NOSYNC 0x0800
#define MAP_FAILED ((void *)-1)
#define MS_SYNC 0x0000
#define HAVE_MMAP
int
my_getpagesize
(
void
);
void
*
my_mmap
(
void
*
,
size_t
,
int
,
int
,
int
,
my_off_t
);
...
...
mysql-test/r/mysqlbinlog.result
View file @
1bc6ae89
...
...
@@ -111,10 +111,14 @@ insert into t1 values ("Alas");
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
ROLLBACK;
use test;
SET TIMESTAMP=1
065204671
;
SET TIMESTAMP=1
108844556
;
BEGIN;
SET TIMESTAMP=1108844555;
insert t1 values (1);
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1
065204671
;
SET TIMESTAMP=1
108844556
;
BEGIN;
SET TIMESTAMP=1108844555;
insert t1 values (1);
drop table t1, t2;
mysys/my_mmap.c
View file @
1bc6ae89
...
...
@@ -16,7 +16,7 @@
#include "mysys_priv.h"
#ifdef HAVE_
MMAP
#ifdef HAVE_
SYS_MMAN_H
/*
system msync() only syncs mmap'ed area to fs cache.
...
...
@@ -84,6 +84,6 @@ int my_msync(int fd, void *addr, size_t len, int flags)
}
#endif
#
error
"no mmap!"
#
warning
"no mmap!"
#endif
sql/log.cc
View file @
1bc6ae89
...
...
@@ -2415,6 +2415,7 @@ void sql_print_information(const char *format, ...)
DBUG_VOID_RETURN
;
}
#ifdef HAVE_MMAP
/********* transaction coordinator log for 2pc - mmap() based solution *******/
/*
...
...
@@ -2460,10 +2461,6 @@ uint opt_tc_log_size=TC_LOG_MIN_SIZE;
uint
tc_log_max_pages_used
=
0
,
tc_log_page_size
=
0
,
tc_log_page_waits
=
0
,
tc_log_cur_pages_used
=
0
;
TC_LOG
*
tc_log
;
TC_LOG_MMAP
tc_log_mmap
;
TC_LOG_DUMMY
tc_log_dummy
;
int
TC_LOG_MMAP
::
open
(
const
char
*
opt_name
)
{
uint
i
;
...
...
@@ -2473,12 +2470,8 @@ int TC_LOG_MMAP::open(const char *opt_name)
DBUG_ASSERT
(
total_ha_2pc
>
1
);
DBUG_ASSERT
(
opt_name
&&
opt_name
[
0
]);
#ifdef HAVE_GETPAGESIZE
tc_log_page_size
=
my_getpagesize
();
DBUG_ASSERT
(
TC_LOG_PAGE_SIZE
%
tc_log_page_size
==
0
);
#else
tc_log_page_size
=
TC_LOG_PAGE_SIZE
;
#endif
fn_format
(
logname
,
opt_name
,
mysql_data_home
,
""
,
MY_UNPACK_FILENAME
);
fd
=
my_open
(
logname
,
O_RDWR
,
MYF
(
0
));
...
...
@@ -2861,6 +2854,11 @@ int TC_LOG_MMAP::recover()
"--tc-heuristic-recover={commit|rollback}"
);
return
1
;
}
#endif
TC_LOG
*
tc_log
;
TC_LOG_DUMMY
tc_log_dummy
;
TC_LOG_MMAP
tc_log_mmap
;
/*
Perform heuristic recovery, if --tc-heuristic-recover was used
...
...
sql/sql_class.h
View file @
1bc6ae89
...
...
@@ -80,6 +80,7 @@ class TC_LOG_DUMMY: public TC_LOG // use it to disable the logging
void
unlog
(
ulong
cookie
,
my_xid
xid
)
{
}
};
#ifdef HAVE_MMAP
class
TC_LOG_MMAP
:
public
TC_LOG
{
private:
...
...
@@ -103,7 +104,8 @@ class TC_LOG_MMAP: public TC_LOG
char
logname
[
FN_REFLEN
];
File
fd
;
uint
file_length
,
npages
,
inited
;
my_off_t
file_length
;
uint
npages
,
inited
;
uchar
*
data
;
struct
st_page
*
pages
,
*
syncing
,
*
active
,
*
pool
,
*
pool_last
;
/*
...
...
@@ -128,6 +130,9 @@ class TC_LOG_MMAP: public TC_LOG
int
sync
();
int
overflow
();
};
#else
#define TC_LOG_MMAP TC_LOG_DUMMY
#endif
extern
TC_LOG
*
tc_log
;
extern
TC_LOG_MMAP
tc_log_mmap
;
...
...
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