Bug #45823 | Assertion failure in file row/row0mysql.c line 1386 | ||
---|---|---|---|
Submitted: | 29 Jun 2009 13:38 | Modified: | 19 Dec 2009 10:47 |
Reporter: | Victor Kirkebo | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S1 (Critical) |
Version: | 5.1.31, 5.1.31sp1, 5.1.34, 5.1.34sp1, 5.1.37 | OS: | Any |
Assigned to: | V Venkateswaran | CPU Architecture: | Any |
Tags: | BTR_PCUR_ON, core dump, coredump, regression, row0mysql.c |
[29 Jun 2009 13:38]
Victor Kirkebo
[29 Jun 2009 15:15]
Victor Kirkebo
The table is partitioned: create table tb1_eng1 ( i1 int NOT NULL auto_increment, primary key (i1), f1 int, f2 char (15), f3 decimal (5,3), f4 datetime ) engine=innodb PARTITION BY HASH(i1) PARTITIONS 2 (PARTITION part1 DATA DIRECTORY = '/export/home/tmp/vk136562/5.1.34sp1/sysrplcomboRBR/var/master-data-partitions/tmpdata' INDEX DIRECTORY = '/export/home/tmp/vk136562/5.1.34sp1/sysrplcomboRBR/var/master-data-partitions/tmpindex', PARTITION part2 DATA DIRECTORY = '/export/home/tmp/vk136562/5.1.34sp1/sysrplcomboRBR/var/master-data-partitions/tmpdata' INDEX DIRECTORY = '/export/home/tmp/vk136562/5.1.34sp1/sysrplcomboRBR/var/master-data-partitions/tmpindex');
[30 Jun 2009 23:13]
Elena Stepanova
-------- Testcase: use test; drop table if exists t45823; create table t45823 ( i int not null auto_increment, primary key (i), f varchar(16) ) engine = InnoDB partition by hash (i) partitions 2; insert into t45823 (f) values ('Autoinc-1'); insert into t45823 (f) values ('Autoinc-2'); insert into t45823 (i,f) values (-2,'Explicit -2'); insert into t45823 (f) values ('Autoinc-3'); # ERROR 1467 (HY000): Failed to read auto-increment value from storage engine insert into t45823 (f) values ('Autoinc-4'); insert into t45823 (i,f) values (-3,'Explicit -3'); delete from t45823 where i > 1; # ERROR 2013 (HY000): Lost connection to MySQL server during query -------- Reproducible on Linux and Solaris, 32- and 64-bit version (did not check Windows), starting from 5.1.31. No crash on 5.1.30. No crash without partitions. No crash with MyISAM, but ERROR 1032 (HY000): Can't find record in 't45823' While the manual says that 'the behavior of the auto-increment mechanism is not defined if a user assigns a negative value to the column', hopefully there would be a possibility to produce a better outcome than error 2013.
[1 Jul 2009 4:32]
Victor Kirkebo
Also see <a href="/bug.php?id=43988">bug #43988</a> which describes the first part of what is happening in Elena's new testcase. Inserting negative values into the auto_increment field of a partitioned table caused the same results for both MyISAM and InnoDB tables. In the new testcase partitioned InnoDB and MyISAM tables give different errors when the delete command is issued at the end.
[1 Jul 2009 10:27]
MySQL Verification Team
5.1.37-debug died on the insert even: Version: '5.1.37-debug' socket: '' port: 3306 Source distribution Assertion failed: next_insert_id == 0, file .\handler.cc, line 4556 mysqld.exe!my_sigabrt_handler()[mysqld.cc:2014] mysqld.exe!raise()[winsig.c:590] mysqld.exe!abort()[abort.c:71] mysqld.exe!_wassert()[assert.c:212] mysqld.exe!handler::ha_external_lock()[handler.cc:4556] mysqld.exe!ha_partition::external_lock()[ha_partition.cc:2657] mysqld.exe!handler::ha_external_lock()[handler.cc:4562] mysqld.exe!unlock_external()[lock.cc:786] mysqld.exe!mysql_unlock_tables()[lock.cc:391] mysqld.exe!close_thread_tables()[sql_base.cc:1336] mysqld.exe!dispatch_command()[sql_parse.cc:1588] mysqld.exe!do_command()[sql_parse.cc:854] mysqld.exe!handle_one_connection()[sql_connect.cc:1127] mysqld.exe!pthread_start()[my_winthread.c:85] mysqld.exe!_callthreadstart()[thread.c:293] mysqld.exe!_threadstart()[thread.c:277] kernel32.dll!FlsSetValue() t some variables. s may be invalid and cause the dump to abort... t 05E635F8=insert into t45823 (f) values ('Autoinc-4')
[5 Aug 2009 14:25]
Mattias Jonsson
Looks like a duplicate of bug#43988...
[16 Aug 2009 10:07]
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/80858 3070 V Narayanan 2009-08-16 Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Inserting a negative value in the autoincrement column of a partitioned innodb table was causing the value of the auto increment column to wrap around into a very large positive value. This was causing unexpected behaviour. The current patch ensures that before calculating the next auto increment value, the current value is within the positive maximum allowed limit. @ mysql-test/r/partition.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Contains result files for the test case. @ mysql-test/t/partition.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Add tests for inserting negative auto increment values into the partition table. @ sql/field.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a function that returns the upper limits of the mysql integral and floating point types. @ sql/ha_partition.cc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Ensure that the current value is lesser than the upper limit for the type of the field before setting the next auto increment value to be calculated.
[19 Aug 2009 19:59]
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/81107 3074 V Narayanan 2009-08-20 Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Inserting a negative value in the autoincrement column of a partitioned innodb table was causing the value of the auto increment column to wrap around into a very large positive value. This was causing unexpected behaviour. The current patch ensures that before calculating the next auto increment value, the current value is within the positive maximum allowed limit. @ mysql-test/suite/parts/inc/partition_auto_increment.inc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds tests for performing insert,update and delete on a partition table with negative auto_increment values. @ mysql-test/suite/parts/r/partition_auto_increment_archive.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the archive engine. @ mysql-test/suite/parts/r/partition_auto_increment_blackhole.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the blackhole engine. @ mysql-test/suite/parts/r/partition_auto_increment_innodb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the innodb engine. @ mysql-test/suite/parts/r/partition_auto_increment_memory.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the memory engine. @ mysql-test/suite/parts/r/partition_auto_increment_myisam.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the myisam engine. @ mysql-test/suite/parts/r/partition_auto_increment_ndb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the ndb engine. @ sql/field.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a function that returns the upper limits of the mysql integral and floating point types. @ sql/ha_partition.cc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Ensures that the current value is lesser than the upper limit for the type of the field before setting the next auto increment value to be calculated. @ sql/ha_partition.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Modifies the set_auto_increment_if_higher function to accept the upper limit of the auto_increment column and uses it to ensure that the auto_increment value is within limits before incrementing it.
[21 Aug 2009 2: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/81230 3074 V Narayanan 2009-08-21 Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Inserting a negative value in the autoincrement column of a partitioned innodb table was causing the value of the auto increment column to wrap around into a very large positive value. This was causing unexpected behaviour. The current patch ensures that before calculating the next auto increment value, the current value is within the positive maximum allowed limit. @ mysql-test/suite/parts/inc/partition_auto_increment.inc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds tests for performing insert,update and delete on a partition table with negative auto_increment values. @ mysql-test/suite/parts/r/partition_auto_increment_innodb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the innodb engine. @ mysql-test/suite/parts/r/partition_auto_increment_memory.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the memory engine. @ mysql-test/suite/parts/r/partition_auto_increment_myisam.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the myisam engine. @ mysql-test/suite/parts/r/partition_auto_increment_ndb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the ndb engine. @ mysql-test/suite/parts/t/partition_auto_increment_archive.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Archive engine to skip tests that involve insertion of negative auto increment values. @ mysql-test/suite/parts/t/partition_auto_increment_blackhole.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Blackhole engine to skip tests that involve insertion of negative auto increment values. @ sql/field.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a function that returns the upper limits of the mysql integral and floating point types. @ sql/ha_partition.cc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Ensures that the current value is lesser than the upper limit for the type of the field before setting the next auto increment value to be calculated. @ sql/ha_partition.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Modifies the set_auto_increment_if_higher function, to use the upper limit of the auto_increment column, to ensure that the auto_increment value is within limits before incrementing it.
[21 Aug 2009 8:41]
Mattias Jonsson
OK to push, just some minor comments for the test case.
[21 Aug 2009 12:06]
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/81280 3074 V Narayanan 2009-08-21 Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Inserting a negative value in the autoincrement column of a partitioned innodb table was causing the value of the auto increment column to wrap around into a very large positive value. This was causing unexpected behaviour. The current patch ensures that before calculating the next auto increment value, the current value is within the positive maximum allowed limit. @ mysql-test/suite/parts/inc/partition_auto_increment.inc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds tests for performing insert,update and delete on a partition table with negative auto_increment values. @ mysql-test/suite/parts/r/partition_auto_increment_innodb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the innodb engine. @ mysql-test/suite/parts/r/partition_auto_increment_memory.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the memory engine. @ mysql-test/suite/parts/r/partition_auto_increment_myisam.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the myisam engine. @ mysql-test/suite/parts/r/partition_auto_increment_ndb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the ndb engine. @ mysql-test/suite/parts/t/partition_auto_increment_archive.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Archive engine to skip tests that involve insertion of negative auto increment values. @ mysql-test/suite/parts/t/partition_auto_increment_blackhole.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Blackhole engine to skip tests that involve insertion of negative auto increment values. @ sql/field.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a function that returns the upper limits of the mysql integral and floating point types. @ sql/ha_partition.cc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Ensures that the current value is lesser than the upper limit for the type of the field before setting the next auto increment value to be calculated. @ sql/ha_partition.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Modifies the set_auto_increment_if_higher function, to use the upper limit of the auto_increment column, to ensure that the auto_increment value is within limits before incrementing it.
[1 Sep 2009 12:03]
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/82112 3094 V Narayanan 2009-09-01 Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Inserting a negative value in the autoincrement column of a partitioned innodb table was causing the value of the auto increment counter to wrap around into a very large positive value. The consequences are the same as if a very large positive value was inserted into a column, e.g. reduced autoincrement range, failure to read autoincrement counter. The current patch ensures that before calculating the next auto increment value, the current value is within the positive maximum allowed limit. @ mysql-test/suite/parts/inc/partition_auto_increment.inc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds tests for performing insert,update and delete on a partition table with negative auto_increment values. @ mysql-test/suite/parts/r/partition_auto_increment_innodb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the innodb engine. @ mysql-test/suite/parts/r/partition_auto_increment_memory.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the memory engine. @ mysql-test/suite/parts/r/partition_auto_increment_myisam.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the myisam engine. @ mysql-test/suite/parts/r/partition_auto_increment_ndb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the ndb engine. @ mysql-test/suite/parts/t/partition_auto_increment_archive.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Archive engine to skip tests that involve insertion of negative auto increment values. @ mysql-test/suite/parts/t/partition_auto_increment_blackhole.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Blackhole engine to skip tests that involve insertion of negative auto increment values. @ sql/ha_partition.cc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Ensures that the current value is lesser than the upper limit for the type of the field before setting the next auto increment value to be calculated. @ sql/ha_partition.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Modifies the set_auto_increment_if_higher function, to take into account negative auto increment values when doing a comparison.
[4 Sep 2009 3:57]
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/82392 3108 V Narayanan 2009-09-04 Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Inserting a negative value in the autoincrement column of a partitioned innodb table was causing the value of the auto increment counter to wrap around into a very large positive value. The consequences are the same as if a very large positive value was inserted into a column, e.g. reduced autoincrement range, failure to read autoincrement counter. The current patch ensures that before calculating the next auto increment value, the current value is within the positive maximum allowed limit. @ mysql-test/suite/parts/inc/partition_auto_increment.inc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds tests for performing insert,update and delete on a partition table with negative auto_increment values. @ mysql-test/suite/parts/r/partition_auto_increment_innodb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the innodb engine. @ mysql-test/suite/parts/r/partition_auto_increment_memory.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the memory engine. @ mysql-test/suite/parts/r/partition_auto_increment_myisam.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the myisam engine. @ mysql-test/suite/parts/r/partition_auto_increment_ndb.result Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the ndb engine. @ mysql-test/suite/parts/t/partition_auto_increment_archive.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Archive engine to skip tests that involve insertion of negative auto increment values. @ mysql-test/suite/parts/t/partition_auto_increment_blackhole.test Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Blackhole engine to skip tests that involve insertion of negative auto increment values. @ sql/ha_partition.cc Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Ensures that the current value is lesser than the upper limit for the type of the field before setting the next auto increment value to be calculated. @ sql/ha_partition.h Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Modifies the set_auto_increment_if_higher function, to take into account negative auto increment values when doing a comparison.
[14 Sep 2009 16:03]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (version source revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (merge vers: 5.4.4-alpha) (pib:11)
[16 Sep 2009 8:14]
Jon Stephens
Documented bugfix in the 5.4.4 changelog as follows: Inserting negative values into an AUTO_INCREMENT column of a partitioned table could lead to apparently unrelated errors or a crash of the server. Set status to NDI, waiting for push to 5.1 tree.
[2 Oct 2009 0:19]
Paul DuBois
Moved 5.4 changelog entry from 5.4.4 to 5.4.3.
[6 Oct 2009 8:59]
Bugs System
Pushed into 5.1.40 (revid:joro@sun.com-20091006073316-lea2cpijh9r6on7c) (version source revid:mikael@mysql.com-20090907102257-fflwgm6rp5m5kmfw) (merge vers: 5.1.39) (pib:11)
[6 Oct 2009 9:21]
Jon Stephens
Also documented fix in the 5.1.40 changelog. Closed.
[18 Dec 2009 10:34]
Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:50]
Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 11:05]
Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:19]
Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)
[19 Dec 2009 10:47]
Jon Stephens
No additional changelog entries needed. Closed.