Commit cac472f5 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[4277] Fixed tagged_statements name collision

Wrapped declaration of tagged_statements[] in pgsql_host_data_source.cc
and mysql_host_data_source.cc in anonymous namespace.  They collide
otherwise.
parent c941012d
...@@ -1779,6 +1779,7 @@ public: ...@@ -1779,6 +1779,7 @@ public:
}; };
namespace {
/// @brief Prepared MySQL statements used by the backend to insert and /// @brief Prepared MySQL statements used by the backend to insert and
/// retrieve hosts from the database. /// retrieve hosts from the database.
TaggedStatement tagged_statements[] = { TaggedStatement tagged_statements[] = {
...@@ -1934,6 +1935,8 @@ TaggedStatement tagged_statements[] = { ...@@ -1934,6 +1935,8 @@ TaggedStatement tagged_statements[] = {
{MySqlHostDataSourceImpl::NUM_STATEMENTS, NULL} {MySqlHostDataSourceImpl::NUM_STATEMENTS, NULL}
}; };
}; // end anonymouse namespace
MySqlHostDataSourceImpl:: MySqlHostDataSourceImpl::
MySqlHostDataSourceImpl(const MySqlConnection::ParameterMap& parameters) MySqlHostDataSourceImpl(const MySqlConnection::ParameterMap& parameters)
: host_exchange_(new MySqlHostWithOptionsExchange(MySqlHostWithOptionsExchange::DHCP4_ONLY)), : host_exchange_(new MySqlHostWithOptionsExchange(MySqlHostWithOptionsExchange::DHCP4_ONLY)),
......
...@@ -1260,8 +1260,10 @@ public: ...@@ -1260,8 +1260,10 @@ public:
}; };
/// @brief Prepared MySQL statements used by the backend to insert and namespace {
/// retrieve hosts from the database.
/// @brief Prepared PosgreSQL statements used by the backend to insert and
/// retrieve reservation data from the database.
PgSqlTaggedStatement tagged_statements[] = { PgSqlTaggedStatement tagged_statements[] = {
// PgSqlHostDataSourceImpl::INSERT_HOST // PgSqlHostDataSourceImpl::INSERT_HOST
// Inserts a host into the 'hosts' table. Returns the inserted host id. // Inserts a host into the 'hosts' table. Returns the inserted host id.
...@@ -1447,6 +1449,8 @@ PgSqlTaggedStatement tagged_statements[] = { ...@@ -1447,6 +1449,8 @@ PgSqlTaggedStatement tagged_statements[] = {
{0, { 0 }, NULL, NULL} {0, { 0 }, NULL, NULL}
}; };
}; // end anonymous namespace
PgSqlHostDataSourceImpl:: PgSqlHostDataSourceImpl::
PgSqlHostDataSourceImpl(const PgSqlConnection::ParameterMap& parameters) PgSqlHostDataSourceImpl(const PgSqlConnection::ParameterMap& parameters)
: host_exchange_(new PgSqlHostWithOptionsExchange(PgSqlHostWithOptionsExchange::DHCP4_ONLY)), : host_exchange_(new PgSqlHostWithOptionsExchange(PgSqlHostWithOptionsExchange::DHCP4_ONLY)),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment