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
57cdc561
Commit
57cdc561
authored
Feb 27, 2014
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing AIX compilation failires
parent
11826b1b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
82 additions
and
22 deletions
+82
-22
include/my_global.h
include/my_global.h
+33
-0
plugin/handler_socket/libhsclient/auto_file.hpp
plugin/handler_socket/libhsclient/auto_file.hpp
+5
-0
sql-common/mysql_async.c
sql-common/mysql_async.c
+6
-0
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/scheduler.h
sql/scheduler.h
+2
-1
sql/threadpool_unix.cc
sql/threadpool_unix.cc
+5
-0
storage/connect/os.h
storage/connect/os.h
+6
-0
storage/perfschema/table_events_waits.cc
storage/perfschema/table_events_waits.cc
+9
-5
storage/xtradb/include/sync0sync.h
storage/xtradb/include/sync0sync.h
+8
-8
storage/xtradb/include/sync0sync.ic
storage/xtradb/include/sync0sync.ic
+4
-4
storage/xtradb/include/sync0types.h
storage/xtradb/include/sync0types.h
+3
-3
No files found.
include/my_global.h
View file @
57cdc561
...
...
@@ -144,6 +144,7 @@
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
#if defined(_AIX) && defined(_LARGE_FILE_API)
#undef _LARGE_FILE_API
#undef __GNUG__
#endif
/*
...
...
@@ -264,6 +265,16 @@
#endif
#endif
#ifdef _AIX
/*
AIX includes inttypes.h from sys/types.h
Explicitly request format macros before the first inclusion of inttypes.h
*/
#define __STDC_FORMAT_MACROS
#endif
#if !defined(__WIN__)
#ifndef _POSIX_PTHREAD_SEMANTICS
#define _POSIX_PTHREAD_SEMANTICS
/* We want posix threads */
...
...
@@ -316,6 +327,13 @@ C_MODE_END
#define _LONG_LONG 1
/* For AIX string library */
#endif
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
#if defined(_AIX) && defined(_LARGE_FILE_API)
#undef _LARGE_FILE_API
#undef __GNUG__
#endif
#ifndef stdin
#include <stdio.h>
#endif
...
...
@@ -341,6 +359,14 @@ C_MODE_END
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
#if defined(_AIX) && defined(_LARGE_FILE_API)
#undef _LARGE_FILE_API
#undef __GNUG__
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
...
...
@@ -1221,4 +1247,11 @@ static inline double rint(double x)
#define DEFAULT_TMPDIR P_tmpdir
#endif
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
#if defined(_AIX) && defined(_LARGE_FILE_API)
#undef _LARGE_FILE_API
#undef __GNUG__
#endif
#endif
/* my_global_h */
plugin/handler_socket/libhsclient/auto_file.hpp
View file @
57cdc561
...
...
@@ -9,6 +9,11 @@
#ifndef DENA_AUTO_FILE_HPP
#define DENA_AUTO_FILE_HPP
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
#if defined(_AIX) && defined(_LARGE_FILE_API)
#undef _LARGE_FILE_API
#endif
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
...
...
sql-common/mysql_async.c
View file @
57cdc561
...
...
@@ -121,6 +121,12 @@ my_connect_async(struct mysql_async_context *b, my_socket fd,
IF_WIN(WSAGetLastError() != WSAEWOULDBLOCK, \
(errno != EAGAIN && errno != EINTR))
#ifdef _AIX
#ifndef MSG_DONTWAIT
#define MSG_DONTWAIT 0
#endif
#endif
ssize_t
my_recv_async
(
struct
mysql_async_context
*
b
,
int
fd
,
unsigned
char
*
buf
,
size_t
size
,
int
timeout
)
...
...
sql/mysqld.cc
View file @
57cdc561
...
...
@@ -8144,7 +8144,7 @@ static int mysql_init_variables(void)
my_atomic_rwlock_init
(
&
thread_running_lock
);
my_atomic_rwlock_init
(
&
thread_count_lock
);
my_atomic_rwlock_init
(
&
statistics_lock
);
my_atomic_rwlock_init
(
slave_executed_entries_lock
);
my_atomic_rwlock_init
(
&
slave_executed_entries_lock
);
strmov
(
server_version
,
MYSQL_SERVER_VERSION
);
threads
.
empty
();
thread_cache
.
empty
();
...
...
sql/scheduler.h
View file @
57cdc561
...
...
@@ -99,7 +99,8 @@ public:
void
*
data
;
/* scheduler-specific data structure */
};
#if !defined(EMBEDDED_LIBRARY)
#undef HAVE_POOL_OF_THREADS
#if !defined(EMBEDDED_LIBRARY) && !defined(_AIX)
#define HAVE_POOL_OF_THREADS 1
void
pool_of_threads_scheduler
(
scheduler_functions
*
func
,
ulong
*
arg_max_connections
,
...
...
sql/threadpool_unix.cc
View file @
57cdc561
...
...
@@ -19,6 +19,9 @@
#include <sql_class.h>
#include <my_pthread.h>
#include <scheduler.h>
#ifdef HAVE_POOL_OF_THREADS
#include <sql_connect.h>
#include <mysqld.h>
#include <debug_sync.h>
...
...
@@ -1678,3 +1681,5 @@ static void print_pool_blocked_message(bool max_threads_reached)
msg_written
=
true
;
}
}
#endif
/* HAVE_POOL_OF_THREADS */
storage/connect/os.h
View file @
57cdc561
...
...
@@ -9,6 +9,12 @@ typedef off_t off64_t;
#define O_LARGEFILE 0
#endif
#ifdef _AIX
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
#endif
#if defined(WIN32)
typedef
__int64
BIGINT
;
#else // !WIN32
...
...
storage/perfschema/table_events_waits.cc
View file @
57cdc561
...
...
@@ -315,11 +315,15 @@ int table_events_waits_common::make_socket_object_columns(volatile PFS_events_wa
uint
port
;
char
port_str
[
128
];
char
ip_str
[
INET6_ADDRSTRLEN
+
1
];
uint
ip_len
=
0
;
/*
"ip_length" was "ip_len" originally.
but it conflicted with some macro on AIX. Renamed.
*/
uint
ip_length
=
0
;
port_str
[
0
]
=
':'
;
/* Get the IP address and port number */
ip_len
=
pfs_get_socket_address
(
ip_str
,
sizeof
(
ip_str
),
&
port
,
ip_len
gth
=
pfs_get_socket_address
(
ip_str
,
sizeof
(
ip_str
),
&
port
,
&
safe_socket
->
m_sock_addr
,
safe_socket
->
m_addr_len
);
...
...
@@ -327,15 +331,15 @@ int table_events_waits_common::make_socket_object_columns(volatile PFS_events_wa
int
port_len
=
int10_to_str
(
port
,
(
port_str
+
1
),
10
)
-
port_str
+
1
;
/* OBJECT NAME */
m_row
.
m_object_name_length
=
ip_len
+
port_len
;
m_row
.
m_object_name_length
=
ip_len
gth
+
port_len
;
if
(
unlikely
((
m_row
.
m_object_name_length
==
0
)
||
(
m_row
.
m_object_name_length
>
sizeof
(
m_row
.
m_object_name
))))
return
1
;
char
*
name
=
m_row
.
m_object_name
;
memcpy
(
name
,
ip_str
,
ip_len
);
memcpy
(
name
+
ip_len
,
port_str
,
port_len
);
memcpy
(
name
,
ip_str
,
ip_len
gth
);
memcpy
(
name
+
ip_len
gth
,
port_str
,
port_len
);
}
else
{
...
...
storage/xtradb/include/sync0sync.h
View file @
57cdc561
...
...
@@ -198,10 +198,10 @@ necessary only if the memory block containing it is freed. */
pfs_mutex_enter_nowait_func((M), __FILE__, __LINE__)
# define mutex_enter_first(M) \
pfs_mutex_enter_func((M), __FILE__, __LINE__, HIGH_PRIO)
pfs_mutex_enter_func((M), __FILE__, __LINE__,
IB_
HIGH_PRIO)
# define mutex_enter_last(M) \
pfs_mutex_enter_func((M), __FILE__, __LINE__, LOW_PRIO)
pfs_mutex_enter_func((M), __FILE__, __LINE__,
IB_
LOW_PRIO)
# define mutex_exit(M) pfs_mutex_exit_func(M)
...
...
@@ -230,10 +230,10 @@ original non-instrumented functions */
mutex_enter_nowait_func((M), __FILE__, __LINE__)
# define mutex_enter_first(M) \
mutex_enter_func((M), __FILE__, __LINE__, HIGH_PRIO)
mutex_enter_func((M), __FILE__, __LINE__,
IB_
HIGH_PRIO)
# define mutex_enter_last(M) \
mutex_enter_func((M), __FILE__, __LINE__, LOW_PRIO)
mutex_enter_func((M), __FILE__, __LINE__,
IB_
LOW_PRIO)
# define mutex_exit(M) mutex_exit_func(M)
...
...
@@ -325,8 +325,8 @@ directly. Locks a priority mutex for the current thread. If the mutex is
reserved the function spins a preset time (controlled by SYNC_SPIN_ROUNDS)
waiting for the mutex before suspending the thread. If the thread is suspended,
the priority argument value determines the relative order for its wake up. Any
HIGH_PRIO waiters will be woken up before any
LOW_PRIO waiters. In case of
DEFAULT_PRIO, the relative priority will be set according to
IB_HIGH_PRIO waiters will be woken up before any IB_
LOW_PRIO waiters. In case of
IB_
DEFAULT_PRIO, the relative priority will be set according to
srv_current_thread_priority. */
UNIV_INLINE
void
...
...
@@ -336,7 +336,7 @@ mutex_enter_func(
const
char
*
file_name
,
/*!< in: file name where
locked */
ulint
line
,
/*!< in: line where locked */
enum
ib_sync_priority
priority
=
DEFAULT_PRIO
);
enum
ib_sync_priority
priority
=
IB_
DEFAULT_PRIO
);
/*!<in: mutex acquisition
priority */
/********************************************************************//**
...
...
@@ -453,7 +453,7 @@ pfs_mutex_enter_func(
const
char
*
file_name
,
/*!< in: file name where
locked */
ulint
line
,
/*!< in: line where locked */
enum
ib_sync_priority
priority
=
DEFAULT_PRIO
);
enum
ib_sync_priority
priority
=
IB_
DEFAULT_PRIO
);
/*!<in: mutex acquisition
priority */
/********************************************************************//**
...
...
storage/xtradb/include/sync0sync.ic
View file @
57cdc561
...
...
@@ -278,8 +278,8 @@ directly. Locks a priority mutex for the current thread. If the mutex is
reserved the function spins a preset time (controlled by SYNC_SPIN_ROUNDS)
waiting for the mutex before suspending the thread. If the thread is suspended,
the priority argument value determines the relative order for its wake up. Any
HIGH_PRIO waiters will be woken up before any LOW_PRIO waiters. In case of
DEFAULT_PRIO, the relative priority will be set according to
IB_HIGH_PRIO waiters will be woken up before any IB_LOW_PRIO waiters. In case
of IB_
DEFAULT_PRIO, the relative priority will be set according to
srv_current_thread_priority. */
UNIV_INLINE
void
...
...
@@ -309,10 +309,10 @@ mutex_enter_func(
return; /* Succeeded! */
}
if (UNIV_LIKELY(priority == DEFAULT_PRIO)) {
if (UNIV_LIKELY(priority ==
IB_
DEFAULT_PRIO)) {
high_priority = srv_current_thread_priority;
} else {
high_priority = (priority == HIGH_PRIO);
high_priority = (priority ==
IB_
HIGH_PRIO);
}
mutex_spin_wait(mutex, high_priority, file_name, line);
}
...
...
storage/xtradb/include/sync0types.h
View file @
57cdc561
...
...
@@ -36,9 +36,9 @@ struct ib_prio_mutex_t;
/** Priority mutex and rwlatch acquisition priorities */
enum
ib_sync_priority
{
DEFAULT_PRIO
,
LOW_PRIO
,
HIGH_PRIO
IB_
DEFAULT_PRIO
,
IB_
LOW_PRIO
,
IB_
HIGH_PRIO
};
#endif
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