You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The full example is below, if I remove the write lock on table then the values won't be inserted partially.
In each case the error is presented but in MyRocks with write lock it actually passes partially.
InnoDB:
mysql> create TABLE t1 (a int not null, b int not null, primary key(b));
Query OK, 0 rows affected (0.32 sec)
mysql> LOCK TABLE t1 WRITE;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (1,'a'), (2,'b');
ERROR 1062 (23000): Duplicate entry '0' for key 'PRIMARY'
mysql> select * FROM t1;
Empty set (0.00 sec)
MyRocks:
mysql> create TABLE t1 (a int not null, b int not null, primary key(b));
Query OK, 0 rows affected (0.13 sec)
mysql> LOCK TABLE t1 WRITE;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (1,'a'), (2,'b');
ERROR 1062 (23000): Duplicate entry '0' for key 'PRIMARY'
mysql> select * FROM t1;
+---+---+
| a | b |
+---+---+
| 1 | 0 |
+---+---+
1 row in set (0.00 sec)
MyRocks without the write lock:
mysql> create TABLE t1 (a int not null, b int not null, primary key(b));
Query OK, 0 rows affected (0.12 sec)
mysql> INSERT INTO t1 VALUES (1,'a'), (2,'b');
ERROR 1062 (23000): Duplicate entry '0' for key 'PRIMARY'
mysql> select * FROM t1;
Empty set (0.00 sec)
The full example is below, if I remove the write lock on table then the values won't be inserted partially.
In each case the error is presented but in MyRocks with write lock it actually passes partially.
InnoDB:
MyRocks:
MyRocks without the write lock: