René Cannaò
8ea1f16cb7
deprecating session_vars[]
5 years ago
René Cannaò
da2bf094ee
Fixed some minor but important bugs on the new implementation on how session variables are handled
5 years ago
René Cannaò
241a5e54d7
Draft to reimplement how session variables are handled
5 years ago
Javier Jaramago Fernández
4ea7b750fd
Moved helper function 'proxy_mysql_stmt_close' from 'gen_utils' to 'MySQL_Protocol' #3525
5 years ago
René Cannaò
fd7b5f8f50
Implemented PROXYSQL RELOAD TLS
...
Command PROXYSQL RELOAD TLS is able to load new key/cert files and
create a new SSL context.
Loading of SSL can happens in two stages:
* during bootstrap: if it fails, proxysql dies
* running PROXYSQL RELOAD TLS: if it fails, proxysql will keep the old SSL context
This new method should successfully handle errors like missing or corrupted files.
We are also adding two buffers used to store the key/cert, to be used by the web interface.
5 years ago
René Cannaò
0ed4514fa4
Remove error when clients connect without certificate #3424
...
We currently disable this annoying error
In future we can configure this as per user level, specifying if the certificate is mandatory or not
See issue #3424
Original error was: X509 error: no required certificate sent by client
5 years ago
René Cannaò
e38562df40
Merge branch 'v2.x' into v2.x-PS-err3024
5 years ago
René Cannaò
fce7a0204c
Handle binary protocol resultset with ERR #3547
...
This commit add the support of ERR packet in binary protocol resultset,
for example due to MAX_EXECUTION_TIME while running a prepared statement.
It also changes how EOF packets are added: instead of writing the EOF in the
resultset buffer, the EOF packet is written in its own packet. This allows to
easily remove it if needed.
It also fix what seems (not sure) a bug in MariaDB client library, where if a
prepared statement is interrupted it cannot be executed again
5 years ago
Javier Jaramago Fernández
297bc8bae6
Refactored calls to 'mysql_stmt_close' into function holding preparation of 'MYSQL_STMT*' parameter #3525
5 years ago
Javier Jaramago Fernández
de2fd24e77
Fix leak closing 'query.stmt' in case of 'async_free_result' called for 'ASYNC_STMT_PREPARE_FAILED' state #3525
5 years ago
Christos Soulios
6030677258
Merge branch 'v2.x' into ldap-auth-changes
5 years ago
Christos Soulios
8136a6f4d0
Addressed reviewer comments
5 years ago
Javier Jaramago Fernández
a6c2246276
Replaced 'TEST_GROUPREP' impl to better match approach followed for 'READONLY'
5 years ago
Javier Jaramago Fernández
459a3f12c2
Added nullity checks for params for 'lag_action_set_server_status'
5 years ago
Javier Jaramago Fernández
38b44781e7
Replaced manual search for 'MyGHC' in favor of optimized 'MyHGC_find' #3539
5 years ago
René Cannaò
2d670897df
Merge pull request #3529 from sysown/v2.x-3502
...
Closes #3502 : ProxySQL crashed due to with assert for 'mybe' being null
5 years ago
Javier Jaramago Fernández
edc631ba6c
Added missing parameter 'lag_count' to 'proxy_warning' from 'lag_action_set_server_status'
5 years ago
Javier Jaramago Fernández
b929758a87
Several improvements to 'group_replication_lag_action'
...
1. Introduced new global variable: 'monitor_groupreplication_max_transaction_behind_for_read_only',
that modifies the behavior of 'group_replication_lag'.
2. Improved logic making use of 'MyHGC_find' instead of directly
searching 'MyHostGroups' structure.
3. Improved 'group_replication_lag' documentation with new
implementation updates.
4. Introduced changes to 'update_group_replication_set_writer'
preserving writters placed in 'OFFLINE_SOFT' state.
5 years ago
Javier Jaramago Fernández
0850c4d596
Improved the documentation for 'group_replication_lag_action'
5 years ago
Javier Jaramago Fernández
33aa80c265
Prevent servers that has been placed as 'OFFLINE_SOFT' of becoming writers
5 years ago
Javier Jaramago Fernández
53bf18b428
Changed setting readonly servers 'OFFLINE' due to replication lag behavior in favor of general server 'SHUNNING'
5 years ago
Javier Jaramago Fernández
1c319c021d
Fixed check for 'enable_load_data_local_infile' placement and added conditional extra verbosity to warning message #3500
5 years ago
Javier Jaramago Fernández
48a32aa5fe
Added check preventing a session with 'PINGING_SERVER' status to start a 'RESETTING_CONNECTION' session #3502
5 years ago
Christos Soulios
9d19c70e8c
Merge branch 'v2.x' into ldap-auth-changes
5 years ago
Javier Jaramago Fernández
1f4f86d5ce
Added mysql variable to enable unsupported query 'LOAD DATA LOCAL INFILE' issuing warning message #3500
5 years ago
René Cannaò
bd703d4ea8
Merge pull request #3523 from sysown/v2.x-3518
...
Address update checker security issue(s) reported in #3518
5 years ago
René Cannaò
5ede60ec9f
Merge pull request #3499 from sysown/v2.x-codecov1
...
[WIP] code cleanup and improved code coverage
5 years ago
René Cannaò
dbf194075e
Merge pull request #3486 from sysown/v2.x-gcov-admin
...
[WIP] Adding support for PROXYSQL GCOV DUMP|RESET
5 years ago
René Cannaò
7a664ac8c1
Disable CURLOPT_SSL_VERIFYPEER=0 #3518
5 years ago
Christos Soulios
21803220e1
Merge branch 'v2.x' into ldap-auth-changes
5 years ago
René Cannaò
77a6b69507
Fix compile issue for __gcov_dump and __gcov_reset
5 years ago
René Cannaò
b8c027ee0a
Improve query to REPLICA_HOST_STATUS related to Aurora
...
This commits solves 2 issues:
1. ignore decommissioned or renamed nodes, see #3484
2. during a failover, the former writer (still reporting MASTER_SESSION_ID) is not considered a writer if it is not the last updated
5 years ago
René Cannaò
de698cb156
Improving query to REPLICA_HOST_STATUS related to Aurora
...
The new query now handles also replicas where REPLICA_LAG_IN_MILLISECONDS == 0 .
This commit also add comments to track the changes in this query.
5 years ago
René Cannaò
590c5cb75c
Removed unused function monitor_AWS_Aurora_thread()
5 years ago
Egezon Berisha
8c62273687
Change the pt-heartbeat query from MIN to MAX due to a possible daisy-chain replication or multi-master setup
5 years ago
René Cannaò
f0f8ed9417
Merge pull request #3513 from sysown/v2.x-idle-threads_improvement1
...
Reducing the number of calls to idle_thread_to_kill_idle_sessions
5 years ago
René Cannaò
09d42b5968
Fixed minor uninitialised value in MySQL_Monitor_State_Data()
...
Detected via valgrind
5 years ago
René Cannaò
47b0a91728
Merge pull request #3438 from bskllzh/v2.2.0
...
Closes #3431 : Fix crashes due to mmsd is null when add an invalid host name to the mysql_servers table
5 years ago
René Cannaò
4c1ad6aa2b
Merge pull request #3507 from bskllzh/v2.x
...
Closes #3492 : Fix the incorrect value range of the parameter mysql-default_query_timeout
5 years ago
René Cannaò
9f0aa866c3
Reducing the number of calls to idle_thread_to_kill_idle_sessions
...
This commit can potentially provide some performance improvements with large number of idle connections
5 years ago
René Cannaò
a1c232039f
Reduce length of mysql_bug_102266 #3501
...
In #3285 we increased the amount of data sent to the backend during connection
time using MYSQL_OPT_CONNECT_ATTR_ADD , in order to avoid MySQL bug 102266 .
See #3276 .
Although this create a lot of noise in ProxySQL error log and MySQL error log,
because the connection attributes are too long and they get truncated.
This PR reduces the length of connection attributes
5 years ago
René Cannaò
e41d498b2b
Initialize enabled_mutex in SQLite3_result
...
Variable was not set in various constructors.
Detected using valgrind.
5 years ago
René Cannaò
45f6ad8f65
Adding test for SHOW TABLE STATUS in Admin #3511
5 years ago
René Cannaò
41d15f6a87
Adding test for SHOW FIELDS FROM in Admin #3511
5 years ago
peter
cf797893a3
Fix mysql-default_query_timeout parameter
...
fix mysql-default_query_timeout parameter in MySQL_Thread.cpp, according to https://proxysql.com/documentation/global-variables/mysql-variables/#mysql-default_query_timeout
5 years ago
Christos Soulios
4359b1f72f
Count connections for frontend user, not backend
5 years ago
Christos Soulios
7df71035ff
Converted strncmp to strcmp
5 years ago
Javier Jaramago Fernández
5e0dc81e5e
Added support for 'Auth Switch Request' for 'COM_CHANGE_USER' #3504
5 years ago
René Cannaò
1ee232bf85
Removed dead code from MySQL_Session
5 years ago
René Cannaò
beddc41b1f
Cleanup of dead code in MySQL_Protocol
5 years ago
René Cannaò
9f9734df0e
Merge pull request #3474 from sysown/v2.x-stats
...
[WIP] Some code cleanup in Admin
5 years ago
René Cannaò
2ce9ed9686
Disabled in MySQL_Connection code related to store results
5 years ago
René Cannaò
257949f623
Removing MySQL_HostGroups_Manager::server_add()
...
This function was deprecated in 2016
5 years ago
René Cannaò
81ed72f3fe
Removed dead functions from MySQL_Data_Stream()
...
Functions removed years ago (around 2015):
* clean_net_failure()
* myds_connect()
5 years ago
René Cannaò
e33ada0a5e
Commented unused code
5 years ago
René Cannaò
3406bb6e23
Removing commented code
5 years ago
René Cannaò
81e0bf7edb
Merge pull request #3467 from sysown/v2.x-misc1
...
V2.x misc1
5 years ago
René Cannaò
117355eb59
Merge pull request #3480 from sysown/v2.x-3479
...
Closes #3479 : Add support for 'grave accent' (`) for SET statements parsing
5 years ago
René Cannaò
9c8e17f916
Merge pull request #3466 from sysown/v2.x-user_default_isolation_level
...
Per-user default transaction isolation level
5 years ago
René Cannaò
805301107f
Merge pull request #3488 from sysown/v2.x-3487
...
Closes #3487 : Add client information for multi-statements parsing error message
5 years ago
Javier Jaramago Fernández
0dde4adb21
Added support for comments in 'USE' statements #3493
5 years ago
Javier Jaramago Fernández
29697db578
Added client information to error generated when multi-statement command fails to be parsed #3487
5 years ago
René Cannaò
2c159d1d9a
Adding support for PROXYSQL GCOV DUMP|RESET
...
Adding two new Admin commands:
PROXYSQL GCOV DUMP
PROXYSQL GCOV RESET
These will call __gcov_dump() and __gcov_reset()
5 years ago
Javier Jaramago Fernández
1f47834306
Added conditional 'grave accents' outside capturing group to 'VAR_P1' regex matching variable name #3479
5 years ago
Javier Jaramago Fernández
9f0caaaab0
Added conditional 'grave accents' matching to regex matching 'SET statements' for tracked variables #3479
5 years ago
Javier Jaramago Fernández
fdcf5fa94b
Fixed capture group closing parenthesis for regex matching 'SET statements' for tracked variables #3479
5 years ago
Christos Soulios
524d23947d
Minor cleanup
5 years ago
René Cannaò
dc42fbca0b
Some code cleanup in Admin
5 years ago
Christos Soulios
df19d16f14
Passed attributes as param to LDAP auth
...
Removed ldap_ctx as ldap context is managed in the plugin itself
5 years ago
René Cannaò
6c7503f85f
Improve debugging when unable to reach hostgroup
...
When we generate an error "Max connect timeout reached while reaching hostgroup" for the client, now the error log is more verbose.
5 years ago
René Cannaò
b8b840fe30
More verbosity when proxysql detects a broken connection
...
Added function MySQL_Session::detected_broken_connection() that unifies the way broken connections are logged.
It also logs username, and last time used.
Added also a new macro proxy_error_inline()
5 years ago
René Cannaò
52f1d0f1ec
Per-user default transaction isolation level
...
See issue #3465
If a user (configurable) connects to proxysql without specifying a session transaction isolation level, proxysql will automatically assigns one to that user connection. Of course, said user can override such default session transaction isolation level running `SET SESSION TRANSACTION ISOLATION LEVEL` on a per-connection basis.
This feature can be configured extending `mysql_users.attributes` , adding an object named `default-transaction_isolation` .
An example of configuration could be:
```
UPDATE mysql_users SET attributes='{"default-transaction_isolation":"READ COMMITTED"}' WHERE username='sbtest';
```
This feature also requires input validation making sure that only valid isolation levels are used.
Furthermore, both dash and space can be used.
If the isolation level specified is not valid, it should be automatically removed from runtime.
5 years ago
René Cannaò
e14accd78b
Merge pull request #3453 from sysown/v2.2.0-3427
...
Closes #3427 : Read/Write Split query rules do not work while using sysbench to evaluate perfromance
5 years ago
Javier Jaramago Fernández
3a394834e1
Added null check for 'stmt_info->first_comment' before accessing it during 'PROCESSING_STMT_EXECUTE' #3427
5 years ago
Javier Jaramago Fernández
adb5ed6b28
"Fixed invalid reads due to memory from 'first_comment' being freed from global 'stmt_info' #3427"
...
'CurrentQuery.QueryParserArgs.first_comment' needs to hold it's own copy
of 'first_comment', otherwise, the 'first_comment' from global 'stmt_info'
will be freed by 'Query_Info::end' at the end of the life of 'CurrentQuery'.
5 years ago
Javier Jaramago Fernández
9e70e3918b
Reversed adding 'first_comment' to 'compute_hash' #3427
...
Information from 'first_comment' is redundant since the comment itself
is already contained in 'query' when reaching 'compute_hash'.
5 years ago
Javier Jaramago Fernández
18de7a0837
Added default initialization for 'Query_Info' fields 'start_time' and 'end_time' #3458
5 years ago
Javier Jaramago Fernández
028623c06c
Added 'first_comment' to 'MySQL_STMT_Global_info' to allow processing it during 'STMT_EXECUTE' #3427
5 years ago
Javier Jaramago Fernández
c1b705bf2b
Merge remote-tracking branch 'origin/v2.2.0' into v2.2.0-3317
5 years ago
René Cannaò
a2c82bd95a
Merge pull request #3445 from sysown/v2.2.0-opt2
...
Code cleanup for MySQL variables
5 years ago
René Cannaò
d3c243d898
Merge pull request #3420 from sysown/v2.2.0-3419
...
Closes #3419 : Add cluster synchronization support for global 'ldap-%' variables and 'mysql_ldap_mapping' provided by 'ldap_auth_plugin'
5 years ago
René Cannaò
b446dc0718
Changing query_cache_size_MB to lowercase
5 years ago
René Cannaò
1baca1ed48
Merge pull request #3443 from sysown/v2.2.0-3442
...
Closes #3442 : Temporarily add session_track_schema to ignore_vars until proper support is added
5 years ago
Javier Jaramago Fernández
65e8caf9b6
Fixed memory corruption due to invalid free of 'qi->stmt_info->query' #3427
5 years ago
Javier Jaramago Fernández
a5208f62b7
Fixed parameters for 'process_mysql_query' call during 'STMT_EXECUTE' #3427
5 years ago
René Cannaò
d521468cf4
Fix typo in handler_special_queries
5 years ago
René Cannaò
dc10bee4d5
Adding some comments and a quick exit on handler_special_queries for locked_on_hostgroup
5 years ago
Javier Jaramago Fernández
cba171c07d
Introduced delayed parsing failure for SET statements
...
All variables that are not known by ProxySQL should fail to be parsed.
A best effor should also be done for tracking all the variables present
in a 'SET' statement prior to returning the parsing failure.
5 years ago
Javier Jaramago Fernández
f2668c455c
Added new checks in 'handler_special_queries' for 'locked_on_hostgroup' for several simple statements
5 years ago
Javier Jaramago Fernández
3a122aaf3c
Added new case to 'SETTING_GENERIC_VARIABLE' quote surrounding for queries starting with '('
5 years ago
Javier Jaramago Fernández
a0020a43f2
Improved 'VAR_VALUE_P1' regex for 'SetParser::parse1' fixing several issues
...
1. Introduced extra paranethesis at the beggining and end of the regex for
maching queries surrounded by them like: `( SELECT ... )`.
2. Added explicit SELECT at the beggining to mach queries starting with
`SELECT`.
2. Introduced a new 'OR' in the first part of the regex: `|(?:NULL)` in
order to avoid collapsing NULL values followed by commas without spaces.
3. Improved final section of the regex `(?:)` that was previously
macthing with multiple empty groups, inducing a complete collapse of
the initial query into an empty value in case of not matching the initial
capturing group. With the new one, in case of emtpy value the external
parenthesis are matched, for being remove later from the value.
5 years ago
René Cannaò
0643642087
Removing unused variables
5 years ago
René Cannaò
49c3b5476b
More code cleanup for MySQL variables
5 years ago
René Cannaò
9e3d939ed3
More code cleanup for MySQL variables
5 years ago
Javier Jaramago Fernández
0e377c2622
Fixed typo specifying to load 'MYSQL VARIABLES' instead of correct 'LDAP VARIABLES' to runtime #3419
5 years ago
Javier Jaramago Fernández
519105bb32
Fixed retrieving 'mysql_ldap_mapping' from peer 'runtime' instead of 'memory' #3419
5 years ago
René Cannaò
eb8dc23dad
Code cleanup for MySQL variables
5 years ago
René Cannaò
57fd24c2d6
Several code cleanup in MySQL_Thread
5 years ago
René Cannaò
8c05d8907c
Merge pull request #3422 from sysown/v2.2.0-3376
...
Closes #3376 : Invalid timestamps reported for 'first_seen' and 'last_seen' fields from 'stats_mysql_errors'
5 years ago
Javier Jaramago Fernández
4027d8cd0e
Temporarily added 'session_track_schema' to the list of ignored variables #3442
5 years ago
Javier Jaramago Fernández
f403402755
Added call to 'connect_cont' on timed out connections preventing 'fd' leak in connection destruction #3404
5 years ago
peter
414d59070c
Check if mmsd is not NULL
...
Check if mmsd is not NULL
5 years ago
peter
380a245867
Delay free mmsd
...
Delay free mmsd before create a new mmsd.
5 years ago
Javier Jaramago Fernández
05c825520e
Merge pull request #3426 from winmutt/v2.2.0
...
Fix floating point exception.
5 years ago
Rolf Martin-Hoster
8b4c7ae881
Fix floating point exception.
5 years ago
peter
11f46609e1
Fix two print debug logs in commit func
...
Fix two print debug logs in MySQL_HostGroups_Manager::commit func.
5 years ago
Javier Jaramago Fernández
85c2187884
Closes #3376 : Removed unnecessary operations to compute 'first_seen' and 'last_seen' timestamps for 'stats_mysql_errors'
5 years ago
Javier Jaramago Fernández
f1b3687f5d
Fixed typo using 'cluster_mysql_query_rules_save_to_disk' instead of 'cluster_mysql_users_save_to_disk' in 'pull_mysql_users_from_peer'
5 years ago
Javier Jaramago Fernández
04d3947212
Implemented sync support for 'mysql_ldap_mapping' table
5 years ago
Javier Jaramago Fernández
ba1762bc3e
Implemented sync support for 'ldap-%' global variables
5 years ago
Javier Jaramago Fernández
41c5a82aae
Closes #3406 : Verify fetched rows in 'monitor_group_replication_thread' are not NULL before accessing them
5 years ago
René Cannaò
86c95dbb18
Cluster node exports admin-mysql_ifaces
...
When a cluster node (client) connects to another cluster node, it
advertises its UUID but also exports its `admin-mysql_ifaces` .
The receiving cluster can use this information to try to guess how
to connect to the node that initialized the connection, for example
to collect metrics.
This is visible in table `stats_proxysql_servers_clients_status` .
5 years ago
René Cannaò
4f3c133cd0
Implemented variable cluster_sync_interfaces
5 years ago
René Cannaò
7cc750a111
Merge branch 'v2.1.1' into v2.1.2-cluster
5 years ago
René Cannaò
1c2b7e4105
Merge pull request #3392 from sysown/v2.1.1-3342
...
Closes #3342 : ProxySQL reset connection if it starts with COM_QUIT
5 years ago
Javier Jaramago Fernández
938306f5d7
Closes #3182 : 'update_galera_set_offline' soft now also sets readers as SHUNNED
5 years ago
Javier Jaramago Fernández
83acc66df0
Closes #3342 : Enforce sending the 'initial handshake packet' as soon as it's generated
5 years ago
René Cannaò
618a77d550
Merge pull request #3387 from sysown/v2.1.1-833
...
Closes #833 : Return ERR when receiving 'LOAD DATA LOCAL INFILE'
5 years ago
Javier Jaramago Fernández
bcb5589506
Fixed typo in comment
5 years ago
Javier Jaramago Fernández
4e58e36860
Closes #833 : Return ERR when receiving 'LOAD DATA LOCAL INFILE' to let client know operation is unsupported
5 years ago
René Cannaò
76deab2fad
Add lock on hostgroup for any not parsed variable
5 years ago
René Cannaò
111c737d80
SetParser also parses user defined variables
5 years ago
René Cannaò
f0e3a87159
Introduce ignore_vars in MySQL_Variables
...
This vector lists all the variables that proxysql will parse but ignore
5 years ago
René Cannaò
cc424b71ac
Parse "SET wait_timeout" #3184
5 years ago
René Cannaò
d53578f269
Merge pull request #3353 from sysown/v2.1.1-deprecate_forward_autocommit
...
Deprecate mysql-forward_autocommit #3253
5 years ago
René Cannaò
b8ab99ba52
Merge pull request #3368 from sysown/v2.1.1-2543
...
Closes #2543 : Admin and C# driver
5 years ago
Javier Jaramago Fernández
5d0fd05534
Fixed improperly handled case for 'format_timezone_hours' when hours parameter to be formatted is '0'
5 years ago
René Cannaò
428f2e7e4f
Merge pull request #3358 from sysown/v2.1.1-3357
...
Closes #3357 : Port 'v1.4.14-show-warnings' branch into v2.1.1 and add new mysql-variable to control it
5 years ago
Javier Jaramago Fernández
99e0e23646
Closes #2543 : Added support for two new queries for Admin required for C# connector
...
Added support for queries:
- "SELECT @@max_allowed_packet, @@character_set_client, @@character_set_connection, @@license, @@sql_mode, @@lower_case_table_names"
- "SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP())"
5 years ago
René Cannaò
206698d179
Avoid crash in MySQL_Result_to_MySQL_wire without myds #3363
5 years ago
René Cannaò
ca3499054e
Merge pull request #3352 from sysown/v2.1.1-3350
...
Closes #3350 : Memory leak reported by Valgrind in ''MySQL_Protocol::get_binds_from_pkt"
5 years ago
René Cannaò
26790c3679
Merge pull request #3349 from sysown/v2.1.1-MonRo
...
Optimizations for instances with a lot of hostgroups
5 years ago
René Cannaò
3266cfc506
Merge pull request #3343 from sysown/v2.1.1-spiffe
...
V2.1.1 spiffe
5 years ago
Javier Jaramago Fernández
228fe0640f
Closes #3357 : Ported 'v1.4.14-show-warnings' and added new mysql-variable to control it
5 years ago
René Cannaò
a0fb4821cc
Deprecate mysql-forward_autocommit #3253
5 years ago
Javier Jaramago Fernández
60bb5a65ae
Closes #3350 : Free memory when allocated for specific 'stmt_execute_metadata_t' bind buffers types
5 years ago
René Cannaò
5af9885e90
Do not exit read_only_action() if no server is found
5 years ago
René Cannaò
f7754a5e00
HostGroups lookup using unordered_map
...
HostGroups are stored in an array of pointers.
This commit allows the lookup using an unordered_map if the number of
Hostgroups is greater than 100.
For less number of hostgroups, a sequential scan seems more efficient.
This also introduce a test for micro benchmark.
5 years ago
René Cannaò
532a0397f7
Faster MySQL_HostGroups_Manager::read_only_action
...
This commit rewrites MySQL_HostGroups_Manager::read_only_action() in way to
reduce the calls to SQLite. It relies on two new std::set() :
- read_only_set1: if the server is already in a writer hostgroup
- read_only_set2: a cache to track the first time that a server has RO=0
Added also an index on MySQL_HostGroups_Manager,
ON mysql_servers (hostname,port)
5 years ago
René Cannaò
d258361258
Merge pull request #3348 from sysown/v2.1.1-3339
...
Fixing an inifinite loop in case of multi-statements and closed backend connection
5 years ago
René Cannaò
11ee38d12a
Merge pull request #3345 from sysown/v2.1.1-1614
...
Closes #1614 : Added extra logging suggesting solution when 'bind()' fails due to 'EADDRNOTAVAIL'
5 years ago
René Cannaò
ac4fc21972
Merge pull request #3341 from sysown/v2.1.1-3340
...
Closes #3340 : Server shunned due to replication lag re-enabled due to replication check timing out
5 years ago
René Cannaò
c5d018d740
Merge pull request #3344 from sysown/v2.1.1-3247
...
Closes #3247 : Make mycli able to connect to Admin interface
5 years ago
René Cannaò
bd5d882770
Fixing an inifinite loop in case of multi-statements and closed backend connection
...
If a backend connection was terminated in the middle of the execution of multiple
statements in a multi-statements command, the worker thread was entering an infinite loop.
Furthermore, this commit disables query retry in case of multi-statements if the first one
completed successfully
This fixes #3339
This commit is the port to 2.1 of 90a4922ed8
5 years ago
Javier Jaramago Fernández
089c5e656f
Replaced trivial 'connection_id()' implementation in favor of a simpler and safer 'query rewrite' one
5 years ago
Javier Jaramago Fernández
668e4a1dfb
Closes #1614 : Added extra logging suggesting solution when 'bind()' fails due to 'EADDRNOTAVAIL'
5 years ago
Javier Jaramago Fernández
dfc51c3352
Closes #3247 : Added support for command 'SELECT CONNECTION_ID()' in order to support 'mycli' client
5 years ago
René Cannaò
68e95bee61
Immediately exit in case of SSL error
...
This commmit also enhance logging
5 years ago
René Cannaò
2b8500aa36
Do not allow CHANGE_USER with spiffe
...
If a client connection uses spiffe, CHANGE_USER is not allowed
5 years ago
René Cannaò
7c0bde5f99
Working prototype for SPIFFE
5 years ago
Javier Jaramago Fernández
3111e8b603
Closes #3340 : Added new 'repl_lag' error code '-3' in case 'replication_lag_check' timeout
5 years ago
René Cannaò
461518a528
Merge pull request #3337 from sysown/v2.1.1-3223
...
Closes #3223 : Return proper errors codes on RESTAPI for script failures
5 years ago
René Cannaò
306fc0e2bb
Merge pull request #3330 from sysown/v2.1.1-3248
...
Closes #3248 : Create metric to track number of times multiplexing is disabled due to `mysql-auto_increment_delay_multiplex`
5 years ago
Javier Jaramago Fernández
de9dfa93b5
Added comments on current concurrency model from libhttpserver used by ProxySQL and added note for possible benchmarking
5 years ago
Javier Jaramago Fernández
a4324f4944
Closes #3223 : Major rework on 'RESTAPI' script execution
...
- Fixed return of proper http error codes on script failure or
internal failure to perform script execution. Introduced error
codes:
- 424: Script execution failed, either due to script failing to
be executed, exiting with non-zero error code or output
not being a valid JSON.
- 500: Internal error while trying to execute script.
- 200: Script was able to be executed properly, and result
was properly parsed.
- Fixed dangling process left by 'return' in child process
resulted from 'fork()' call.
- Fixed limitation of maximum return size of 48kb from executed
script.
- Improved usage of 'read()' by using NONBLOCKING pipes.
- Fixed leaving child process alive after timeout expiration, now
process is properly terminated.
- Improved general logging and returned JSONs in case of errors.
5 years ago
Javier Jaramago Fernández
3fd234477a
Used added functionality to 'prometheus-cpp' to reset prometheus counters for 'PROXYSQL STOP' and 'PROXYSQL RESTART' commands
5 years ago
René Cannaò
05fbe44ed2
Prototype for SPIFFE - do not merge
5 years ago
Javier Jaramago Fernández
d0a1866cf9
Fixed 'process_rows_in_ASYNC_STMT_EXECUTE_STORE_RESULT_CONT' not properly updating 'length' from copied last row after data copy
5 years ago
Javier Jaramago Fernández
abca810fbe
Fixed 'process_rows_in_ASYNC_STMT_EXECUTE_STORE_RESULT_CONT' missing last row from MySQL_STMT::result
5 years ago
Javier Jaramago Fernández
6e997a7297
Fixed 'invalid reads' reported by valgrind due to access to already freed string returned by 'serial_exposer'
5 years ago
Javier Jaramago Fernández
ddf7ad95b7
Added default initialization for 'auto_increment_delay_multiplex' metric
5 years ago
René Cannaò
5455b7d228
Merge pull request #3328 from sysown/v2.1.1-3327
...
Closes #3327 : Call 'ProcessQueryAndSetStatusFlags' check even if query failed
5 years ago
Javier Jaramago Fernández
75af796049
Merge remote-tracking branch 'origin/v2.1.1' into v2.1.1-3248
5 years ago
Javier Jaramago Fernández
32c686487b
Merge remote-tracking branch 'origin/v2.1.1' into v2.1.1-3324
5 years ago
René Cannaò
b233819514
Merge pull request #3309 from sysown/v2.1.1-1574
...
Closes #1574 : Packets out of order. expected 1 received 27.
5 years ago
Javier Jaramago Fernández
d507880cbb
Added new metric 'proxysql_myhgm_auto_increment_multiplex_total' tracking the number of times that 'auto_increment_delay_multiplex' is triggered
5 years ago
René Cannaò
1dd24cc99f
Merge pull request #3311 from sysown/v2.1.1-3310
...
Closes #3310 : Improve error reporting for 'MySQL_Monitor' and 'MySQL_Session' backend connections via counters
5 years ago
Javier Jaramago Fernández
c0547d0cec
Closes #3327 : Moved call to 'ProcessQueryAndSetStatusFlags' to 'MySQL_Session::RequestEnd'
5 years ago
Javier Jaramago Fernández
4b81e21d57
Added comments, simplified 'stmt->result.data' assignment and minor cleanup for 'process_rows_in_ASYNC_STMT_EXECUTE_STORE_RESULT_CONT'
5 years ago
Javier Jaramago Fernández
7718cc9395
Fixed iteration boundaries for 'stmt->result' rows reading in 'ASYNC_STMT_EXECUTE_STORE_RESULT_CONT'
5 years ago
Javier Jaramago Fernández
65870492be
Removed hardcoded values for error codes in counters in 'monitor_connect_thread' and no longer required include
5 years ago
Javier Jaramago Fernández
7c1c829565
Compressed multiple 'p_update_mysql_error_counter' with ternary operator and replaced zero error codes with ER_PROXYSQL_OFFLINE_SRV
5 years ago
Nick Vyzas
ab3b0494fe
Change git_version parsing to standardize across OS versions
5 years ago
Javier Jaramago Fernández
9713abd3a0
Improved naming on new 'PROXYSQL_ERR' enums and explicit values
5 years ago
Javier Jaramago Fernández
9bffef4156
Added missed default initialization of flag 'registered_prometheus_collectable'
5 years ago
Javier Jaramago Fernández
851339b5f3
Closes #3310 : Improve error reporting for 'MySQL_Monitor' and 'MySQL_Session' backend connections via counters
5 years ago
Javier Jaramago Fernández
5d0a9a2087
Updated 'stats_mysql_prepared_statements_info' table definition to hold 'num_columns' and 'num_params' info for prepared statements
5 years ago
Javier Jaramago Fernández
ac0b018a4d
Update prepared statements metadata during 'PROCESSING_STMT_EXECUTE'
5 years ago
Javier Jaramago Fernández
c69685d83d
Fix 3273: 'POLLHUP' should always be check in 'read_from_net' to verify socket is still open
5 years ago
René Cannaò
d5a55891fe
Merge pull request #3299 from sysown/v2.1.1-3298
...
Closes #3298 : Prevent unnecessary logging and port check during admin variables flushing
5 years ago
René Cannaò
259d07c9ab
Merge pull request #3295 from sysown/v2.1.0-ps_buffer
...
V2.1.0 ps buffer
5 years ago
Javier Jaramago Fernández
e2432bb661
Closes #3298 : Fixed unnecessary port check and logging while flushing admin variables to runtime
5 years ago
Javier Jaramago Fernández
e61b82a439
Removed duplicated call to 'conn_unregister' in 'monitor_group_replication_thread' performed outside proper check
5 years ago
Javier Jaramago Fernández
8141642bfc
Merge branch 'v2.1.1' into v2.1.1-3280
5 years ago
René Cannaò
fca4055b50
Merge branch 'v2.1.1' into v2.1.0-ps_buffer
5 years ago
René Cannaò
a592402902
Implementation of table stats_proxysql_servers_clients_status and PROXYSQL CLUSTER_NODE_UUID command
5 years ago
René Cannaò
69fb384deb
Replacing struct proxy_node_address_t with class ProxySQL_Node_Address
5 years ago
René Cannaò
36cc360942
Create UUID
...
ProxySQL will now automatically generate a UUID during start up.
The UUID can be either passed through the command line using -U or --uuid,
or saved on disk in a new table named global_settings.
The new table is used to distinguish it from global_variables that is replicated.
Table global_settings isn't replicated by Cluster.
If UUID is not present, it is automatically generated and saved.
5 years ago
René Cannaò
16aad8e593
Merge pull request #3286 from sysown/v2.1.1-3276
...
Ports to 2.1.1 of various PRs from 2.0.16 and 2.0.17
5 years ago
Javier Jaramago Fernández
57726c16fd
Closes #3288 : Added extra logging to 'monitor_replication_lag_thread' to reflect when 'Seconds_Behind_Master' is NULL
5 years ago
Javier Jaramago Fernández
fc2b53845f
Fixes #3265 : 'update_group_replication_set_writer' now checks found 'writer' status
5 years ago
Javier Jaramago Fernández
fd5c21156c
Fixed memory leak in 'Query_Processor::new_query_rule' due to field 'match_digest' never being freed
5 years ago
Javier Jaramago Fernández
23843ed6ee
Fixed invalid writes/reads in 'update_group_replication_set_writer' due to query not fitting allocated buffer
5 years ago
René Cannaò
2b23bd3102
Avoid MySQL bug 102266 #3276
...
ProxySQL is sending a lot of data to MySQL server using CLIENT_CONNECT_ATTRS in order to not hit MySQL bug https://bugs.mysql.com/bug.php?id=102266 . See also https://github.com/sysown/proxysql/issues/3276
5 years ago
René Cannaò
e0bdb24ddf
Added support for charset during COM_CHANGE_USER
...
When processing COM_CHANGE_USER from a client, we did not parse the charset/collation.
This commit parses and processes also charset in COM_CHANGE_USER
5 years ago
Javier Jaramago Fernández
d23005db83
Added more detailed documentation to 'MySQL_Variables::client_set_value'
5 years ago
René Cannaò
598331cff9
When calling mysql_change_user set collation to default for the given charset if collation ID is greater or equal than 255 (utf8mb4_0900_ai_ci)
...
We call mysql_options with MYSQL_SET_CHARSET_NAME if collation ID >= 255 .
This to solve the problem of MySQL server returning an Access denied if the backend doesn't support a collation during mysql_change_user
5 years ago
René Cannaò
f3dba4dcae
Do ot use charset_name if not available in SQL3_Free_Connections()
...
This fix a crashing bug
5 years ago
René Cannaò
2519551cb4
Do not search charset in mysql_real_connect if already set
...
In mysql_init() charset is set to NULL .
In mysql_read_connect() charset is not changed if already set
This allows proxysql to change it outside the library
5 years ago
Javier Jaramago Fernández
1ee832affd
Closes #3280 : Add support to control 'CLIENT_DEPRECATE_EOF' in client and backend connections through global variables
5 years ago
René Cannaò
420913f0a1
Revert PR 3237 on TEST_AURORA
5 years ago
René Cannaò
af9d324f05
Merge pull request #3246 from sysown/v2.1.0-field
...
Implemented MySQL_Protocol::generate_pkt_field2()
5 years ago
René Cannaò
dacea25866
Implemented MySQL_Protocol::generate_pkt_field2()
...
`generate_pkt_field2` is a less generic version of `generate_pkt_field`
and it is meant to be used only for queries executed on backend.
The function takes a `MYSQL_FIELD` as one of its arguments, thus a lot of
lengths do not need to be computed
5 years ago
Javier Jaramago Fernández
17a4b4a701
Merge pull request #3239 from sysown/v2.1.0-3238
...
Closes #3238 : Improve error handling when port is already in use when instantiating 'ProxySQL_RestAPI_Server'
5 years ago
Javier Jaramago Fernández
6b873cbfd8
Changed several metrics name for being fully being fully complaint with 'promtool' checker
5 years ago
Javier Jaramago Fernández
5dbddb3cc4
Check for specified 'restapi_port' availability before instantiating 'ProxySQL_RESTAPI_Server'
5 years ago
René Cannaò
da8979d1ec
Merge pull request #3227 from sysown/v2.1.0-2953
...
Closes #2953 : Honor 'wsrep_sst_donor_rejects_queries' avoiding setting a DONOR node offline during a SST
5 years ago
René Cannaò
b7183ccb0b
Merge pull request #3237 from sysown/v2.1.0-aurora209
...
Workaround for Aurora 2.09 bug
5 years ago
René Cannaò
651f969e1c
Merge pull request #3203 from sysown/v2.1.0-3201
...
Closes #3201 : Connections not being cleanup in case of 'match_tracked_options' always failing
5 years ago
Will Jordan
dbde7e2e92
Workaround for Aurora 2.09 bug
5 years ago
Javier Jaramago Fernández
60b6fd0222
Simplified and improved logic for connection cleanup and creation when a matching connection isn't found
5 years ago
René Cannaò
bd60db2751
Merge pull request #3199 from sysown/v2.1.0-3177
...
Closes #3177 : Fixed error log and errors reported to clients when several statements fails
5 years ago
René Cannaò
963f36bc65
Merge pull request #3195 from sysown/v2.1.0-2619
...
Closes #2619 : ProxySQL is creating more than 'max_connections' connections
5 years ago
René Cannaò
79298ac6f5
Merge pull request #3217 from sysown/v2.1.0-3216
...
Closes #3216 : Galera node wrongly purged after placed 'OFFLINE HARD' in the 'offline_hostgroup'
5 years ago
Javier Jaramago Fernández
3d4b80b5e4
Honor 'wsrep_sst_donor_rejects_queries' avoiding setting a DONOR node offline during a SST
5 years ago
Javier Jaramago Fernández
16bdd45bcc
Always cleanup readers present in the 'writer_hostgroup' for 'writer_is_also_reader=2'
...
Servers have no reason to be present in the reader hostgroup for 'writer_is_also_reader=2'
when they are present in any other hostgroup that is not 'backup_writer'.
5 years ago
Javier Jaramago Fernández
b402479e50
Enforce nodes to be 'REPLACED' with ONLINE status when placed in the offline hostgroup by 'update_galera_set_offline'
5 years ago
René Cannaò
42eb3982f9
Merge pull request #3189 from sysown/v2.1.0-3187
...
Closes #3187 : Galera nodes permanently dropped from runtime_mysql_servers for writer_is_also_reader=2
5 years ago
René Cannaò
01ff479421
Revert "Closes #3190 : Galera cluster left without readers using 'writer_is_also_reader=2'"
5 years ago
René Cannaò
c0d05fa152
Merge pull request #3192 from sysown/v2.1.0-3190
...
Closes #3190 : Galera cluster left without readers using 'writer_is_also_reader=2'
5 years ago
René Cannaò
064cb1c3d2
Code cleanup
5 years ago
René Cannaò
f210af0aaf
Disabled code that change recv buffer size
5 years ago
René Cannaò
961588a29f
Removed the heartbeat from previous commit
5 years ago
René Cannaò
7921e130d2
Third commit to buffer resultsets in Prepared Statements
...
* MySQL_ResultSet() stores a pointer to the PS
* MySQL_ResultSet::init_with_stmt() doesn't need anymore the pointer to the PS
Furthermore, it isn't anymore an "init" but an end (we will rename it)
* Added MySQL_ResultSet::add_row(MYSQL_ROWS *rows) for PS only
* MySQL_Protocol::generate_pkt_row3() accepts an optional row length.
If passed, it will know the length of the row without computing it
* MyRS initialized during ASYNC_STMT_EXECUTE_STORE_RESULT_START
* Implemented throttling during ASYNC_STMT_EXECUTE_STORE_RESULT_START
* MySQL_Connection::process_rows_in_ASYNC_STMT_EXECUTE_STORE_RESULT_CONT() always
generates a heartbeat. For now unnecessary, and we will better tune it later
* test_ps_async-t.cpp tunes mysql-threshold_resultset_size to trigger buffering
More testing is required
5 years ago
René Cannaò
0171082448
Adding MySQL_ResultSet::init_with_stmt()
...
This new function is meant to split MySQL_ResultSet::init() to later
remove all code specific to prepared statements because it assumes
it is pre-buffered
5 years ago
René Cannaò
7d0ac031b3
Removed a local variable
5 years ago
René Cannaò
5c0a732d8a
Second commit to buffer resultsets in Prepared Statements
...
So far this seems to work, although it is dropping most of the rows.
The rows are lost intentionally up to this commit.
5 years ago
René Cannaò
cfb11144d6
Partial commit to buffer resultsets in Prepared Statements
5 years ago
Javier Jaramago Fernández
a42bdbdd8b
Fixed free connections not being cleanup in case 'match_tracked_options' fails to find matching connection
5 years ago
Javier Jaramago Fernández
2eb5d507df
Fixed error log and errors reported to clients when several statements fails
5 years ago
Javier Jaramago Fernández
3a8b1bce42
Fixed enforcing 'CLIENT_MULTI_RESULTS' for client connections specifying 'CLIENT_MULTI_STATEMENTS'
5 years ago
Javier Jaramago Fernández
dbe16e188f
Fixed leaving a Galera cluster without any readers when there is just one synced node ('writer')
5 years ago
Javier Jaramago Fernández
208f82b619
Fixed the complete removal of servers that just belong to 'reader_hostgroup' when 'writer_is_also_reader=2'
5 years ago
René Cannaò
52e7f0d0eb
Merge pull request #3166 from sysown/v2.1.0-3161
...
Closes #3161 : Added extra logging reporting all galera nodes status when ProxySQL oves a node from hostgroup
5 years ago
Javier Jaramago Fernández
632e4577f0
Fixed 'async_send_simple_command' not reporting server_status
5 years ago
Javier Jaramago Fernández
e40d57d75c
Added checks to verify that backend connection is present in several 'MySQL_Connection::async_' functions
5 years ago
Javier Jaramago Fernández
40448a58fc
Fixed memory leak in 'save_mysql_servers_runtime_to_database' due to non-freed resultset
6 years ago
Javier Jaramago Fernández
76b64bed95
Added extra logging reporting all galera nodes status when ProxySQL moves a node from hostgroup
6 years ago
René Cannaò
bb5ceb9fab
Merge pull request #3158 from sysown/v2.1.0-3155
...
Closes #3155 : Added 'SO_REUSEADDR' option to socket used to test 'web_port' availability
6 years ago
Javier Jaramago Fernández
e654d41f17
Added 'SO_REUSEADDR' option to socket used to test 'web_port' availability
6 years ago
Javier Jaramago Fernández
ef53973018
Fixed memory leak due packet not being freed in 'switching_auth' during 'SERVER_HANDSHAKE'
6 years ago
Javier Jaramago Fernández
b712c8f334
Fixed socket resource leak in case 'bind' fails for 'web_port'
6 years ago
René Cannaò
d8e32d672a
Several error codes are now not considered severe enough to shun a node
...
Those error codes are:
* from 1099 to 1104
* from 1106 to 1113
* from 1116 to 1118
* 1120
* 1136
* from 1138 to 1149
6 years ago
René Cannaò
045bb460b1
Reset client connection when client issues a CHANGE_USER command
6 years ago
René Cannaò
ed23f56473
Merge pull request #3139 from sysown/v2.1.0-3138
...
Closes #3138 : Improve WebInterfacePlugin start error handling
6 years ago
Javier Jaramago Fernández
ae8606f16c
Fixed wrong unit conversions performed into 'status_variables' gauge metrics
6 years ago
Javier Jaramago Fernández
39131a956e
Fixed several prometheus metrics names and tags to follow the latest convention
6 years ago
Javier Jaramago Fernández
d2a566901e
Added support for 'SHOW PROMETHEUS METRICS' command
6 years ago
Javier Jaramago Fernández
1c0dbd5fe2
Improve 'WebInterfacePlugin' initialization error handling
...
- Added 'NULL' checks for 'GloWebInterface'.
- Added port availability check before starting 'GloWebInterface'.
6 years ago
René Cannaò
070b8205f4
Merge pull request #3128 from sysown/v2.1.0-3127
...
Closes #3127 : Port missing commits from v2.0.15 into v2.1.0
6 years ago
René Cannaò
4cdcc1f18f
Merge pull request #3123 from sysown/v2.1.0-deprecate_eof
...
Closes #2684 : Add support for CLIENT_DEPRECATE_EOF
6 years ago
Javier Jaramago Fernández
4ada7ba2e5
Fixed typos in comments specifying table version to be upgraded in 'disk_upgrade_rest_api_routes'
6 years ago
René Cannaò
cd11e85e8c
Minor code cleanup
6 years ago
René Cannaò
66e71a0b3f
Merge pull request #3126 from sysown/v2.1.0-3125
...
Closes #3125 : Renamed 'interval_ms' from 'restapi_routes' table into 'timeout_ms'
6 years ago
Javier Jaramago Fernández
ab5777063f
Added 'NULL' checks to avoid accessing 'GloMTH' in 'push_MyConn_to_pool' after being freed
6 years ago
Javier Jaramago Fernández
6a1d616396
Renamed 'interval_ms' from 'restapi_routes' table into 'timeout_ms'
6 years ago
René Cannaò
9225edbddd
Merge branch 'v2.1.0' into v2.1.0-deprecate_eof
6 years ago
René Cannaò
58c623c8ad
Merge pull request #3110 from sysown/v2.1.0-201020
...
Splitting MySQL_Session::handler()
6 years ago
René Cannaò
b3311beb01
Merge pull request #3113 from sysown/v2.1.0-3112
...
Closes #3112 : Connection pool gauge metrics should only reflect current servers
6 years ago
Javier Jaramago Fernández
79e3d7a1b7
Added support to convert EOF packets into OK packets for 'Query_Cache' entries
6 years ago
Javier Jaramago Fernández
7150c7d8ed
Added metadata to 'Query_Cache' entries for supporting EOF deprecation
6 years ago
René Cannaò
149530a8b2
Default eof_identifier=false in generate_pkt_OK()
6 years ago
Bibek Shrestha
60f2151fe1
Fix special queries response for CLIENT_DEPRECATE_EOF
...
Few special queries are handled separately in ProxySQL
1. select @@version_comment limit 1
2. SHOW WARNINGS
3. SELECT USER()
4. PROXYSQL INTERNAL SESSION
5. SELECT LAST_INSERT_ID()
6. SELECT CONNECTION_ID()
7. C code mysql_set_server_option(mysql, MYSQL_OPTION_MULTI_STATEMENTS_ON)
We now remove EOF1 for these and respond with OK packets intead of EOF2
6 years ago
Bibek Shrestha
205b23acb8
Do not support CLIENT_DEPRECATE_EOF on AdminModule
6 years ago
Bibek Shrestha
b16bb275f7
Hardcode false instead of default value
6 years ago
Bibek Shrestha
81849b6141
No EOF Packet in COM_STMT_PREPARE_OK if CLIENT_DEPRECATE_EOF enabled.
...
COM_STMT_PREPARE_OK contains the following packetrs
1. An OK packet with header = 0x00
2. Param Definition Block (Optional)
+ EOF Packet
3. Column Definition Block (Optional)
+ EOF Packet
Both EOF Packet are no longer sent if CLIENT_DEPRECATE_EOF
flag is enabled by client.
Signed-off-by: Bibek Shrestha <bibekshrestha@gmail.com>
6 years ago
Bibek Shrestha
28c01e9b4d
Send OK packet after ResultSet
...
When CLIENT_DEPRECATE_EOF flag is supported by client, the first EOF
packet after Metadata is not sent anymore. The EOF packet after each
ResultSet is replaced by an OK packet.
Signed-off-by: Bibek Shrestha <bibekshrestha@gmail.com>
6 years ago
Bibek Shrestha
58b4520c0d
Add CLIENT_DEPRECATE_EOF to capabilities flag
...
Note that "\x8f\x80\x15" is in reverse byte order.
So the flag becomes 15808f.
15 - Authenticatin plugin length
80 - 10000000 (unused)
8f - 10001111 (the leftmost 1 is for CLIENT_SESSION_TRACK)
This is changed to 15818f.
15 - Remains the same
81 - 10000001 (the last byte says CLIENT_DEPRECATE_EOF enabled)
8f - 10001111 (remains the same)
Signed-off-by: Bibek Shrestha <bibekshrestha@gmail.com>
6 years ago
René Cannaò
8fb875aec1
First commit to split handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_QUERY_qpo
6 years ago
Javier Jaramago Fernández
d640a5c843
Space removal before closing bracket only takes place in case of leading '.'
6 years ago
René Cannaò
3ab0054af9
Some code cleanup
6 years ago
René Cannaò
cc4d8f232c
Some code cleanup
6 years ago
Javier Jaramago Fernández
9dce0d728c
Fixed typo mistaking supplied '_myds' for internal 'MySQL_Resulset::myds'
6 years ago
Javier Jaramago Fernández
bc2ba33818
Remove non present servers for prometheus 'connection_pool' gauge metrics
6 years ago
René Cannaò
b8220382d9
Merge pull request #3100 from sysown/v2.1.0-3088
...
Closes #3088 : Added new json 'attributes' column to 'mysql_query_rules' table
6 years ago
René Cannaò
43624ac63e
Merge pull request #3086 from sysown/v2.1.0-3083
...
Added new column 'attributes' to 'mysql_users' table
6 years ago
René Cannaò
001351b880
More changes in get_pkts_from_client()
6 years ago
René Cannaò
da43919b77
Refactoring MySQL_Session::get_pkts_from_client()
6 years ago
René Cannaò
8b5812f769
Removed dead code from MySQL_Session
...
* void handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_STMT_PREPARE(PtrSize_t *);
* void handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_STMT_EXECUTE(PtrSize_t *);
6 years ago
René Cannaò
f3ff10e989
Splitting MySQL_Session::get_pkts_from_client
...
Adding functions:
* void handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_STMT_RESET(PtrSize_t&);
* void handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_STMT_CLOSE(PtrSize_t&);
6 years ago
Javier Jaramago Fernández
05a005f9fb
Add support for syncing 'mysql-variables' and 'admin-variables' #2820 ( #2856 )
...
* Added forgotten metric increase in case of 'sync conflict' on proxysql_servers
* Added support for 'global_variables' sync in proxysql_cluster
- Added several for getting the peers to be sync.
- Added function to pull the target 'global_variables' to sync.
- Added metrics for 'global_variables' sync:
+ Number of syncs done / failed.
+ Sync conflicts.
+ Sync warnings.
* Removed unnecesary escaping for '%' char
* Fixed issue due to 'flush_mysql_variables___runtime_to_database' being called without proper locking
* Added simple helper function to get the output from a command execution
* Multiple changes to 'cluster_synct' test
+ Spawned proxysql instance now runs inside a docker container.
+ Simplified launching and logging of spawned proxysql instance.
+ Added more verbose logging about the tables state.
+ Added new tests for 'global_variables' synchronization.
* Commented several variables known to not-sync and fixed port for replica 'proxysql_server'
* Removed deprecated and non-syncable variables from 'test_cluster_sync-t'
* Added extra logging for variables sync for 'test_cluster_sync-t'
6 years ago
René Cannaò
b2e3ae4222
Splitting MySQL_Session::handler()
...
To make it easier to read, MySQL_Session::handler() was split into multiple functions
6 years ago
Javier Jaramago Fernández
9a24849244
Improved cluster 'pulled_mysql_' prometheus metrics naming and labelling
6 years ago
René Cannaò
7c1fb6acd1
Allow compiling without jemalloc
6 years ago
René Cannaò
dd04dc3da4
Do not increment mysql counter error when there is no error
6 years ago
Javier Jaramago Fernández
6a56e02dd7
Fixed typo in 'proxysql_cluster_syn_conflict_total' metric labels
6 years ago
Javier Jaramago Fernández
2d60b06f55
Improved several prometheus metrics labelling and simplified some non-grouping ones
6 years ago
Javier Jaramago Fernández
0a3bbd9cbb
Revert "Fixed double quotes escaping when saving 'attributes' to config file"
...
This reverts commit ee6df8ffb2 .
This commit is no longer required due to a more generic impl
introduced by: '5637b31a6bd40987a383191b08d1a849df237a53'
in branch: v2.1.0-3088
6 years ago
Javier Jaramago Fernández
d0b6c94a22
Fixed 'mysql_query_rules' 'comment' field 'double quotes' surrounding in favor of 'single quotes'
6 years ago
Javier Jaramago Fernández
5637b31a6b
Moved 'double quotes' escaping impl to 'addField' function
...
- Now all the fields values escapes 'double quotes'.
6 years ago
Javier Jaramago Fernández
15a414cf05
Fixed double quotes escaping when saving 'mysql_query_rules' 'attributes' to config file
6 years ago
Javier Jaramago Fernández
ee6df8ffb2
Fixed double quotes escaping when saving 'attributes' to config file
6 years ago
Matthias Crauwels
b9cb21a241
fix for #3095 ( #3096 )
6 years ago
Javier Jaramago Fernández
59696118de
Fixed comment typo in 'hg_metrics_map'
6 years ago
Javier Jaramago Fernández
f6e0e64f42
"Changed prometheus counter naming convention to include '_total' suffix"
...
- Other metrics names has also be changed due to this global change.
6 years ago
Javier Jaramago Fernández
84f4c96afa
Multiple changes to multiple metrics definitions
...
- Labelling has been simplified to group metrics which
are part of a common group.
- Help has been fixed to reflect this labelling change.
- Doxygen doc and comment marks has been added to signal
metrics grouping.
6 years ago
Javier Jaramago Fernández
622a763920
Added new column 'attributes' to 'mysql_query_rules' table
6 years ago
Javier Jaramago Fernández
fd245fc559
Replaced invalid definition of counter 'st_var_hostgroup_locked' in favor of gauge
...
This commit also add support for including more gauge metrics based on
'MySQL_Thread_status_variables', using the same approach previously used
for the 'counter' metrics.
6 years ago
Javier Jaramago Fernández
59bb715785
Fixed counter increment when no conversion is provided to 'get_status_variables'
6 years ago
Javier Jaramago Fernández
ebedd5e37b
Several improvements to prometheus metrics definitions
...
- Metrics now follow prometheus base unit convention.
- Many metrics now make use of labels instead of enconding
the info in the metric name.
- Almost all metrics now have a meaningful 'help' message.
6 years ago