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

CONNECT DBF table not created propery - throws LRECL error on SELECT

    XMLWordPrintable

Details

    Description

      When you attempt to create a CONNECT DBF table, the create command executes without error. However when an attempt is made to query the data, an LRECL error is thrown and no data is returned.

      I have also attempted to manually set the LRECL via the options in the create statement but the same result is achieved. I have verified the DBF file and it opens fine it is a DBF version III file.

      The following executes fine:

      create table dbf_demo engine=CONNECT table_type=DBF file_name='C:/MariaDB 10.1/data/demo/test_dbf.dbf';
      

      However the following:

      select * from dbf_demo;
      

      throws this error:

      SQL Error (1296): Got error 174 'Table/File lrecl mismatch (857,301)' from CONNECT
      

      Upon further inspection the DBF file is actually being read and the table is being created but you cannot use SELECT to view even the empty columns in the table, it consistently throws the LRECL error.

      If you run the following:

      show create table dbf_demo
      

      You can then see the structure of dbf_demo(FIELD NAMES CHANGED):

      CREATE TABLE `dbf_demo` (
        `FIRST_NAME` char(49) NOT NULL,
        `LAST_NAME` char(10) NOT NULL,
        `EVENT_DATE` char(10) NOT NULL,
        `EVENT_TYPE` char(2) NOT NULL,
        `GRID` char(13) NOT NULL,
        `LONG` double(11,2) NOT NULL,
        `LAT` double(11,2) NOT NULL,
        `LOCATION` char(181) NOT NULL,
        `APPROVED` char(13) NOT NULL
      ) ENGINE=CONNECT DEFAULT CHARSET=utf8 `TABLE_TYPE`='DBF' `FILE_NAME`='C:/MariaDB 10.1/data/demo/test_dbf.dbf' `LRECL`=310
      

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            boneill81 Barry O' Neill
            Votes:
            1 Vote for this issue
            Watchers:
            4 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.