Bug #36793 rpl_innodb_bug28430 fails on Solaris
Submitted: 19 May 2008 9:44 Modified: 25 Aug 2008 22:12
Reporter: Alexey Botchkov
Status: Closed
Category:Server: InnoDB Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Timothy Smith Target Version:5.1+
Triage: D2 (Serious) / R3 (Medium) / E3 (Medium)

[19 May 2008 9:44] Alexey Botchkov
Description:
the rpl_innodb_bug28430 fails on Solaris as the replicated INNODB table
gets weird AUTO_INCREMENT counter.

-) ENGINE=InnoDB AUTO_INCREMENT=1001
+) ENGINE=InnoDB AUTO_INCREMENT=256001

How to repeat:
remove the rpl_innodb_bug28430 from the disable.def and ./mysql-test-run it

Suggested fix:
No idea yet.
[22 May 2008 12:21] 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/46945

ChangeSet@1.2647, 2008-05-22 14:11:35+05:00, holyfoot@mysql.com +2 -0
  Bug #36793 rpl_innodb_bug28430 fails on Solaris.
  
  internal InnoDB to integer type conversion doesn't work
  on BIGENDIAN machine if the length of a field is 3 in
  the row_search_autoinc_column() function. It returns the
  the value*256 result.
  
  if the number in the field is 10 for example, the
  mach_read_int_type() returns the array of {0, 0, 10, 0}
  Then after ((uint32) array) conversion we get 256 * 10 = 2560
  as a result.
  
  Fixed by handling the lenght3 case separately.
[22 May 2008 14:50] Heikki Tuuri
Sunny,

please check and commit the patch.

Alexey, thank you!

Heikki
[23 May 2008 6:07] Sunny Bains
We changed the read int code in the plugin version and that version doesn't
suffer from this and other endian issues. I will now backport that code to 5.1.

Regards,
-sunny
[19 Jun 2008 3:27] 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/48129

2657 Timothy Smith	2008-06-18
      Apply high-priority bug fixes from InnoDB into 5.1:
      
      Fix for bug# 36793. This is a back port from branches/zip. This
      code has been tested on a big-endian machine too.
      
      Fix Bug#36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
      by removing the Innodb_buffer_pool_pages_latched variable from
      SHOW STATUS output in non-UNIV_DEBUG compilation.
      
      Fix for Bug#35602, "Failed to read auto-increment value from
      storage engine". The test for REPLACE was an error of ommission since it's
      classified as a simple INSERT. For REPLACE statements we don't acquire
      the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
      
      
      These fixes are cherry-picked from the 5.1-ss2479, -ss2479, and -ss2485 snapshots,
respectively.
[20 Jun 2008 0: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/48203

2672 Timothy Smith	2008-06-19
      Apply high-priority bug fixes from InnoDB into 5.1:
      
      Fix for Bug#36793. This is a back port from branches/zip. This code has
      been tested on a big-endian machine too.
      
      Fix Bug#36600 SHOW STATUS takes a lot of CPU in
      buf_get_latched_pages_number by removing the
      Innodb_buffer_pool_pages_latched variable from SHOW STATUS output in
      non-UNIV_DEBUG compilation.
      
      Fix for Bug#35602, "Failed to read auto-increment value from storage
      engine". The test for REPLACE was an error of ommission since it's
      classified as a simple INSERT. For REPLACE statements we don't acquire
      the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
      
      
      These fixes are cherry-picked from the 5.1-ss2479, -ss2479, and -ss2485
      snapshots, respectively.
[20 Jun 2008 0:51] 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/48204

2672 Timothy Smith	2008-06-19
      Apply high-priority bug fixes from InnoDB into 5.1:
      
      Fix for Bug#36793. This is a back port from branches/zip. This code has
      been tested on a big-endian machine too.
      
      Fix Bug#36600 SHOW STATUS takes a lot of CPU in
      buf_get_latched_pages_number by removing the
      Innodb_buffer_pool_pages_latched variable from SHOW STATUS output in
      non-UNIV_DEBUG compilation.
      
      Fix for Bug#35602, "Failed to read auto-increment value from storage
      engine". The test for REPLACE was an error of ommission since it's
      classified as a simple INSERT. For REPLACE statements we don't acquire
      the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
      
      
      These fixes are cherry-picked from the 5.1-ss2479, -ss2479, and -ss2485
      snapshots, respectively.
[25 Jun 2008 0:06] Calvin Sun
Merged into 6.0.6-alpha, according to Tim. But the patch has not been pushed into 5.1
yet.
[14 Jul 2008 21:25] Paul DuBois
Noted in 6.0.6 changelog.

If the length of a field was 3, internal InnoDB to integer type
conversion didn't work on big-endian machines in the
row_search_autoinc_column() function.

Setting report to Patch queued pending push of fix into 5.1.x.
[20 Aug 2008 2:39] 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/52003

2713 Timothy Smith	2008-08-19
      Cherry-pick some changes from innodb-5.1-ss2479 snapshot.  Includes fixes for
      Bug#36600 and Bug#36793:
      
      Bug #36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
      
      Fix by removing the Innodb_buffer_pool_pages_latched variable from SHOW
      STATUS output in non-UNIV_DEBUG compilation.
      
      Bug #36793 rpl_innodb_bug28430 fails on Solaris
      
      This is a back port from branches/zip. This code has been tested on a
      big-endian machine too.
[21 Aug 2008 20:00] Bugs System
Pushed into 5.1.28  (revid:timothy.smith@sun.com-20080820003741-xe0zudmryth44k79) (version
source revid:azundris@mysql.com-20080821081500-f2d61fh4u61owz3p) (pib:3)
[25 Aug 2008 22:12] Paul DuBois
Noted in 5.1.28 changelog.
[13 Sep 2008 23:28] Bugs System
Pushed into 6.0.8-alpha  (revid:timothy.smith@sun.com-20080820003741-xe0zudmryth44k79)
(version source revid:v.narayanan@sun.com-20080908113103-2e4vdpm695vk3ji4) (pib:3)
[30 Oct 2008 19:50] Mark Callaghan
Why is this test still disabled in the 5.1.29 rc?

rpl_redirect               : Failure is sporadic and and the test is superfluous (mats)
rpl_innodb_bug28430        : Failure on Solaris Bug #36793
rpl_flushlog_loop          : BUG#37733 2008-07-23 Sven disabled in 5.1-bugteam. the bug
has been fixed in 5.1-rpl: please re-enable when that gets pushed to main
[6 Nov 2008 21:31] Trudy Pelzer
Tests have been re-enabled in 5.1.30.