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
d2f54d57
Commit
d2f54d57
authored
Apr 13, 2012
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some simple warnings on Windows.
parent
12e4feab
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
30 additions
and
34 deletions
+30
-34
dbug/tests.c
dbug/tests.c
+3
-2
extra/my_print_defaults.c
extra/my_print_defaults.c
+3
-3
sql-common/client.c
sql-common/client.c
+0
-13
sql/item_func.h
sql/item_func.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/signal_handler.cc
sql/signal_handler.cc
+1
-1
sql/slave.cc
sql/slave.cc
+2
-2
sql/sql_test.cc
sql/sql_test.cc
+1
-1
storage/innobase/CMakeLists.txt
storage/innobase/CMakeLists.txt
+9
-0
storage/maria/unittest/ma_control_file-t.c
storage/maria/unittest/ma_control_file-t.c
+3
-1
storage/maria/unittest/ma_test_loghandler_multithread-t.c
storage/maria/unittest/ma_test_loghandler_multithread-t.c
+1
-1
storage/perfschema/pfs_instr_class.cc
storage/perfschema/pfs_instr_class.cc
+2
-6
storage/perfschema/pfs_instr_class.h
storage/perfschema/pfs_instr_class.h
+3
-1
storage/sphinx/ha_sphinx.cc
storage/sphinx/ha_sphinx.cc
+0
-1
No files found.
dbug/tests.c
View file @
d2f54d57
...
...
@@ -38,10 +38,10 @@ int func1()
int
main
(
int
argc
,
char
*
argv
[])
{
int
i
;
#ifdef DBUG_OFF
return
1
;
#endif
#else
int
i
;
if
(
argc
==
1
)
return
0
;
...
...
@@ -83,4 +83,5 @@ int main (int argc, char *argv[])
DBUG_SET
(
""
);
/* to not have my_end() in the traces */
my_end
(
0
);
return
0
;
#endif
/* DBUG_OFF */
}
extra/my_print_defaults.c
View file @
d2f54d57
...
...
@@ -67,7 +67,7 @@ static struct my_option my_long_options[] =
{
"defaults-extra-file"
,
'e'
,
"Read this file after the global config file and before the config "
"file in the users home directory; should be the first option"
,
&
my_defaults_extra_file
,
&
my_defaults_extra_file
,
0
,
(
void
*
)
&
my_defaults_extra_file
,
(
void
*
)
&
my_defaults_extra_file
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"defaults-group-suffix"
,
'g'
,
"In addition to the given groups, read also groups with this suffix"
,
...
...
@@ -75,8 +75,8 @@ static struct my_option my_long_options[] =
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"extra-file"
,
'e'
,
"Deprecated. Synonym for --defaults-extra-file."
,
&
my_defaults_extra_file
,
&
my_defaults_extra_file
,
0
,
GET_STR
,
(
void
*
)
&
my_defaults_extra_file
,
(
void
*
)
&
my_defaults_extra_file
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"no-defaults"
,
'n'
,
"Return an empty string (useful for scripts)."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
sql-common/client.c
View file @
d2f54d57
...
...
@@ -2969,10 +2969,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
const
char
*
scramble_plugin
;
ulong
pkt_length
;
NET
*
net
=
&
mysql
->
net
;
#ifdef MYSQL_SERVER
thr_alarm_t
alarmed
;
ALARM
alarm_buff
;
#endif
#ifdef __WIN__
HANDLE
hPipe
=
INVALID_HANDLE_VALUE
;
#endif
...
...
@@ -3181,17 +3177,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
my_snprintf
(
host_info
=
buff
,
sizeof
(
buff
)
-
1
,
ER
(
CR_TCP_CONNECTION
),
host
);
DBUG_PRINT
(
"info"
,(
"Server name: '%s'. TCP sock: %d"
,
host
,
port
));
#ifdef MYSQL_SERVER
thr_alarm_init
(
&
alarmed
);
thr_alarm
(
&
alarmed
,
mysql
->
options
.
connect_timeout
,
&
alarm_buff
);
#endif
DBUG_PRINT
(
"info"
,(
"IP '%s'"
,
"client"
));
#ifdef MYSQL_SERVER
thr_end_alarm
(
&
alarmed
);
#endif
memset
(
&
hints
,
0
,
sizeof
(
hints
));
hints
.
ai_socktype
=
SOCK_STREAM
;
hints
.
ai_protocol
=
IPPROTO_TCP
;
...
...
sql/item_func.h
View file @
d2f54d57
...
...
@@ -150,7 +150,7 @@ class Item_func :public Item_result_field
void
count_only_length
();
void
count_real_length
();
void
count_decimal_length
();
inline
bool
get_arg0_date
(
MYSQL_TIME
*
ltime
,
u
int
fuzzy_date
)
inline
bool
get_arg0_date
(
MYSQL_TIME
*
ltime
,
u
longlong
fuzzy_date
)
{
return
(
null_value
=
args
[
0
]
->
get_date
(
ltime
,
fuzzy_date
));
}
...
...
sql/mysqld.cc
View file @
d2f54d57
...
...
@@ -2220,8 +2220,8 @@ static void network_init(void)
{
#ifdef HAVE_SYS_UN_H
struct
sockaddr_un
UNIXaddr
;
#endif
int
arg
;
#endif
DBUG_ENTER
(
"network_init"
);
if
(
MYSQL_CALLBACK_ELSE
(
thread_scheduler
,
init
,
(),
0
))
...
...
sql/signal_handler.cc
View file @
d2f54d57
...
...
@@ -167,7 +167,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
"where mysqld died. If you see no messages after this, something went
\n
"
"terribly wrong...
\n
"
);
my_print_stacktrace
(
thd
?
(
uchar
*
)
thd
->
thread_stack
:
NULL
,
my_thread_stack_size
);
(
ulong
)
my_thread_stack_size
);
}
if
(
thd
)
{
...
...
sql/slave.cc
View file @
d2f54d57
...
...
@@ -4155,8 +4155,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
{
int
error
=
0
;
String
error_msg
;
ulong
inc_pos
;
ulong
event_pos
;
ulong
long
inc_pos
;
ulong
long
event_pos
;
Relay_log_info
*
rli
=
&
mi
->
rli
;
mysql_mutex_t
*
log_lock
=
rli
->
relay_log
.
get_log_lock
();
ulong
s_id
;
...
...
sql/sql_test.cc
View file @
d2f54d57
...
...
@@ -618,8 +618,8 @@ Open streams: %10lu\n",
(
ulong
)
my_file_opened
,
(
ulong
)
my_stream_opened
);
ALARM_INFO
alarm_info
;
#ifndef DONT_USE_THR_ALARM
ALARM_INFO
alarm_info
;
thr_alarm_info
(
&
alarm_info
);
printf
(
"
\n
Alarm status:
\n
\
Active alarms: %u
\n
\
...
...
storage/innobase/CMakeLists.txt
View file @
d2f54d57
...
...
@@ -214,6 +214,15 @@ IF (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
PROPERTIES COMPILE_FLAGS -Od
)
ENDIF
()
IF
(
MSVC
)
# Avoid "unreferenced label" warning in generated file
GET_FILENAME_COMPONENT
(
_SRC_DIR
${
CMAKE_CURRENT_LIST_FILE
}
PATH
)
SET_SOURCE_FILES_PROPERTIES
(
${
_SRC_DIR
}
/pars/pars0grm.c
PROPERTIES COMPILE_FLAGS
"/wd4102"
)
SET_SOURCE_FILES_PROPERTIES
(
${
_SRC_DIR
}
/pars/lexyy.c
PROPERTIES COMPILE_FLAGS
"/wd4003"
)
ENDIF
()
SET
(
INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
data/data0data.c data/data0type.c
...
...
storage/maria/unittest/ma_control_file-t.c
View file @
d2f54d57
...
...
@@ -23,7 +23,9 @@
#include <my_global.h>
#include <my_sys.h>
#include <tap.h>
#ifdef _WIN32
#include <direct.h>
/* rmdir */
#endif
#ifndef WITH_ARIA_STORAGE_ENGINE
/*
If Aria is not compiled in, normally we don't come to building this test.
...
...
storage/maria/unittest/ma_test_loghandler_multithread-t.c
View file @
d2f54d57
...
...
@@ -289,7 +289,7 @@ int main(int argc __attribute__((unused)),
fprintf
(
stderr
,
"End of memory
\n
"
);
exit
(
1
);
}
for
(
i
=
0
;
i
<
(
LONG_BUFFER_SIZE
+
7
*
2
+
2
);
i
++
)
for
(
i
=
0
;
i
<
(
uint32
)(
LONG_BUFFER_SIZE
+
7
*
2
+
2
);
i
++
)
long_buffer
[
i
]
=
(
i
&
0xFF
);
#ifndef DBUG_OFF
...
...
storage/perfschema/pfs_instr_class.cc
View file @
d2f54d57
...
...
@@ -823,16 +823,14 @@ const char *sanitize_table_schema_name(const char *unsafe)
intptr
first
=
(
intptr
)
&
table_share_array
[
0
];
intptr
last
=
(
intptr
)
&
table_share_array
[
table_share_max
];
PFS_table_share
dummy
;
/* Check if unsafe points inside table_share_array[] */
if
(
likely
((
first
<=
ptr
)
&&
(
ptr
<
last
)))
{
intptr
offset
=
(
ptr
-
first
)
%
sizeof
(
PFS_table_share
);
intptr
from
=
my_offsetof
(
PFS_table_share
,
m_key
.
m_hash_key
);
intptr
len
=
sizeof
(
dummy
.
m_key
.
m_hash_key
);
/* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */
if
(
likely
((
from
<=
offset
)
&&
(
offset
<
from
+
len
)))
if
(
likely
((
from
<=
offset
)
&&
(
offset
<
from
+
PFS_TABLESHARE_HASHKEY_SIZE
)))
{
PFS_table_share
*
base
=
(
PFS_table_share
*
)
(
ptr
-
offset
);
/* Check if unsafe really is the schema name */
...
...
@@ -849,16 +847,14 @@ const char *sanitize_table_object_name(const char *unsafe)
intptr
first
=
(
intptr
)
&
table_share_array
[
0
];
intptr
last
=
(
intptr
)
&
table_share_array
[
table_share_max
];
PFS_table_share
dummy
;
/* Check if unsafe points inside table_share_array[] */
if
(
likely
((
first
<=
ptr
)
&&
(
ptr
<
last
)))
{
intptr
offset
=
(
ptr
-
first
)
%
sizeof
(
PFS_table_share
);
intptr
from
=
my_offsetof
(
PFS_table_share
,
m_key
.
m_hash_key
);
intptr
len
=
sizeof
(
dummy
.
m_key
.
m_hash_key
);
/* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */
if
(
likely
((
from
<=
offset
)
&&
(
offset
<
from
+
len
)))
if
(
likely
((
from
<=
offset
)
&&
(
offset
<
from
+
PFS_TABLESHARE_HASHKEY_SIZE
)))
{
PFS_table_share
*
base
=
(
PFS_table_share
*
)
(
ptr
-
offset
);
/* Check if unsafe really is the table name */
...
...
storage/perfschema/pfs_instr_class.h
View file @
d2f54d57
...
...
@@ -128,6 +128,8 @@ struct PFS_thread_class
bool
m_enabled
;
};
#define PFS_TABLESHARE_HASHKEY_SIZE (NAME_LEN + 1 + NAME_LEN + 1)
/** Key identifying a table share. */
struct
PFS_table_share_key
{
...
...
@@ -137,7 +139,7 @@ struct PFS_table_share_key
the format is "<schema_name><0x00><object_name><0x00>"
@see create_table_def_key
*/
char
m_hash_key
[
NAME_LEN
+
1
+
NAME_LEN
+
1
];
char
m_hash_key
[
PFS_TABLESHARE_HASHKEY_SIZE
];
/** Length in bytes of @c m_hash_key. */
uint
m_key_length
;
};
...
...
storage/sphinx/ha_sphinx.cc
View file @
d2f54d57
...
...
@@ -50,7 +50,6 @@
#else
// Windows-specific
#include <io.h>
#define strcasecmp stricmp
#define snprintf _snprintf
#define RECV_FLAGS 0
...
...
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