Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added warnings handling #4365

Merged
merged 22 commits into from
Dec 8, 2023
Merged

Added warnings handling #4365

merged 22 commits into from
Dec 8, 2023

Commits on Oct 20, 2023

  1. Enhanced Warnings handling in ProxySQL:

    * Implemented 'SHOW WARNINGS' and 'SHOW COUNT(*) FROM WARNINGS' query handling.
    * When a query produces warnings, the warning count is now included in the query response.
    
    Additionally, a new variable 'mysql-query_cache_with_warnings_support' has been introduced for the query cache feature:
    
    * A value of '0' means that if a query execution produces warnings, the resultset will not be saved in the query cache.
    * A value of '1' indicates that if a query produces warnings, the resultset will be saved in the query cache, but the warning count in that resultset will be set to '0'.
    
    ** Note:
    * Warning handling is dependent on the query digest and 'mysql-query_digests' must be enabled for it to work.
    * Warnings saved in logfile ['mysql-log_mysql_warnings_enabled'] and the current feature can work in conjunction with each other.
    rahim-kanji committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    6b29547 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2023

  1. Added TAP test

    rahim-kanji committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    b668021 View commit details
    Browse the repository at this point in the history
  2. Fixed code style

    rahim-kanji committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    d2b8f7d View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. Configuration menu
    Copy the full SHA
    c28f88e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    30f9897 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0c85c4f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a47d0ef View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

  1. Few fixes

    rahim-kanji committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    b588798 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2023

  1. Configuration menu
    Copy the full SHA
    1807315 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. * Updated variable name from 'mysql-query_cache_with_warnings_support…

    …' to 'mysql-query_cache_handle_warnings'
    
    * Introduced global variable 'mysql-handle_warnings' to control warning support in ProxySQL
    * Included 'handling_warnings' flag in the 'mysql_hostgroup_attributes' table (hostgroup_settings). This flag holds top priority and can override the value of the global variable 'mysql_handle_warnings'.
    rahim-kanji committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    743cd50 View commit details
    Browse the repository at this point in the history
  2. Updated cluster TAP test

    rahim-kanji committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    2706b4e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8262d60 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7223ba1 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. Configuration menu
    Copy the full SHA
    05208e2 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

  1. * Setting 'warning_count' as soon as query is executed.

    * 'MySQL_Connection::warning_count' will be globally employed for managing multiplexing control and transmitting the warning count to the client
    * Fixed prepare statement bug: When preparing, if the digest matches, the result set is retrieved from the cache and sent to the client.
    
    Note:
    Currently using 'mysql_warning_count' to retrieve the warning count for prepared statement.
    rahim-kanji committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    dae3d66 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffb6676 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. * Execute all test cases with 'CLIENT_DEPRECATE_EOF' both enabled and…

    … disabled.
    
    * Introduced 'ps_type' enum to differentiate between preparing a statement and executing a statement
    * Fixed issue where the warning count fails to reset when the SET statement generates a warning.
    * Resolved the issue where the 'server_status' and 'warning count' were not accurately represented in the statement.
    * Replaced 'mysql_warning_count' with 'mysql_stmt_warning_count' for retrieving the warning count in statements.
    * Added 'handle_warning' field in hostgroup_attributes TAP test
    * Updated warnings TAP test
    rahim-kanji committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    045d6bc View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2023

  1. * If the backend server has CLIENT_DEPRECATE_EOF enabled, and the cli…

    …ent does not support CLIENT_DEPRECATE_EOF, warning_count will be '0' in intermediate EOF packet.
    
    * Suppress the display of warning counts in the "SHOW WARNINGS" statement.
    rahim-kanji committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    e1c489a View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2023

  1. Configuration menu
    Copy the full SHA
    581a095 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2023

  1. * Overriding some of the mariadb APIs to extract the warning count an…

    …d print it in the log. This override will apply to all TAP tests, except when the TAP test is linked with the MySQL client library (LIBMYSQL_HELPER defined).
    
    * Avoid closing of same mysql connection twice on error.
    * Disabled warning count logging on few TAP tests
    * Enable CLIENT_DEPRECATE_EOF on 20% of total mysql connections
    rahim-kanji committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    f26ea6b View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'Master/v2.x' into v2.x_warning_support_…

    …final
    
    # Conflicts:
    #	test/tap/tests/set_testing-240-t.cpp
    rahim-kanji committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    8606742 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2023

  1. Added README

    rahim-kanji committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    676c6df View commit details
    Browse the repository at this point in the history