Bug #54658 InnoDB: Warning: allocated tablespace %lu, old maximum was 0
Submitted: 21 Jun 2010 8:48 Modified: 26 Oct 2010 23:44
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Marko Mäkelä CPU Architecture:Any
Tags: innodb innodb_file_per_table ibd
Triage: Triaged: D4 (Minor) / R2 (Low) / E2 (Low)

[21 Jun 2010 8:48] Marko Mäkelä
Description:
There is a bug in the fix of Bug #53578. When InnoDB is started up on old data files, it will display a bogus message of the form

InnoDB: Warning: allocated tablespace %lu, old maximum was 0

How to repeat:
mysqld --innodb_file_per_table=1
create some InnoDB tables
shutdown, restart

Suggested fix:
Read DICT_HDR_MAX_SPACE_ID to fil_system->max_assigned_id before opening files in dict_check_tablespaces_and_store_max_id().
[21 Jun 2010 9:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/111663
[21 Jun 2010 9:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/111664
[21 Jun 2010 9:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/111666
[21 Jun 2010 9:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/111667
[21 Jun 2010 10:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/111671
[21 Jun 2010 10:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/111672
[19 Jul 2010 14:36] Bugs System
Pushed into 5.1.49 (revid:build@mysql.com-20100719143034-omcma40sblwmay3x) (version source revid:vasil.dimov@oracle.com-20100704071244-3lo4okzels3kvy1p) (merge vers: 5.1.49) (pib:16)
[20 Jul 2010 23:06] John Russell
Added to 5.1.49 change log:

InnoDB could issue an incorrect message on startup, if tables were
created under the setting innodb_file_per_table=ON and the server was
restarted under the setting innodb_file_per_table=OFF. The message
was of the form InnoDB: Warning: allocated tablespace n, old maximum
was 0.
[23 Jul 2010 12:25] Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100723121820-jryu2fuw3pc53q9w) (version source revid:alik@sun.com-20100723121820-jryu2fuw3pc53q9w) (merge vers: 5.5.6-m3) (pib:18)
[23 Jul 2010 12:32] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100723121929-90e9zemk3jkr2ocy) (version source revid:alik@sun.com-20100723121827-3bsh51m5sj6g4oma) (pib:18)
[4 Aug 2010 7:52] Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100622115215-kxtzx7xuugcxd375) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:06] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100622115215-kxtzx7xuugcxd375) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:22] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:marko.makela@oracle.com-20100622115215-kxtzx7xuugcxd375) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 9:02] Bugs System
Pushed into mysql-next-mr (revid:alik@ibmvm-20100804081630-ntapn8bf9pko9vj3) (version source revid:marko.makela@oracle.com-20100622115215-kxtzx7xuugcxd375) (pib:20)
[4 Aug 2010 21:43] John Russell
Added to 5.5.6 changelog.
[14 Oct 2010 8:31] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[14 Oct 2010 8:47] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (merge vers: 5.1.51-ndb-6.3.39) (pib:21)
[14 Oct 2010 9:01] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (merge vers: 5.1.51-ndb-6.2.19) (pib:21)
[15 Oct 2010 13:24] Jon Stephens
Already documented in the 5.1.49 changelog. Reverting to Closed state.
[19 Oct 2010 1:11] James Day
I've reopened this after getting a report of it in 5.1.51.
[20 Oct 2010 9:07] Marko Mäkelä
It is perfectly OK for the message to appear when the server is first started on data files that were created prior to the Bug #53578 fix.

Once the server containing the Bug #53578 fix has been restarted, the appearance of the message should indicate database corruption. Possibly, an InnoDB table has to be created with innodb_file_per_table=1 in order to initialize the "maximum tablespace id" stored in the system tablespace that was originally created on a server that did not contain the Bug #53578 fix.

Did the message appear after creating a table and restarting the server?
[20 Oct 2010 12:50] James Day
Marko, thanks. I've asked the customer to restart the server and if the error message still appears, to create an InnoDB table and restart a second time.
[20 Oct 2010 13:29] James Day
If you encounter this message after upgrading you should create an InnoDB table with innodb_file_per_table = ON and restart the server. The message should not be displayed any more.

If you continue to encounter this error message or get it and haven't used a version without this fix you probably have corruption in your shared tablespace. You should back up and reload your data to remove this problem.

James Day, MySQL Principal Support Engineer, Oracle UK
[26 Oct 2010 23:44] John Russell
Updated the changelog text as suggested by James.
[8 Feb 2012 17:20] John Russell
There were 2 versions of the suggested text floating around. Updated the changelog based on the clearer version:

InnoDB could issue an incorrect message on startup, if tables were
created under the setting innodb_file_per_table=ON. The message was
of the form InnoDB: Warning: allocated tablespace n, old maximum was
0. If you encounter this message after upgrading, create an InnoDB
table with innodb_file_per_table = ON and restart the server. The
message should not be displayed any more. If you continue to
encounter this message, or if you get it and haven't used a version
without this fix, you might have corruption in your shared
tablespace. If so, back up and reload your data.