<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="826377">
  <date_last_updated>2011-12-01 18:53:01.739016+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/826377</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~nb-k</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.1</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/826377/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/826377/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/826377</bug_web_link>
  <owner>nbrnhardt</owner>
  <assignee>Michael Widenius</assignee>
  <milestone_title>Maria 5.1</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Aria DB Format: Reading specific table from dump causes Wrong bytesec</title>
  <status>Fix Released</status>
  <importance>High</importance>
  <created>2011-08-14 17:22:43.827445+00:00</created>
  <description>
<![CDATA[Note: I have tested this dump/bug only on WIndows 32 Bit (XP/2003).
How to reproduce:
1. Download and extract latest ZIP file of Win32 MariaDB Binary Distribution (In this case, version 5.3.0 to c:\mariadb).
2. Rename my-medium.ini to my.ini (in my case, I had to add the line "skip-innodb" to avoid another InnoDB-related crash).
2. Start server in commandline window with 
   c:\mariadb\bin\mysqld --standalone
3. Open another commandline window and load dump:
   c:\mariadb\bin\mysql -u root < c:\dump.sql

MySQL crashes with "ERROR 1034 (HY000) at line 135888: Wrong bytesec:   0-  0-  0 at 293128; Skipped"
Logfiles says: "110814 19:07:49 [Warning] Warning: Enabling keys got errno 0 on db.el, retrying"

The original table where created with MySQL and converted on MariaDB 5.2.5 from MyISAM to Aria format without error. When restoring the SQL backup from file to an Intel i7 machine, I had this error 1034 since MariaDB 5.2.5. When upgrading to version 5.3.0 on the server, I created all databases freshly from SQL dump. The bug emerged then on all machines tested:
Windows 2003 Enterprise 32 Bit, Intel Xeon Quadcore, 12GB RAM,
Windows XP 32 Bit, Intel Dual Core, 2GB RAM
Notebook Intel Single Core, 512MB RAM
Notebook Intel Dual Core, 2GB RAM

When creating the same table as MyISAM, the bug does not occur.

Dump, my.ini file and database dir after restoring is included in  ariadbformatwrongbytesec.7z]]>  </description>
  <activities>
    <activity datechanged="2011-08-14T17:22:43.827445+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>nbrnhardt</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2011-08-14T17:22:43.827445+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[ariadbformatwrongbytesec.7z https://bugs.launchpad.net/bugs/826377/+attachment/2277912/+files/ariadbformatwrongbytesec.7z]]>      </newvalue>
      <whatchanged>attachment added</whatchanged>
      <person>nbrnhardt</person>
      <message></message>
    </activity>
    <activity datechanged="2011-08-14T18:11:23.344828+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Michael Widenius (monty)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-08-14T18:11:25.142071+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.2]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2011-08-15T13:57:08.087897+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[In Progress]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
    <activity datechanged="2011-08-15T16:28:11.038914+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[High]]>      </newvalue>
      <whatchanged>maria: importance</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
    <activity datechanged="2011-08-15T17:38:41.297086+00:00">
      <oldvalue>
<![CDATA[5.2]]>      </oldvalue>
      <newvalue>
<![CDATA[5.1]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
    <activity datechanged="2011-08-15T17:42:32.398319+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[lp:maria/5.1]]>      </newvalue>
      <whatchanged>branch linked</whatchanged>
      <person>Launchpad Janitor</person>
      <message></message>
    </activity>
    <activity datechanged="2011-08-15T19:22:42.041903+00:00">
      <oldvalue>
<![CDATA[In Progress]]>      </oldvalue>
      <newvalue>
<![CDATA[Fix Committed]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
    <activity datechanged="2011-12-01T18:53:00.226278+00:00">
      <oldvalue>
<![CDATA[Fix Committed]]>      </oldvalue>
      <newvalue>
<![CDATA[Fix Released]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/826377/comments/0" datecreated="2011-08-14T17:22:43.827445+00:00">
      <person>nbrnhardt</person>
      <subject>
<![CDATA[Aria DB Format: Reading specific table from dump causes Wrong bytesec]]>      </subject>
      <content>
<![CDATA[Note: I have tested this dump/bug only on WIndows 32 Bit (XP/2003).
How to reproduce:
1. Download and extract latest ZIP file of Win32 MariaDB Binary Distribution (In this case, version 5.3.0 to c:\mariadb).
2. Rename my-medium.ini to my.ini (in my case, I had to add the line "skip-innodb" to avoid another InnoDB-related crash).
2. Start server in commandline window with 
   c:\mariadb\bin\mysqld --standalone
3. Open another commandline window and load dump:
   c:\mariadb\bin\mysql -u root < c:\dump.sql

MySQL crashes with "ERROR 1034 (HY000) at line 135888: Wrong bytesec:   0-  0-  0 at 293128; Skipped"
Logfiles says: "110814 19:07:49 [Warning] Warning: Enabling keys got errno 0 on db.el, retrying"

The original table where created with MySQL and converted on MariaDB 5.2.5 from MyISAM to Aria format without error. When restoring the SQL backup from file to an Intel i7 machine, I had this error 1034 since MariaDB 5.2.5. When upgrading to version 5.3.0 on the server, I created all databases freshly from SQL dump. The bug emerged then on all machines tested:
Windows 2003 Enterprise 32 Bit, Intel Xeon Quadcore, 12GB RAM,
Windows XP 32 Bit, Intel Dual Core, 2GB RAM
Notebook Intel Single Core, 512MB RAM
Notebook Intel Dual Core, 2GB RAM

When creating the same table as MyISAM, the bug does not occur.

Dump, my.ini file and database dir after restoring is included in  ariadbformatwrongbytesec.7z]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/826377/comments/1" datecreated="2011-08-14T17:22:43.827445+00:00">
      <person>nbrnhardt</person>
      <subject>
<![CDATA[Re: Aria DB Format: Reading specific table from dump causes Wrong bytesec]]>      </subject>
      <content>
<![CDATA[]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/826377/comments/2" datecreated="2011-08-15T17:05:21.613468+00:00">
      <person>Michael Widenius</person>
      <subject>
<![CDATA[Re: Aria DB Format: Reading specific table from dump causes Wrong bytesec]]>      </subject>
      <content>
<![CDATA[The issue was a bug in Aria when using
alter table ... disable keys;
lock tables ... write;
INSERT multi-value-insert;
INSERT multi-value-insert;

If you remove the alter table command from the dump, the data loads fine.

I will push a fix to 5.2 shortly]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/826377/comments/3" datecreated="2011-08-15T19:22:33.822074+00:00">
      <person>Michael Widenius</person>
      <subject>
<![CDATA[Re: Aria DB Format: Reading specific table from dump causes Wrong bytesec]]>      </subject>
      <content>
<![CDATA[Fix pushed into 5.1. 5.2 and 5.3

Thanks a lot for the test case ;  It helped me to quickly find the bug!
]]>      </content>
    </comment>
  </comments>
  <branches>
    <branch>lp:maria/5.1</branch>
  </branches>
  <messages>
    <message created="2011-08-14 17:22:43.827445+00:00" owner="nbrnhardt">
<![CDATA[]]>      <attachment link="https://bugs.launchpad.net/bugs/826377/+attachment/2277912" type="Unspecified">
        <title>ariadbformatwrongbytesec.7z</title>
        <file>LPexportBug826377_ariadbformatwrongbytesec.7z</file>
      </attachment>
    </message>
  </messages>
</launchpad-bug>
