Skip to content

Commit f6623ab

Browse files
author
Anushree Prakash B
committed
Merge branch 'mysql-5.6' into mysql-5.7
2 parents 6e424ce + 7f6ebf0 commit f6623ab

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

libbinlogevents/src/control_events.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -866,7 +866,8 @@ View_change_event::View_change_event(char* raw_view_id)
866866
: Binary_log_event(VIEW_CHANGE_EVENT),
867867
view_id(), seq_number(0), certification_info()
868868
{
869-
memcpy(view_id, raw_view_id, strlen(raw_view_id));
869+
strncpy(view_id, raw_view_id, sizeof(view_id)-1);
870+
view_id[sizeof(view_id)-1]= 0;
870871
}
871872

872873
View_change_event::

libmysql/authentication_win/common.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -504,7 +504,7 @@ const char* get_last_error_message(Error_message_buf buf)
504504
buf[0]= '\0';
505505
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
506506
NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
507-
(LPTSTR)buf, sizeof(buf), NULL );
507+
(LPTSTR)buf, sizeof(Error_message_buf), NULL);
508508

509509
return buf;
510510
}

rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU General Public License as
@@ -505,7 +505,7 @@ class Connection_manager
505505
mysqlx::XProtocol* active()
506506
{
507507
if (!active_connection)
508-
std::runtime_error("no active session");
508+
throw std::runtime_error("no active session");
509509
return active_connection.get();
510510
}
511511

0 commit comments

Comments
 (0)