1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-28 13:01:41 +03:00
Mattias Jonsson 1f77c7b49a Bug#50392: insert_id is not reset for partitioned tables
auto_increment on duplicate entry

The bug was that when INSERT_ID was used and the storage
engine was told to release any reserved but not used
auto_increment values, it set the highest auto_increment
value to INSERT_ID.

The fix was to check if the auto_increment value was forced
by user (INSERT_ID) or by slave-thread, i.e. not auto-
generated. So that it is only allowed to release generated
values.

mysql-test/r/partition_error.result:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  updated result
mysql-test/suite/parts/inc/partition_auto_increment.inc:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added test
mysql-test/suite/parts/r/partition_auto_increment_archive.result:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added result, note that archive does only allow increasing
  auto_increment values
mysql-test/suite/parts/r/partition_auto_increment_blackhole.result:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added result, note that blackhole accepts all inserts :)
mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added result, note that innodb rolls back inserts on error,
  but keeps the auto_increment value.
mysql-test/suite/parts/r/partition_auto_increment_memory.result:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added result, note that memory and myisam inserts all rows
  before the error.
mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added result, note that memory and myisam inserts all rows
  before the error.
mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added result, note that NDB does not seem to handle
  INSERT_ID as other engines. (Martin will look into it).
mysql-test/t/partition_error.test:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  Added test
sql/ha_partition.cc:
  Bug#50392: insert_id is not reset for partitioned tables
  auto_increment on duplicate entry
  
  If the next_insert_id comes from non generated (i.e
  forced by INSERT_ID or slave-thread) then we cannot
  lower the reserved auto_increment value, since it have
  not reserved any values.
2010-03-04 18:16:10 +01:00
..
2009-02-10 16:27:35 +03:00
2009-08-20 14:30:59 +02:00
2010-02-25 23:13:11 +04:00
2009-06-25 13:44:50 +05:00
2009-08-10 15:46:20 -03:00
2010-02-25 17:12:15 +02:00
2009-06-01 16:00:38 +04:00
2010-02-19 19:06:47 +00:00
2009-03-27 10:18:06 +08:00
2008-09-05 13:36:02 +05:00
2009-02-07 16:50:31 +01:00
2009-10-23 23:37:57 +05:00
2009-12-11 16:02:47 +02:00
2009-10-27 14:09:36 +04:00
2009-02-03 14:45:17 +01:00
2009-05-06 15:00:14 +05:30
2009-06-15 17:36:51 +03:00
2009-02-10 16:27:35 +03:00
2010-02-26 13:02:57 +04:00
2009-09-02 18:58:17 +02:00
2009-04-09 14:38:50 +05:00
2009-03-16 20:54:50 +01:00
2008-10-23 21:27:09 +02:00
2009-12-17 12:06:36 -08:00
2009-02-19 18:22:28 +01:00
2009-11-06 17:54:19 +03:00
2010-01-29 16:54:27 +02:00
2009-12-10 17:38:01 +02:00
2009-02-03 14:45:17 +01:00
2008-07-03 23:41:22 +04:00
2009-10-27 14:09:36 +04:00
2009-12-26 15:25:56 +04:00
2009-02-19 17:59:00 +04:00
2009-11-27 18:10:28 +02:00
2009-06-10 11:58:36 +03:00
2009-09-28 16:48:40 +03:00
2008-07-07 11:43:56 +03:00
2008-12-13 19:42:12 +00:00
2009-02-09 22:00:15 +01:00
2009-02-19 18:24:25 -05:00
2010-02-22 16:58:56 +00:00
2009-01-13 15:04:28 +01:00
2009-02-14 20:14:10 +03:00
2009-05-15 12:42:57 +04:00
2009-12-22 14:38:33 +04:00