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

Incorrect information in file when *.frm is > 256K

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.10
    • 10.0.13
    • None
    • None
    • RHEL 6.5 - x64

    Description

      I have a database table with a huge amount of partitions with a very verbose partition creation statement. It is 260K in size. I can create the tables without a problem, but am unable to open the tables once created. It appears that sql/unireg.h has FRM_MAX_SIZE defined at 256K, and silently truncates the form file to that size. open_table_def() contains this statement:

      Attachments

        Issue Links

          Activity

            Steven_Carr Steven Carr added a comment -

            open_table_def() contains this statement: set_if_smaller(frmlen, FRM_MAX_SIZE); // safety

            It would be helpful to at least include a warning in the error file to let me know why the load was failing. In this case, the binary loader was unable to read the names of the fields.

            Steven_Carr Steven Carr added a comment - open_table_def() contains this statement: set_if_smaller(frmlen, FRM_MAX_SIZE); // safety It would be helpful to at least include a warning in the error file to let me know why the load was failing. In this case, the binary loader was unable to read the names of the fields.

            Hi Steven,

            Thanks for the report.

            An example of the test case is attached, it just contains the CREATE TABLE statement followed by SELECT from this table.

            Could not reproduce on 5.5 (this test case is not suitable for 5.5 because it uses too many partitions, but I couldn't reproduce it with other partition definitions either).
            Couldn't reproduce on 5.6.17, 5.6.10, 5.6.7.

            elenst Elena Stepanova added a comment - Hi Steven, Thanks for the report. An example of the test case is attached, it just contains the CREATE TABLE statement followed by SELECT from this table. Could not reproduce on 5.5 (this test case is not suitable for 5.5 because it uses too many partitions, but I couldn't reproduce it with other partition definitions either). Couldn't reproduce on 5.6.17, 5.6.10, 5.6.7.

            After my fix huge frm files will be rejected during CREATE TABLE. That is, MariaDB will not create invalid frm files anymore.

            Additionally I've raised the frm size limit to 512K, so hopefully your tables will be ok.

            serg Sergei Golubchik added a comment - After my fix huge frm files will be rejected during CREATE TABLE. That is, MariaDB will not create invalid frm files anymore. Additionally I've raised the frm size limit to 512K, so hopefully your tables will be ok.

            People

              serg Sergei Golubchik
              Steven_Carr Steven Carr
              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.