MS Bug 83435 behaves differently on PS
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.6 |
New
|
Undecided
|
Unassigned | |||
5.7 |
Triaged
|
High
|
Unassigned |
Bug Description
The testcase in http://
DROP DATABASE test;CREATE DATABASE test;USE test;
SET @@session.
CREATE TABLE t1(c1 INT,c2 CHAR)PARTITION BY LINEAR KEY(c1) PARTITIONS 99;
CREATE UNIQUE INDEX i1 ON t1(c1);
insert INTO t1 values(
insert INTO t1 values(
alter table t1 engine=InnoDB;
SELECT * FROM t1 WHERE c1<'1971-01-01 00:00:01' ORDER BY c1 DESC LIMIT 2;
When executed against PS gives this;
mysql> insert INTO t1 values(
ERROR 1062 (23000): Duplicate entry '1099152000' for key 'i1'
mysql> insert INTO t1 values(
ERROR 1062 (23000): Duplicate entry '0' for key 'i1'
mysql> alter table t1 engine=InnoDB;
Query OK, 3 rows affected (10.76 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM t1 WHERE c1<'1971-01-01 00:00:01' ORDER BY c1 DESC LIMIT 2;
+------+------+
| c1 | c2 |
+------+------+
| 0 | 2 |
+------+------+
1 row in set, 4 warnings (0.04 sec)
Which is twice different from MS: the ALTER takes 3+ seconds longer AND the second query gives a completely different result.
TokuDB:
mysql> insert INTO t1 values( unix_timestamp( '2004-10- 31 01:00:00' ),'2004- 10-31 01:00:00' ),(unix_ timestamp( '2004-10- 31 02:00:00' ),'2004- 10-31 02:00:00' ),(unix_ timestamp( '2004-10- 31 02:59:59' ),'2004- 10-31 02:59:59' ),(unix_ timestamp( '2004-10- 31 04:00:00' ),'2004- 10-31 04:00:00' ),(unix_ timestamp( '2004-10- 31 02:59:59' ),'2004- 10-31 02:59:59'); 0,'2004- 01-01 00:00:00' ),(0,'2004- 01-01 01:00:00' ),(0,'2004- 02-01 00:00:00');
ERROR 1062 (23000): Duplicate entry '1099152000' for key 'i1'
mysql> insert INTO t1 values(
ERROR 1062 (23000): Duplicate entry '0' for key 'i1'
mysql> alter table t1 engine=TokuDB;
Query OK, 3 rows affected (21.16 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM t1 WHERE c1<'1971-01-01 00:00:01' ORDER BY c1 DESC LIMIT 2;
+------+------+
| c1 | c2 |
+------+------+
| 0 | 2 |
+------+------+
1 row in set, 4 warnings (0.97 sec)