Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5351

ConnectSE: ODBC: MSSQL: A SELECT from a CATFUNC=Columns table returns an error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 10.0.10
    • 10.0.11
    • None

    Description

      Run the following SQL script against an MS SQL Server data source:

      mysql> drop table if exists t1;
      Query OK, 0 rows affected (0.00 sec)
       
      mysql> create table t1 engine=connect table_type=odbc connection='DSN=ms-amazon;UID=sa;PWD=mypw2013' catfunc=Columns;
      Query OK, 0 rows affected (0.05 sec)
       
      mysql> select * from t1;
      ERROR 1296 (HY000): Got error 174 '[FreeTDS][SQL Server]Procedure or function 'sp_columns' expects parameter '@table_name', which was n' from CONNECT

      The expected result (instead of this error) is to return rows with the information
      about all columns of all tables existing in this data source .

      Additionally, the error message is cut, which makes it confusing.
      The entire error message is printed in the server error log:

      [FreeTDS][SQL Server]Procedure or function 'sp_columns' expects parameter '@table_name', which was not supplied.
      OpenTable: [FreeTDS][SQL Server]Procedure or function 'sp_columns' expects parameter '@table_name', which was not supplied.

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.