[MDEV-6224] Incorrect information in file when *.frm is > 256K Created: 2014-05-09 Updated: 2018-04-18 Resolved: 2014-07-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.10 |
| Fix Version/s: | 10.0.13 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Steven Carr | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
RHEL 6.5 - x64 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| 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: |
| Comments |
| Comment by Steven Carr [ 2014-05-09 ] |
|
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. |
| Comment by Elena Stepanova [ 2014-05-10 ] |
|
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). |
| Comment by Sergei Golubchik [ 2014-07-07 ] |
|
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. |