Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-298

Make "MS Access" behavior of SQLTables default

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.10
    • 3.2.0, 3.1.16
    • General
    • None

    Description

      Currently in case of NULL catalog name, SQLTables returns tables from all databases. That was our interpretation of specs, but it happens to be incorrect. That is already changed for MS Access - tables for currently selected DB are returned only, and should become a default behavior.

      Attachments

        Issue Links

          Activity

            Since this behavior is changed back and forth from version to version, it's probably better to make it optional, and leave current behavior default in current(3.1) series, and new/old one to be default in the next(3.2) series.

            Lawrin Lawrin Novitsky added a comment - Since this behavior is changed back and forth from version to version, it's probably better to make it optional, and leave current behavior default in current(3.1) series, and new/old one to be default in the next(3.2) series.

            Current behavior is justified by this:
            https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/arguments-in-catalog-functions says, that SQLTables arguments are pattern values, and if you follow the link for pattern values description https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/pattern-value-arguments, you can read there "Passing a null pointer to a search pattern argument does not constrain the search for that argument; that is, a null pointer and the search pattern % (any characters) are equivalent.". This quote suggests, that our (current) interpretation is correct, and have the right to stay at least as optional. Especially since it was in all 3.1 ga releases.

            Lawrin Lawrin Novitsky added a comment - Current behavior is justified by this: https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/arguments-in-catalog-functions says, that SQLTables arguments are pattern values, and if you follow the link for pattern values description https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/pattern-value-arguments , you can read there "Passing a null pointer to a search pattern argument does not constrain the search for that argument; that is, a null pointer and the search pattern % (any characters) are equivalent.". This quote suggests, that our (current) interpretation is correct, and have the right to stay at least as optional. Especially since it was in all 3.1 ga releases.

            The option NULLISCURRENT has been added. If it's set, new(that also happens to be old) behavior is enforced, and NULL catalog value is treated as "currently selected schema". Otherwise NULL means "any schema" as it is now. I'll probably give another think what should be the default for this option in the 3.2. Changing behavior back and forth is not the best idea as well.

            Lawrin Lawrin Novitsky added a comment - The option NULLISCURRENT has been added. If it's set, new(that also happens to be old) behavior is enforced, and NULL catalog value is treated as "currently selected schema". Otherwise NULL means "any schema" as it is now. I'll probably give another think what should be the default for this option in the 3.2. Changing behavior back and forth is not the best idea as well.

            "NULL catalog parameter means current schema" has been made default behavior in 3.2.0

            Lawrin Lawrin Novitsky added a comment - "NULL catalog parameter means current schema" has been made default behavior in 3.2.0

            People

              Lawrin Lawrin Novitsky
              Lawrin Lawrin Novitsky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.