Bug #64160 | page size 1024 but the only supported page size in this release is=16384 | ||
---|---|---|---|
Submitted: | 30 Jan 2012 3:13 | Modified: | 30 Mar 2012 19:42 |
Reporter: | Emre Gilbert | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 5.5.20 | OS: | Windows (2003) |
Assigned to: | CPU Architecture: | Any | |
Tags: | regression |
[30 Jan 2012 3:13]
Emre Gilbert
[30 Jan 2012 7:21]
Valeriy Kravchuk
Please, provide exact CREATE TABLE for compressed table you had created in 5.5.20.
[30 Jan 2012 8:52]
Emre Gilbert
Hello Valeriy, Our tables' engine type are already InnoDB before upgrade So I did not create any tables after upgrade but convert them compressed. I am giving one of table's create sql statement that I compressed after upgrade CREATE TABLE smf_attachments ( id_attach int(10) unsigned NOT NULL auto_increment, id_thumb int(10) unsigned NOT NULL default '0', id_msg int(10) unsigned NOT NULL default '0', id_member mediumint(8) unsigned NOT NULL default '0', id_folder tinyint(3) NOT NULL default '1', attachment_type tinyint(3) unsigned NOT NULL default '0', filename varchar(255) NOT NULL default '', file_hash varchar(40) NOT NULL default '', fileext varchar(8) NOT NULL default '', size int(10) unsigned NOT NULL default '0', downloads mediumint(8) unsigned NOT NULL default '0', width mediumint(8) unsigned NOT NULL default '0', height mediumint(8) unsigned NOT NULL default '0', mime_type varchar(20) NOT NULL default '', approved tinyint(3) NOT NULL default '1', PRIMARY KEY (id_attach), UNIQUE id_member (id_member, id_attach), KEY id_msg (id_msg), KEY attachment_type (attachment_type) ) ENGINE=InnoDB; Do you need all of create statements that are conventered to compress? or all tables are using myisam engine. I use mostly below alter table smf_attachments ENGINE=MyISAM ROW_FORMAT=COMPRESSED; For one or two below ALTER TABLE table_name smf_attachments ENGINE=MyISAM ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; Regards, Emre
[30 Jan 2012 16:19]
Emre Gilbert
I discovered that I miswritten alter stament engine was innodb. ALTER TABLE table_name name_of_innodb_tables ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; ALTER TABLE table_name name_of_innodb_tables ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; If I try to open without ibdata and logs, it is opening but I can only select myisam tables desc smf_attachments; ERROR 1146 (42S02): Table 'gilbaz_forumdb.smf_attachments' doesn't exist
[2 Feb 2012 19:26]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior. Have you compiled 5.1 server yourself? Please send us output of SHOW STATUS LIKE 'Innodb_page_size' from both 5.1 and 5.5 servers. I also found you had not specified --innodb_file_per_table and innodb_file_format=barracuda in the configuration provided. Have you missed these options required for KEY_BLOCK_SIZE and ROW_FORMAT=COMPRESSED?
[3 Feb 2012 20:34]
Kevin Lewis
InnoDDB in MySQL version 5.5.20 contains a check for a new filespace flag added to version 5.6.4. This was intended to protect again using a tablespace in 5.5.20 created by 5.6.4 with the newly supported page sizes of 4096 and 8192. However, this bug seems to indicate that some old ibdata tablespaces contain some unexpected bits set in the non-used portion of FSP_SPACE_FLAGS in the header page. I think a possible solution is to only check for the wrong page size on non-system tablespaces that end in .ibd. These kind of tablespaces were added after this field was assured to be fully initialized.
[5 Feb 2012 5:24]
Matthew Lord
Hi Emre, Thank you for your report! This issue has been verified and will be addressed in an upcoming release. In the meantime, you should have no issue using 5.5.19. This issue is due to a regression in 5.5.20. Best Regards, Matt
[5 Feb 2012 8:33]
Emre Gilbert
Hi Matthew, Kevin and Sveta, Thanks for your feedbacks. I understand that if I try to open with version 5.5.19 I'll open my database without problem. I restored database from backup (before upgrade state) Regards,
[14 Feb 2012 16:47]
Antonis Kopsaftis
Hello, Today i tried to upgrade my mysql DB from version 5.5.10 to 5.5.20 (MySQL-server-5.5.20-1.rhel5.x86_64.rpm) . On my test environment the upgrade went smooth without any problem. On my production servers, the upgrade failed. The mysql daemon did not started, with the below errors messages: 120214 18:19:18 InnoDB: Error: data file /var/lib/mysql/ibdata2 uses page size 131072, 120214 18:19:18 InnoDB: but the only supported page size in this release is=16384 120214 18:19:18 InnoDB: Could not open or create data files. 120214 18:19:18 InnoDB: If you tried to add new data files, and it failed here, 120214 18:19:18 InnoDB: you should now edit innodb_data_file_path in my.cnf back 120214 18:19:18 InnoDB: to what it was, and remove the new ibdata files InnoDB created 120214 18:19:18 InnoDB: in this failed attempt. InnoDB only wrote those files full of 120214 18:19:18 InnoDB: zeros, but did not yet use them in any way. But be careful: do not 120214 18:19:18 InnoDB: remove old data files which contain your precious data! 120214 18:19:18 [ERROR] Plugin 'InnoDB' init function returned error. 120214 18:19:18 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 120214 18:19:18 [ERROR] Unknown/unsupported storage engine: InnoDB 120214 18:19:18 [ERROR] Aborting The part from my.cnf regarding innodb is: --------------------------------- innodb_data_home_dir = /var/lib/mysql/ innodb_data_file_path = ibdata1:26M;ibdata2:100M:autoextend innodb_buffer_pool_size = 512M innodb_additional_mem_pool_size = 20M innodb_log_file_size = 128M --------------------------------- After downgrading to 5.5.19, the problem disappared.
[14 Feb 2012 17:50]
Emre Gilbert
Hello Antonis, I'm glad to see someone handle that problem before it hurts too much like me :) anyway, downgrading to 5.5.19 indicates to solve that problem. I hope to see mysql team will fix that problem in next release. Regards, Emre
[16 Feb 2012 17:53]
Kevin Lewis
Patch for Bug 64160, Oracle Bug 13698765
Attachment: 13698765.1st.patch (application/octet-stream, text), 545 bytes.
[16 Feb 2012 18:03]
Kevin Lewis
The patch attached here fixes this problem. The problem was introduced in 5.5.20 where it tries to protect against downgrading from a version 5.6.4 database that was created with a page size other than 16k. Version 5.6.4 supports page sizes 4k and 8k and stamps that page size into the header page of each tablespace file. Version 5.5.20 attempts to read that page size in the file header. But it turns out that only the first system tablespace file has a reliable flags field in the header. So only ibdata1 can be or needs to be tested for another page size. Extra system tablespace files like ibdata2, ibdata3, etc do not and should not be tested since the flags field is unreliable. This patch is basically a one line change that prevents the flags field of ibdata2, ibdata3, etc from being tested for a different page size created by a 5.6.4 engine.
[7 Mar 2012 13:53]
yao kai
i got the same error when i am doing a experiment of adding data files for system tablespace. before i add data file,i hava a data file in system tablespace(it is created by the innodb when i am first start mysqld, default is ibdata1). then,i do some INSERT operations.you know the data file must be bigger. now, i start the operation of add datafile to tablepace. first, i calculate the orginal data files's size and round it to MB. then i modify the my.cnf, set the ibdata1 to it's real size, and then add the new datafile, then i start the mysqld successfully. later, i restart mysqld, then an error occurs: just like follow: 120307 20:52:59 InnoDB: Error: data file /styx/home/hzzhangbosen/mysql-5.5/data/ibdata2 uses page size 1024, 120307 20:52:59 InnoDB: but the only supported page size in this release is=16384 120307 20:52:59 InnoDB: Could not open or create data files.
[30 Mar 2012 19:36]
John Russell
Added to changelog for 5.5.22, 5.6.5: After using an ALTER TABLE statement to change the KEY_BLOCK_SIZE property for an InnoDB table, for example when switching from an uncompressed to a compressed table, subsequent server restarts could fail with a message like: InnoDB: Error: data file path/ibdata2 uses page size 1024, InnoDB: but the only supported page size in this release is=16384
[30 Mar 2012 19:41]
John Russell
Added to changelog for 5.5.22, 5.6.5: After using an ALTER TABLE statement to change the KEY_BLOCK_SIZE property for an InnoDB table, for example when switching from an uncompressed to a compressed table, subsequent server restarts could fail with a message like: InnoDB: Error: data file path/ibdata2 uses page size 1024, InnoDB: but the only supported page size in this release is=16384
[27 Dec 2012 10:33]
MySQL Verification Team
http://bugs.mysql.com/bug.php?id=67979 marked as duplicate of this one.