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
ae325ec6
Commit
ae325ec6
authored
Aug 30, 2012
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile 10.0 on Windows
parent
d99b8004
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
41 deletions
+40
-41
cmake/create_initial_db.cmake.in
cmake/create_initial_db.cmake.in
+2
-4
include/my_valgrind.h
include/my_valgrind.h
+1
-1
include/violite.h
include/violite.h
+8
-5
scripts/comp_sql.c
scripts/comp_sql.c
+4
-8
sql/mysql_install_db.cc
sql/mysql_install_db.cc
+11
-7
sql/mysqld.cc
sql/mysqld.cc
+4
-8
sql/sql_error.h
sql/sql_error.h
+5
-3
sql/threadpool_win.cc
sql/threadpool_win.cc
+2
-2
vio/viopipe.c
vio/viopipe.c
+3
-3
No files found.
cmake/create_initial_db.cmake.in
View file @
ae325ec6
...
...
@@ -39,8 +39,8 @@ FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql)
ENDIF()
ENDFOREACH()
ENDFOREACH()
FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS)
FILE(APPEND bootstrap.sql ${CONTENTS})
#
FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS)
#
FILE(APPEND bootstrap.sql ${CONTENTS})
FILE(REMOVE_RECURSE mysql)
...
...
@@ -58,8 +58,6 @@ SET(BOOTSTRAP_COMMAND
--basedir=.
--datadir=.
--default-storage-engine=MyISAM
--loose-skip-innodb
--loose-skip-ndbcluster
--max_allowed_packet=8M
--net_buffer_length=16K
)
...
...
include/my_valgrind.h
View file @
ae325ec6
...
...
@@ -39,7 +39,7 @@
#ifndef DBUG_OFF
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B) ; bfill(A, trash_tmp, C); MEM_UNDEFINED(A, trash_tmp); } while (0)
#else
#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0)
#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute
__
((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0)
#endif
#define TRASH_ALLOC(A,B) TRASH_FILL(A,B,0xA5)
#define TRASH_FREE(A,B) TRASH_FILL(A,B,0x8F)
...
...
include/violite.h
View file @
ae325ec6
...
...
@@ -263,11 +263,6 @@ struct st_vio
my_bool
(
*
has_data
)
(
Vio
*
);
int
(
*
io_wait
)(
Vio
*
,
enum
enum_vio_io_event
,
int
);
my_bool
(
*
connect
)(
Vio
*
,
struct
sockaddr
*
,
socklen_t
,
int
);
#ifdef _WIN32
HANDLE
hPipe
;
DWORD
thread_id
;
/* Used on XP only by vio_shutdown() */
OVERLAPPED
overlapped
;
#endif
#ifdef HAVE_OPENSSL
void
*
ssl_arg
;
#endif
...
...
@@ -282,5 +277,13 @@ struct st_vio
size_t
shared_memory_remain
;
char
*
shared_memory_pos
;
#endif
/* HAVE_SMEM */
#ifdef _WIN32
HANDLE
hPipe
;
OVERLAPPED
overlapped
;
DWORD
thread_id
;
/* Used on XP only by vio_shutdown() */
OVERLAPPED
pipe_overlapped
;
DWORD
read_timeout_ms
;
DWORD
write_timeout_ms
;
#endif
};
#endif
/* vio_violite_h_ */
scripts/comp_sql.c
View file @
ae325ec6
...
...
@@ -27,8 +27,6 @@
#include <stdlib.h>
#include <stdio.h>
#include "../sql/sql_bootstrap.h"
/*
This is an internal tool used during the build process only,
- do not make a library just for this,
...
...
@@ -80,12 +78,6 @@ static void print_query(FILE *out, const char *query)
fprintf
(
out
,
"
\"
"
);
while
(
*
ptr
)
{
if
(
column
>=
120
)
{
/* Wrap to the next line, tabulated. */
fprintf
(
out
,
"
\"\n
\"
"
);
column
=
2
;
}
switch
(
*
ptr
)
{
case
'\n'
:
...
...
@@ -103,6 +95,9 @@ static void print_query(FILE *out, const char *query)
fprintf
(
out
,
"
\\\"
"
);
column
++
;
break
;
case
'\\'
:
fprintf
(
out
,
"
\\\\
"
);
break
;
default:
putc
(
*
ptr
,
out
);
column
++
;
...
...
@@ -135,6 +130,7 @@ int main(int argc, char *argv[])
fprintf
(
out
,
" Do not edit this file, it is automatically generated from:
\n
"
);
fprintf
(
out
,
" <%s>
\n
"
,
infile_name
);
fprintf
(
out
,
"*/
\n
"
);
fprintf
(
out
,
"#include <stdlib.h>
\n
"
);
/* NULL */
fprintf
(
out
,
"const char* %s[]={
\n
"
,
struct_name
);
for
(
;
;
)
...
...
sql/mysql_install_db.cc
View file @
ae325ec6
...
...
@@ -37,7 +37,7 @@
"Usage: mysql_install_db.exe [OPTIONS]\n" \
"OPTIONS:"
extern
"C"
const
char
mysql_bootstrap_sql
[];
extern
"C"
const
char
*
mysql_bootstrap_sql
[];
char
default_os_user
[]
=
"NT AUTHORITY
\\
NetworkService"
;
static
int
create_db_instance
();
...
...
@@ -247,7 +247,7 @@ static char *init_bootstrap_command_line(char *cmdline, size_t size)
"
\"\"
%s
\"
--no-defaults --bootstrap"
"
\"
--language=%s
\\
share
\\
english
\"
"
" --basedir=. --datadir=. --default-storage-engine=myisam"
" --max_allowed_packet=9M
--loose-skip-innodb --loose-skip-pbxt
"
" --max_allowed_packet=9M "
" --net-buffer-length=16k
\"
"
,
mysqld_path
,
basedir
);
return
cmdline
;
}
...
...
@@ -565,12 +565,16 @@ static int create_db_instance()
goto
end
;
}
/* Write the bootstrap script to stdin. */
if
(
fwrite
(
mysql_bootstrap_sql
,
strlen
(
mysql_bootstrap_sql
),
1
,
in
)
!=
1
)
int
i
;
for
(
i
=
0
;
mysql_bootstrap_sql
[
i
];
i
++
)
{
verbose
(
"ERROR: Cannot write to mysqld's stdin"
);
ret
=
1
;
goto
end
;
/* Write the bootstrap script to stdin. */
if
(
fwrite
(
mysql_bootstrap_sql
,
strlen
(
mysql_bootstrap_sql
[
i
]),
1
,
in
)
!=
1
)
{
verbose
(
"ERROR: Cannot write to mysqld's stdin"
);
ret
=
1
;
goto
end
;
}
}
/* Remove default user, if requested. */
...
...
sql/mysqld.cc
View file @
ae325ec6
...
...
@@ -5582,11 +5582,8 @@ void handle_connections_sockets()
fds[socket_count].events= POLLIN; \
socket_count++
#else
fd_set
readFDs
,
clientFDs
;
uint
max_used_connection
=
(
uint
)
max
(
max
(
mysql_socket_getfd
(
base_ip_sock
),
mysql_socket_getfd
(
unix_sock
)),
mysqld_socket_getfd
(
extra_ip_sock
))
+
1
;
#define setup_fds(X) FD_SET(mysql_socket_getfd(X),&clientFDs)
fd_set
readFDs
,
clientFDs
;
FD_ZERO
(
&
clientFDs
);
#endif
...
...
@@ -5615,8 +5612,7 @@ void handle_connections_sockets()
retval
=
poll
(
fds
,
socket_count
,
-
1
);
#else
readFDs
=
clientFDs
;
retval
=
select
((
int
)
max_used_connection
,
&
readFDs
,
0
,
0
,
0
);
retval
=
select
((
int
)
0
,
&
readFDs
,
0
,
0
,
0
);
#endif
if
(
retval
<
0
)
...
...
@@ -5648,13 +5644,13 @@ void handle_connections_sockets()
}
}
#else // HAVE_POLL
if
(
FD_ISSET
(
base_ip_sock
,
&
readFDs
))
if
(
FD_ISSET
(
mysql_socket_getfd
(
base_ip_sock
)
,
&
readFDs
))
{
sock
=
base_ip_sock
;
flags
=
ip_flags
;
}
else
if
(
FD_ISSET
(
extra_ip_sock
,
&
readFDs
))
if
(
FD_ISSET
(
mysql_socket_getfd
(
extra_ip_sock
)
,
&
readFDs
))
{
sock
=
extra_ip_sock
;
flags
=
extra_ip_flags
;
...
...
sql/sql_error.h
View file @
ae325ec6
...
...
@@ -193,6 +193,10 @@ public:
MYSQL_ERROR
::
enum_warning_level
get_level
()
const
{
return
m_level
;
}
/** Destructor. */
~
MYSQL_ERROR
()
{}
private:
/*
The interface of MYSQL_ERROR is mostly private, by design,
...
...
@@ -234,9 +238,7 @@ private:
*/
MYSQL_ERROR
(
MEM_ROOT
*
mem_root
);
/** Destructor. */
~
MYSQL_ERROR
()
{}
/**
Copy optional condition items attributes.
...
...
sql/threadpool_win.cc
View file @
ae325ec6
...
...
@@ -255,7 +255,7 @@ int init_io(connection_t *connection, THD *thd)
{
case
VIO_TYPE_SSL
:
case
VIO_TYPE_TCPIP
:
connection
->
handle
=
(
HANDLE
)
vio
->
sd
;
connection
->
handle
=
(
HANDLE
)
mysql_socket_getfd
(
connection
->
thd
->
net
.
vio
->
mysql_socket
)
;
break
;
case
VIO_TYPE_NAMEDPIPE
:
connection
->
handle
=
(
HANDLE
)
vio
->
hPipe
;
...
...
@@ -342,7 +342,7 @@ int start_io(connection_t *connection, PTP_CALLBACK_INSTANCE instance)
if
(
vio
->
type
==
VIO_TYPE_TCPIP
||
vio
->
type
==
VIO_TYPE_SSL
)
{
/* Start async io (sockets). */
if
(
WSARecv
(
vio
->
sd
,
&
buf
,
1
,
&
num_bytes
,
&
flags
,
if
(
WSARecv
(
mysql_socket_getfd
(
vio
->
mysql_socket
)
,
&
buf
,
1
,
&
num_bytes
,
&
flags
,
overlapped
,
NULL
)
==
0
)
{
retval
=
last_error
=
0
;
...
...
vio/viopipe.c
View file @
ae325ec6
...
...
@@ -48,7 +48,7 @@ static size_t wait_overlapped_result(Vio *vio, int timeout)
timeout_ms
=
timeout
>=
0
?
timeout
:
INFINITE
;
/* Wait for the overlapped operation to be completed. */
ret
=
WaitForSingleObjectEx
(
vio
->
pipe_overlapped
.
hEvent
,
timeout_ms
,
TRUE
);
wait_status
=
WaitForSingleObjectEx
(
vio
->
pipe_overlapped
.
hEvent
,
timeout_ms
,
TRUE
);
/*
WaitForSingleObjects will normally return WAIT_OBJECT_O (success,
...
...
@@ -78,7 +78,7 @@ size_t vio_read_pipe(Vio *vio, uchar *buf, size_t count)
DWORD
transferred
;
size_t
ret
=
(
size_t
)
-
1
;
DBUG_ENTER
(
"vio_read_pipe"
);
DBUG_PRINT
(
"enter"
,
(
"sd: %
d buf: %p size: %d"
,
vio
->
sd
,
buf
,
DBUG_PRINT
(
"enter"
,
(
"sd: %
p buf: %p size: %d"
,
vio
->
hPipe
,
buf
,
(
int
)
count
));
disable_iocp_notification
(
&
vio
->
overlapped
);
...
...
@@ -111,7 +111,7 @@ size_t vio_write_pipe(Vio *vio, const uchar *buf, size_t count)
DWORD
transferred
;
size_t
ret
=
(
size_t
)
-
1
;
DBUG_ENTER
(
"vio_write_pipe"
);
DBUG_PRINT
(
"enter"
,
(
"sd: %d buf: %p size: %d"
,
vio
->
sd
,
buf
,
DBUG_PRINT
(
"enter"
,
(
"sd: %d buf: %p size: %d"
,
vio
->
hPipe
,
buf
,
(
int
)
count
));
disable_iocp_notification
(
&
vio
->
pipe_overlapped
);
...
...
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