Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.2(EOL)
-
None
Description
Required code currently on bb-10.2-jan (please wait for email about status):
main.multi_update_innodb 'xtradb' [ fail ]
|
Test ended at 2016-08-12 08:38:53
|
|
CURRENT_TEST: main.multi_update_innodb
|
mysqltest: At line 19: query 'UPDATE t1 AS A, t1 AS B SET A.pk = 1, B.a = 2' failed with wrong errno 1032: 'Can't find record in 't1'', instead of 1706...
|
|
The result from queries just before the failure was:
|
#
|
# BUG#57373: Multi update+InnoDB reports ER_KEY_NOT_FOUND if a
|
# table is updated twice
|
#
|
CREATE TABLE t1(
|
pk INT,
|
a INT,
|
b INT,
|
PRIMARY KEY (pk)
|
) ENGINE=InnoDB;
|
INSERT INTO t1 VALUES (0,0,0);
|
UPDATE t1 AS A, t1 AS B SET A.pk = 1, B.a = 2;
|
Attachments
Issue Links
- is part of
-
MDEV-10024 Fix test failures on InnoDB 5.7 in MariaDB 10.2
-
- Closed
-
Ok the test file says it expects the statement to fail with an error
INSERT INTO t1 VALUES (0,0,0);
--error ER_MULTI_UPDATE_KEY_CONFLICT
UPDATE t1 AS A, t1 AS B SET A.pk = 1, B.a = 2;
SELECT * FROM t1;
It just must be a different error.
ER_MULTI_UPDATE_KEY_CONFLICT is produced in unsafe_key_update(), but it doesn't produce the error in the tree.
The reason is simple. Stopping at this line
bool primkey_clustered= (table1->file->primary_key_is_clustered() &&
table1->s->primary_key != MAX_KEY);
I have:
(gdb) p table1->file->primary_key_is_clustered()
$10 = false
(gdb) p table1->s->primary_key
$12 = 0
$10 should be TRUE, not FALSE.