mirror of https://github.com/sysown/proxysql
Merge pull request #4069 from sysown/v2.x-4066-upgrade_deps
upgrade deps - part of #4066pull/4090/head
commit
9e40acf999
@ -0,0 +1 @@
|
||||
cityhash-1.1.1-5-gf5dc541
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
clickhouse-cpp-2.1.0
|
||||
clickhouse-cpp-2.3.0
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
curl-7.82.0
|
||||
curl-curl-7_87_0
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
libconfig-1.7.2
|
||||
libconfig-1.7.3
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
libev-4.24
|
||||
libev-4.33
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
libhttpserver-0.18.1
|
||||
libhttpserver-0.18.2
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,127 @@
|
||||
commit 28afed88f70420ee256e627d065d21a00d9d7977
|
||||
Author: Miro Stauder <miro@proxysql.com>
|
||||
Date: Mon Jan 9 12:05:26 2023 +0000
|
||||
|
||||
noexcept.patch
|
||||
|
||||
diff --git a/src/httpserver/basic_auth_fail_response.hpp b/src/httpserver/basic_auth_fail_response.hpp
|
||||
index a28fa3d..24bb132 100644
|
||||
--- a/src/httpserver/basic_auth_fail_response.hpp
|
||||
+++ b/src/httpserver/basic_auth_fail_response.hpp
|
||||
@@ -52,7 +52,7 @@ class basic_auth_fail_response : public string_response
|
||||
}
|
||||
|
||||
basic_auth_fail_response(const basic_auth_fail_response& other) = default;
|
||||
- basic_auth_fail_response(basic_auth_fail_response&& other) noexcept = default;
|
||||
+ basic_auth_fail_response(basic_auth_fail_response&& other) = default;
|
||||
basic_auth_fail_response& operator=(const basic_auth_fail_response& b) = default;
|
||||
basic_auth_fail_response& operator=(basic_auth_fail_response&& b) = default;
|
||||
|
||||
diff --git a/src/httpserver/create_webserver.hpp b/src/httpserver/create_webserver.hpp
|
||||
index 39cb3ec..f43c8f5 100644
|
||||
--- a/src/httpserver/create_webserver.hpp
|
||||
+++ b/src/httpserver/create_webserver.hpp
|
||||
@@ -48,7 +48,7 @@ class create_webserver
|
||||
public:
|
||||
create_webserver() = default;
|
||||
create_webserver(const create_webserver& b) = default;
|
||||
- create_webserver(create_webserver&& b) noexcept = default;
|
||||
+ create_webserver(create_webserver&& b) = default;
|
||||
create_webserver& operator=(const create_webserver& b) = default;
|
||||
create_webserver& operator=(create_webserver&& b) = default;
|
||||
|
||||
diff --git a/src/httpserver/deferred_response.hpp b/src/httpserver/deferred_response.hpp
|
||||
index 9e4601e..a8ba748 100644
|
||||
--- a/src/httpserver/deferred_response.hpp
|
||||
+++ b/src/httpserver/deferred_response.hpp
|
||||
@@ -61,7 +61,7 @@ class deferred_response : public string_response
|
||||
}
|
||||
|
||||
deferred_response(const deferred_response& other) = default;
|
||||
- deferred_response(deferred_response&& other) noexcept = default;
|
||||
+ deferred_response(deferred_response&& other) = default;
|
||||
deferred_response& operator=(const deferred_response& b) = default;
|
||||
deferred_response& operator=(deferred_response&& b) = default;
|
||||
|
||||
diff --git a/src/httpserver/digest_auth_fail_response.hpp b/src/httpserver/digest_auth_fail_response.hpp
|
||||
index 50abcee..18cf19c 100644
|
||||
--- a/src/httpserver/digest_auth_fail_response.hpp
|
||||
+++ b/src/httpserver/digest_auth_fail_response.hpp
|
||||
@@ -56,7 +56,7 @@ class digest_auth_fail_response : public string_response
|
||||
}
|
||||
|
||||
digest_auth_fail_response(const digest_auth_fail_response& other) = default;
|
||||
- digest_auth_fail_response(digest_auth_fail_response&& other) noexcept = default;
|
||||
+ digest_auth_fail_response(digest_auth_fail_response&& other) = default;
|
||||
digest_auth_fail_response& operator=(const digest_auth_fail_response& b) = default;
|
||||
digest_auth_fail_response& operator=(digest_auth_fail_response&& b) = default;
|
||||
|
||||
diff --git a/src/httpserver/file_response.hpp b/src/httpserver/file_response.hpp
|
||||
index 0c9386f..2e10f6c 100644
|
||||
--- a/src/httpserver/file_response.hpp
|
||||
+++ b/src/httpserver/file_response.hpp
|
||||
@@ -50,7 +50,7 @@ class file_response : public http_response
|
||||
}
|
||||
|
||||
file_response(const file_response& other) = default;
|
||||
- file_response(file_response&& other) noexcept = default;
|
||||
+ file_response(file_response&& other) = default;
|
||||
|
||||
file_response& operator=(const file_response& b) = default;
|
||||
file_response& operator=(file_response&& b) = default;
|
||||
diff --git a/src/httpserver/http_request.hpp b/src/httpserver/http_request.hpp
|
||||
index 6aacbfe..0b83fa2 100644
|
||||
--- a/src/httpserver/http_request.hpp
|
||||
+++ b/src/httpserver/http_request.hpp
|
||||
@@ -227,7 +227,7 @@ class http_request
|
||||
* @param b http_request b to copy attributes from.
|
||||
**/
|
||||
http_request(const http_request& b) = default;
|
||||
- http_request(http_request&& b) noexcept = default;
|
||||
+ http_request(http_request&& b) = default;
|
||||
|
||||
http_request& operator=(const http_request& b) = default;
|
||||
http_request& operator=(http_request&& b) = default;
|
||||
diff --git a/src/httpserver/http_resource.hpp b/src/httpserver/http_resource.hpp
|
||||
index 04f67cb..59829e8 100644
|
||||
--- a/src/httpserver/http_resource.hpp
|
||||
+++ b/src/httpserver/http_resource.hpp
|
||||
@@ -211,7 +211,7 @@ class http_resource
|
||||
* Copy constructor
|
||||
**/
|
||||
http_resource(const http_resource& b) = default;
|
||||
- http_resource(http_resource&& b) noexcept = default;
|
||||
+ http_resource(http_resource&& b) = default;
|
||||
http_resource& operator=(const http_resource& b) = default;
|
||||
http_resource& operator=(http_resource&& b) = default;
|
||||
|
||||
diff --git a/src/httpserver/http_response.hpp b/src/httpserver/http_response.hpp
|
||||
index 1f3f097..3564f37 100644
|
||||
--- a/src/httpserver/http_response.hpp
|
||||
+++ b/src/httpserver/http_response.hpp
|
||||
@@ -55,10 +55,10 @@ class http_response
|
||||
* @param b The http_response object to copy attributes value from.
|
||||
**/
|
||||
http_response(const http_response& b) = default;
|
||||
- http_response(http_response&& b) noexcept = default;
|
||||
+ http_response(http_response&& b) = default;
|
||||
|
||||
http_response& operator=(const http_response& b) = default;
|
||||
- http_response& operator=(http_response&& b) noexcept = default;
|
||||
+ http_response& operator=(http_response&& b) = default;
|
||||
|
||||
virtual ~http_response() = default;
|
||||
|
||||
diff --git a/src/httpserver/string_response.hpp b/src/httpserver/string_response.hpp
|
||||
index 43e7580..2043890 100644
|
||||
--- a/src/httpserver/string_response.hpp
|
||||
+++ b/src/httpserver/string_response.hpp
|
||||
@@ -51,7 +51,7 @@ class string_response : public http_response
|
||||
}
|
||||
|
||||
string_response(const string_response& other) = default;
|
||||
- string_response(string_response&& other) noexcept = default;
|
||||
+ string_response(string_response&& other) = default;
|
||||
|
||||
string_response& operator=(const string_response& b) = default;
|
||||
string_response& operator=(string_response&& b) = default;
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
lz4-1.7.5
|
||||
lz4-1.9.4
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
pcre-8.44
|
||||
pcre-8.45
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,70 @@
|
||||
diff --git a/core/include/prometheus/family.h b/core/include/prometheus/family.h
|
||||
index 4f62fda..09cfbb5 100644
|
||||
--- a/core/include/prometheus/family.h
|
||||
+++ b/core/include/prometheus/family.h
|
||||
@@ -110,7 +110,7 @@ class PROMETHEUS_CPP_CORE_EXPORT Family : public Collectable {
|
||||
/// \throw std::runtime_exception on invalid label names.
|
||||
template <typename... Args>
|
||||
T& Add(const Labels& labels, Args&&... args) {
|
||||
- return Add(labels, std::make_unique<T>(args...));
|
||||
+ return Add(labels, std::unique_ptr<T>(new T(args...)));
|
||||
}
|
||||
|
||||
/// \brief Remove the given dimensional data.
|
||||
diff --git a/core/src/registry.cc b/core/src/registry.cc
|
||||
index 7a365ed..60aa010 100644
|
||||
--- a/core/src/registry.cc
|
||||
+++ b/core/src/registry.cc
|
||||
@@ -147,7 +147,7 @@ Family<T>& Registry::Add(const std::string& name, const std::string& help,
|
||||
throw std::invalid_argument("Family name already exists");
|
||||
}
|
||||
|
||||
- auto family = std::make_unique<Family<T>>(name, help, labels);
|
||||
+ auto family = std::unique_ptr<Family<T>>(new Family<T>(name, help, labels));
|
||||
auto& ref = *family;
|
||||
families.push_back(std::move(family));
|
||||
return ref;
|
||||
diff --git a/pull/src/endpoint.cc b/pull/src/endpoint.cc
|
||||
index 5c44bee..b0a3e69 100644
|
||||
--- a/pull/src/endpoint.cc
|
||||
+++ b/pull/src/endpoint.cc
|
||||
@@ -21,7 +21,7 @@ Endpoint::Endpoint(CivetServer& server, std::string uri)
|
||||
: server_(server),
|
||||
uri_(std::move(uri)),
|
||||
endpoint_registry_(std::make_shared<Registry>()),
|
||||
- metrics_handler_(std::make_unique<MetricsHandler>(*endpoint_registry_)) {
|
||||
+ metrics_handler_(std::unique_ptr<MetricsHandler>(new MetricsHandler(*endpoint_registry_))) {
|
||||
RegisterCollectable(endpoint_registry_);
|
||||
server_.addHandler(uri_, metrics_handler_.get());
|
||||
}
|
||||
@@ -46,7 +46,7 @@ void Endpoint::RegisterAuth(
|
||||
// split creating, assigning, and storing to avoid a race-condition when
|
||||
// being called the second time and the handler is replaced
|
||||
auto new_handler =
|
||||
- std::make_unique<BasicAuthHandler>(std::move(authCB), realm);
|
||||
+ std::unique_ptr<BasicAuthHandler>(new BasicAuthHandler(std::move(authCB), realm));
|
||||
server_.addAuthHandler(uri_, new_handler.get());
|
||||
auth_handler_ = std::move(new_handler);
|
||||
}
|
||||
diff --git a/pull/src/exposer.cc b/pull/src/exposer.cc
|
||||
index 0d62bf3..1fce973 100644
|
||||
--- a/pull/src/exposer.cc
|
||||
+++ b/pull/src/exposer.cc
|
||||
@@ -21,7 +21,7 @@ Exposer::Exposer(const std::string& bind_address, const std::size_t num_threads,
|
||||
|
||||
Exposer::Exposer(std::vector<std::string> options,
|
||||
const CivetCallbacks* callbacks)
|
||||
- : server_(std::make_unique<CivetServer>(std::move(options), callbacks)) {}
|
||||
+ : server_(std::unique_ptr<CivetServer>(new CivetServer(std::move(options), callbacks))) {}
|
||||
|
||||
Exposer::~Exposer() = default;
|
||||
|
||||
@@ -60,7 +60,7 @@ detail::Endpoint& Exposer::GetEndpointForUri(const std::string& uri) {
|
||||
return *it->get();
|
||||
}
|
||||
|
||||
- endpoints_.emplace_back(std::make_unique<detail::Endpoint>(*server_, uri));
|
||||
+ endpoints_.emplace_back(std::unique_ptr<detail::Endpoint>(new detail::Endpoint(*server_, uri)));
|
||||
return *endpoints_.back().get();
|
||||
}
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
diff --git core/src/histogram.cc core/src/histogram.cc
|
||||
index 8023529..b298fd4 100644
|
||||
--- core/src/histogram.cc
|
||||
+++ core/src/histogram.cc
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
+#include <limits>
|
||||
#include <numeric>
|
||||
#include <ostream>
|
||||
|
||||
@ -1 +1 @@
|
||||
prometheus-cpp-0.9.0/
|
||||
prometheus-cpp-1.1.0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
re2-2020-07-06
|
||||
re2-2022-12-01
|
||||
Binary file not shown.
@ -1 +0,0 @@
|
||||
2020-07-06.tar.gz
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
sqlite-amalgamation-3190200
|
||||
sqlite-amalgamation-3400100
|
||||
@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import pymysql
|
||||
import time
|
||||
|
||||
def open_mysql_conn(host, port=3306, user=None, passwd=None, timeout=60):
|
||||
conn = None
|
||||
try:
|
||||
if user is None and passwd is None:
|
||||
conn = pymysql.connect( host=host, port=port, read_default_group='client',
|
||||
connect_timeout=timeout, cursorclass=pymysql.cursors.DictCursor,
|
||||
defer_connect=True)
|
||||
else:
|
||||
conn = pymysql.connect( host=host, port=port, user=user, passwd=passwd,
|
||||
connect_timeout=timeout, cursorclass=pymysql.cursors.DictCursor,
|
||||
defer_connect=True)
|
||||
conn.client_flag |= pymysql.constants.CLIENT.MULTI_STATEMENTS
|
||||
conn.connect()
|
||||
conn.autocommit(True)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
raise
|
||||
|
||||
return conn
|
||||
|
||||
def padmin_command(command, display=False):
|
||||
with padmin_conn.cursor() as cursor:
|
||||
cursor.execute(command)
|
||||
result = cursor.fetchall()
|
||||
if display:
|
||||
print(result)
|
||||
return result
|
||||
|
||||
def pmysql_command(command, display=False):
|
||||
with pmysql_conn.cursor() as cursor:
|
||||
cursor.execute(command)
|
||||
result = cursor.fetchall()
|
||||
if display:
|
||||
print(result)
|
||||
return result
|
||||
|
||||
admin_conn_args = { 'host':'127.0.0.1', 'port':6032, 'user':'admin', 'passwd':'admin' }
|
||||
mysql_conn_args = { 'host':'127.0.0.1', 'port':6033, 'user':'root', 'passwd':'root' }
|
||||
puser_conn_args = { 'host':'127.0.0.1', 'port':6033, 'user':'user', 'passwd':'user' }
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
padmin_conn = open_mysql_conn(**admin_conn_args)
|
||||
|
||||
# test edge cases
|
||||
assert padmin_command('SELECT from_unixtime();', display=True) == [{'from_unixtime()': None}]
|
||||
assert padmin_command('SELECT from_unixtime(0);', display=True) == [{'from_unixtime(0)': '1970-01-01 00:00:00'}]
|
||||
assert padmin_command('SELECT from_unixtime(-1);', display=True) == [{'from_unixtime(-1)': '1969-12-31 23:59:59'}]
|
||||
assert padmin_command('SELECT from_unixtime(2147483647);', display=True) == [{'from_unixtime(2147483647)': '2038-01-19 03:14:07'}]
|
||||
assert padmin_command('SELECT from_unixtime(2147483648);', display=True) == [{'from_unixtime(2147483648)': '2038-01-19 03:14:08'}]
|
||||
# test values from monitor.mysql_server_ping_log
|
||||
results = padmin_command('SELECT time_start_us/1000000, from_unixtime(time_start_us/1000000) FROM monitor.mysql_server_ping_log;', display=True)
|
||||
for res in results:
|
||||
assert time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(int(res['time_start_us/1000000']))) == res['from_unixtime(time_start_us/1000000)']
|
||||
|
||||
# PASS
|
||||
exit(0)
|
||||
Loading…
Reference in new issue