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

MicroFocus COBOL and MariaDB 31 bit ODBC - FETCH returns corrupt data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 2.0.11
    • N/A
    • General
    • None
    • Windows 10, Microfocus Visual COBOL - Eclipse version MariaDB 10 and ODBC 31 bit driver

    Description

      simple table called 'family' with 1 column - 'name' defined as char(20)

      COBOL source:
      EXEC SQL BEGIN DECLARE SECTION END-EXEC
      01 ws-name pic x(20).
      EXEC SQL END DECLARE SECTION END-EXEC.

      exec sql
      DECLARE mycursor cursor for
      SELECT name
      FROM family
      end-exec
      exec SQL open cursor mycursor end-exec
      perform until sqlstate = 02000
      exec sql
      fetch from mycursor into :ws-name
      end-exec
      display ws-name <---- displays garbage
      end-perform

      when I run the MicroFocus debugger the first value fetched contains this corruption:
      Richard Sh peare
      Hex:
      56666762561000766762
      29381240380000051250

      for some reason x'100000' is overlaid in the char string. We are also seeing a SQLCODE = 1 suggesting a truncation of some sort.

      If I run the select and specify INTO OUTFILE 'debug'
      The name values are correctly saved - so the problem seems to be in the FETCH process into the program variable.

      Recreated this using different tables and columns - same corruption occurs.

      We have confirmed that this same program works fine when run against SQL Server.

      I then installed the MYSQL 31 bit ODBC driver version 5.3.6 and used that instead of the Maria DB 31 bit ODBC driver -and the MYSQL connector works fine.
      So this would seem to suggest that the MariaDB ODBC driver has a bug.

      Attachments

        1. MYSQL.LOG
          37 kB
        2. SQL.LOG
          32 kB

        Activity

          People

            Lawrin Lawrin Novitsky
            Jackson David
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.