Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MartinFlores751
Copy link
Contributor

@MartinFlores751 MartinFlores751 commented Aug 27, 2025

Issue quick link: #7494

This PR attempts to fix the issue relating to MariaDB having unexpected behavior by setting option to return the number of found rows instead of the number of changed rows. The settings in option are set by toggling the relevant bits, e.g., 2 sets bit 1 which is equivalent to enabling FOUND_ROWS in MySQL.

option is used here since MariaDB does not support some MySQL aliases such as FOUND_ROWS. They must be set in option.

The relevant MySQL documentation for option can be found here: https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-connection-parameters.html#codbc-dsn-option-flags

The documentation for MariaDB option can be found here: https://mariadb.com/docs/connectors/mariadb-connector-odbc/mariadb-connector-odbc-guide#general-connection-parameters


Before getting out of draft the following will be completed:

  • Run core tests against MySQL with the following option:
    • "10" or both BIG_PACKETS and FOUND_ROWS.
      • Passed.
    • "8" or just BIG_PACKETS.
      • Failed, as expected, on the post-install test.
    • "2" or just FOUND_ROWS.
  • Run core and unit tests against MariaDB.

Copy link
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Awaiting test results for MariaDB and MySQL.

Please confirm MySQL fails in the expected way when option is misconfigured. This will allow us to know for sure when things are working.

@trel
Copy link
Member

trel commented Aug 28, 2025

So we're just 'restoring' example/known/desired behavior... rather than changing anything to fix a bug.

This was already 'solved' for MySQL and MariaDB just doesn't use the same descriptors in the ODBC file.

This is great.

@MartinFlores751 MartinFlores751 marked this pull request as ready for review August 29, 2025 18:09
@korydraughn
Copy link
Contributor

So everything is working as intended? You're confident the changes are good?

@MartinFlores751
Copy link
Contributor Author

Due to issues in reproducing #5684 and the MariaDB tests possibly needing to be redone (setting mariadb_use_mysql_odbc_driver to False, see irods/irods_testing_environment#224), the PR will be pulled back into draft and worked on again at a later point.

@MartinFlores751 MartinFlores751 marked this pull request as draft September 4, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants