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

CONNECT fails for NVARCHAR

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.0.17, 10.3, 10.4
    • 10.4
    • CentOS release 6.5 (X86_64), PureData Release 7.0 (P-3) , NetezzaSQL ODBCDriver

    Description

      I am trying to make a CONNECT table to a table on an IBM database.
      It seems to me no test has been done yet for the IBM server.

      The original table includes columns in NVARCHAR(N) for UTF-8 characters.

      http://www-01.ibm.com/support/knowledgecenter/SSBJG3_2.5.0/com.ibm.gen_busug.doc/c_fgl_odiagntz_016.htm

      I have two problems.

      1.
      When I try creating a CONNECT table without specifying the column definition,
      I get the below error.

      Error (Code 1105): Unsupported SQL type -9

      It doesn't happen when the table does not have any NVARCHAR(N) columns,
      so I guess the CONNECT engine is not familiar with this data type

      2.
      When I specify the column definition such as VARCHAR(32),
      the CONNECT table is created with no error.
      But I get ? marks for all UTF-8 characters.

      MariaDB [test]> show variables like '%char%';
      +--------------------------+----------------------------+
      | Variable_name            | Value                      |
      +--------------------------+----------------------------+
      | character_set_client     | utf8                       |
      | character_set_connection | utf8                       |
      | character_set_database   | utf8                       |
      | character_set_filesystem | binary                     |
      | character_set_results    | utf8                       |
      | character_set_server     | utf8                       |
      | character_set_system     | utf8                       |
      | character_sets_dir       | /usr/share/mysql/charsets/ |
      +--------------------------+----------------------------+
      8 rows in set (0.06 sec)
       
      MariaDB [test]> SELECT c1 FROM CONNECT_TABLE;
      +-------+
      | c1      |
      +-------+
      | ???     |
      | JCB     |
      | ???     |
      | ???     |
      | ???     |
      | ???     |
      | ???     |
      | ???     |
      | UFJ     |
      | ???     |
      +-------+
      10 rows in set (0.00 sec)

      I found it is not a problem of the ODBC driver, queries on isql returns the UTF-8 values correctly.
      Changing the table's DEFAULT CHARSET or DATA_CHARSET did not work.

      Attachments

        Activity

          People

            TheLinuxJedi Andrew Hutchings
            takuya Takuya Aoki (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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