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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.10
    • Fix Version/s: 10.0.13
    • Component/s: None
    • Labels:
      None
    • Environment:
      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:

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            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.

            Show
            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.
            Hide
            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.

            Show
            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.
            Hide
            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.

            Show
            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

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                Steven_Carr Steven Carr
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h