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

plugin ha_connect, file_type=DBF insert fails

    XMLWordPrintable

Details

    Description

      @@version: 11.0.2-MariaDB

      Insert puts data after the .dbf end-of-file marker (0x1A) and doesn't update the number of records counter in the header.

      I created a table:
      CREATE TABLE test ( id INT(10) )
      ENGINE=connect table_type=DBF
      file_name='C:/tmp/test.dbf'
      CHARACTER SET = 'cp852'
      COLLATE='cp852_general_ci';

      Then inserted a record:
      INSERT INTO test(id) VALUES(5);
      – End-of-file marker is missing.

      After that I opened test.dbf with libreoffice calc, and add one line than save the file in dbf format. Libreoffice put end-of-file marker. The select statement list two records.

      The next insert fails:
      INSERT INTO test(id) VALUES(1);
      SELECT * FROM test;

      Select shows only two records instead of three and the dbf file is corrupted. The attached file has 5 records but only two of them are visible.

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              DUNAZOLTAN Mr. Zoltan Duna
              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.