Skip to content

Commit

Permalink
Bug#24353920 CLIENT LIBRARIES NOT BUILDABLE ON SOLARIS 11 WITH SUN ST…
Browse files Browse the repository at this point in the history
…UDIO USING LIBCSTD

src/control_events.cpp", line 345: Error: Could not find a match for
std::vector<unsigned char>::insert(unsigned char*, const char*, const char*)

client/check/mysqlcheck.cc", line 555: Error: Could not find a match
for std::vector<std::string>::vector(char**, char**)

Solution is based on patch for:
WL#8896: Enable use of C++11 in MySQL server
  • Loading branch information
Tor Didriksen committed Aug 3, 2016
1 parent b2bb554 commit 7e39d72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion client/check/mysqlcheck.cc
Expand Up @@ -543,6 +543,12 @@ int main(int argc, char **argv)
if (dbConnect(current_host, current_user, opt_password))
exit(EX_MYSQLERR);

// Sun Studio does not work with range constructor from char** to string.
vector<string> conv;
conv.reserve(argc);
for (int i= 0; i < argc; i++)
conv.push_back(argv[i]);

mysql_check(sock, what_to_do, opt_alldbs,
opt_check_only_changed, opt_extended,
opt_databases, opt_fast,
Expand All @@ -552,7 +558,7 @@ int main(int argc, char **argv)
opt_frm, opt_fix_table_names,
opt_fix_db_names, opt_upgrade,
opt_write_binlog, verbose,
opt_skip_database, vector<string>(argv, argv+argc),
opt_skip_database, conv,
DBerror);

dbDisconnect(current_host);
Expand Down
7 changes: 4 additions & 3 deletions libbinlogevents/src/control_events.cpp
@@ -1,4 +1,4 @@
/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
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
Expand Down Expand Up @@ -338,10 +338,11 @@ Format_description_event(const char* buf, unsigned int event_len,
number_of_event_types=
event_len - (LOG_EVENT_MINIMAL_HEADER_LEN + ST_COMMON_HEADER_LEN_OFFSET + 1);

const uint8_t *ubuf = reinterpret_cast<const uint8_t*>(buf);
post_header_len.resize(number_of_event_types);
post_header_len.insert(post_header_len.begin(),
buf + ST_COMMON_HEADER_LEN_OFFSET + 1,
(buf + ST_COMMON_HEADER_LEN_OFFSET + 1 +
ubuf + ST_COMMON_HEADER_LEN_OFFSET + 1,
(ubuf + ST_COMMON_HEADER_LEN_OFFSET + 1 +
number_of_event_types));

calc_server_version_split();
Expand Down

0 comments on commit 7e39d72

Please sign in to comment.