Bug #20839 Required tablespace and logfile group definitions not output by mysqldump
Submitted: 3 Jul 2006 23:50 Modified: 6 Dec 2006 9:09
Reporter: Nikolay Grishakin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:5.1 OS:Linux (Linux)
Assigned to: Stewart Smith CPU Architecture:Any
Tags: Test blocking

[3 Jul 2006 23:50] Nikolay Grishakin
Description:
Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11.
| Error | 1005 | Can't create table 'TPCB.history' (errno: 155) |

How to repeat:
See privat comments
[26 Jul 2006 14:58] Jonathan Miller
Currently blocking testing. So bumped up priority
[9 Aug 2006 17:42] Jonas Oreland
How do you figure that tables chould be recreated if you dont
  restore tablespace/logfile groups ?

Is there something I missunderstood
1) create logfile group
2) create tablespace
3) create table using tablespace
4) dump only table-definitions (and data)
5) remove everything
6) try to restore table...

If this description is correct, then this is not a bug.
[9 Aug 2006 17:51] Nikolay Grishakin
If we dump table-definitions and data only then mysqldump should remove table spaces from CREATE TABLE statments. Otherwise such dump won't be restorable.
[9 Aug 2006 18:16] Jonas Oreland
One could have other tablespaces / logfile groups
  (or kept them)...
[9 Aug 2006 18:20] Jonas Oreland
But I do think that "default" should be to dump tablespace/lfg if
  dumping tables using them...
[6 Oct 2006 11:04] Stewart Smith
Thoughts on solution:

Update INFORMATION_SCHEMA.FILES table to have row-per-table linking it to tablespace (and LFG).

In mysqldump, query the I_S.FILES table for what TS and LFGs to dump for the tables we're dumping.
[9 Oct 2006 14:04] 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/13334

ChangeSet@1.2305, 2006-10-10 00:03:46+10:00, stewart@willster.(none) +2 -0
  BUG#20839 Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11
  
  Update mysqldump to dump the needed tablespaces to create the tables
  for either the dbs or tables we're dumping.
  
  With --all-tablespaces, we still dump everything.
[16 Oct 2006 14:16] 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/13737

ChangeSet@1.2306, 2006-10-17 00:15:58+10:00, stewart@willster.(none) +1 -0
  BUG#20839 Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11
  
  Post review fix:
  Magnus suggested making sure that new mysqldump still worked flawlessly
  with old servers.
[16 Oct 2006 15:02] 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/13747

ChangeSet@1.2307, 2006-10-17 01:02:12+10:00, stewart@willster.(none) +2 -0
  BUG#20839 Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11
  
  post-review fixes.
  
  Magnus suggested use of DYNAMIC_STRING instead of futzing with c strings.
  also making usage of TABLEs clearer in store_schema_partitions_record.
[20 Oct 2006 12:47] 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/14065

ChangeSet@1.2308, 2006-10-20 22:47:28+10:00, stewart@willster.(none) +3 -0
  BUG#20839 Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11
  
  post-review fixups - magnus suggested creating dynstr_trunc instead of doing
  it manually.
[26 Oct 2006 11:01] Stewart Smith
final merge and testing before pushing
[8 Nov 2006 4:11] Stewart Smith
Pushed to 5.1-ndb
[6 Dec 2006 9:09] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented change in 5.1.14 changelog.

Fixed synopsis.