summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-10-28 21:03:56 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-10-28 21:03:56 +0100
commita774f9ce0bf7146ec1f7d9314b324c9af34b42c0 (patch)
treee037cf0462f35fdb82cec94cf8e885df02a0537b
parent98dd0f569fa5891317291750c3b9b78e62780c3f (diff)
downloadmariadb-git-bb-10.2-mdev-19838.tar.gz
postreview and windows fixesbb-10.2-mdev-19838
-rw-r--r--sql/sql_prepare.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index e752a12a765..424093ae279 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1016,7 +1016,7 @@ static bool insert_bulk_params(Prepared_statement *stmt,
@retval false this parameter is OK
*/
-bool
+static bool
parameter_type_sanity_check(ushort typecode)
{
/* Checking if type in lower byte is valid */
@@ -3314,16 +3314,17 @@ void mysqld_stmt_bulk_execute(THD *thd, char *packet_arg, uint packet_length)
@retval false this parameter is OK
*/
-bool stmt_execute_packet_sanity_check(Prepared_statement *stmt,
- uchar *packet, uchar *packet_end,
- bool bulk_op, bool direct_exec,
- bool read_types)
+static bool
+stmt_execute_packet_sanity_check(Prepared_statement *stmt,
+ uchar *packet, uchar *packet_end,
+ bool bulk_op, bool direct_exec,
+ bool read_types)
{
DBUG_ASSERT((!read_types) || (read_types && bulk_op));
if (stmt->param_count > 0)
{
- uint packet_length= packet_end - packet;
+ uint packet_length= static_cast<uint>(packet_end - packet);
uint null_bitmap_bytes= (bulk_op ? 0 : (stmt->param_count + 7)/8);
uint min_len_for_param_count = null_bitmap_bytes
+ (bulk_op ? 0 : 1); /* sent types byte */