summaryrefslogtreecommitdiff
path: root/include/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'include/mysql')
-rw-r--r--include/mysql/psi/mysql_idle.h3
-rw-r--r--include/mysql/psi/mysql_socket.h15
-rw-r--r--include/mysql/psi/mysql_statement.h3
-rw-r--r--include/mysql/psi/mysql_table.h3
4 files changed, 12 insertions, 12 deletions
diff --git a/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h
index 5c72b715b7a..b623edce108 100644
--- a/include/mysql/psi/mysql_idle.h
+++ b/include/mysql/psi/mysql_idle.h
@@ -1,4 +1,5 @@
/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,7 +68,7 @@
*/
static inline struct PSI_idle_locker *
inline_mysql_start_idle_wait(PSI_idle_locker_state *state,
- const char *src_file, int src_line)
+ const char *src_file, uint src_line)
{
struct PSI_idle_locker *locker;
locker= PSI_IDLE_CALL(start_idle_wait)(state, src_file, src_line);
diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h
index 619f600a776..64531e5c35e 100644
--- a/include/mysql/psi/mysql_socket.h
+++ b/include/mysql/psi/mysql_socket.h
@@ -1,4 +1,5 @@
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -241,7 +242,7 @@ inline_mysql_start_socket_wait(PSI_socket_locker_state *state,
MYSQL_SOCKET mysql_socket,
enum PSI_socket_operation op,
size_t byte_count,
- const char *src_file, int src_line)
+ const char *src_file, uint src_line)
{
struct PSI_socket_locker *locker;
if (mysql_socket.m_psi != NULL)
@@ -744,8 +745,7 @@ inline_mysql_socket_send
/* Instrumentation end */
if (locker != NULL)
{
- size_t bytes_written;
- bytes_written= (result > -1) ? result : 0;
+ size_t bytes_written= (result > 0) ? (size_t) result : 0;
PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_written);
}
@@ -786,8 +786,7 @@ inline_mysql_socket_recv
/* Instrumentation end */
if (locker != NULL)
{
- size_t bytes_read;
- bytes_read= (result > -1) ? result : 0;
+ size_t bytes_read= (result > 0) ? (size_t) result : 0;
PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_read);
}
@@ -828,8 +827,7 @@ inline_mysql_socket_sendto
/* Instrumentation end */
if (locker != NULL)
{
- size_t bytes_written;
- bytes_written = (result > -1) ? result : 0;
+ size_t bytes_written = (result > 0) ? (size_t) result : 0;
PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_written);
}
@@ -871,8 +869,7 @@ inline_mysql_socket_recvfrom
/* Instrumentation end */
if (locker != NULL)
{
- size_t bytes_read;
- bytes_read = (result > -1) ? result : 0;
+ size_t bytes_read= (result > 0) ? (size_t) result : 0;
PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_read);
}
diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h
index 3d5943fa55a..05016130af7 100644
--- a/include/mysql/psi/mysql_statement.h
+++ b/include/mysql/psi/mysql_statement.h
@@ -1,4 +1,5 @@
/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -146,7 +147,7 @@ inline_mysql_start_statement(PSI_statement_locker_state *state,
PSI_statement_key key,
const char *db, uint db_len,
const CHARSET_INFO *charset,
- const char *src_file, int src_line)
+ const char *src_file, uint src_line)
{
PSI_statement_locker *locker;
locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset);
diff --git a/include/mysql/psi/mysql_table.h b/include/mysql/psi/mysql_table.h
index 74217a32b13..5b4b64a8e48 100644
--- a/include/mysql/psi/mysql_table.h
+++ b/include/mysql/psi/mysql_table.h
@@ -1,4 +1,5 @@
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -183,7 +184,7 @@ static inline struct PSI_table_locker *
inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
struct PSI_table *psi,
enum PSI_table_lock_operation op,
- ulong flags, const char *src_file, int src_line)
+ ulong flags, const char *src_file, uint src_line)
{
if (psi != NULL)
{