[MDEV-5972] MySQL BUG#11766576 - 59715: UPDATE IGNORE, 1 ROW AFFECTED Created: 2014-03-28  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.9
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Minor
Reporter: Sergey Vojtovich Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-4784 merge test cases from 5.6 Stalled

 Description   

Test case for MySQL "BUG#11766576 - 59715: UPDATE IGNORE, 1 ROW AFFECTED" fails in 10.0:

--echo #
--echo # BUG #11766576 - 59715: UPDATE IGNORE, 1 ROW AFFECTED
--echo #
 
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
--enable_warnings
 
CREATE TABLE t1 (id INT PRIMARY KEY);
INSERT INTO t1 VALUES (1), (2);
 
--enable_info
UPDATE IGNORE t1, (SELECT 1 AS duplicate_id) AS t2 SET t1.id=t2.duplicate_id;
--disable_info
 
--echo # Check that no rows changed.
SELECT * FROM t1;
DROP TABLE t1;

Relevant revision:

revno: 3402.1.251
committer: Raghav Kapoor <raghav.kapoor@oracle.com>
branch nick: mysql-trunk-bug-11766576
timestamp: Tue 2011-12-13 19:40:33 +0530
message:
  BUG#11766576 - 59715: UPDATE IGNORE, 1 ROW AFFECTED
 
  BACKGROUND:
  UPDATE IGNORE returns the wrong number of rows updated when there
  are duplicate key conflicts in the multi table update.
 
  FIX:
  This bug has been fixed by putting a check on updated variable
  in mysql_multi_update::do_update function so that count is not
  updated when duplicate key conflicts occur (and the corresponding
  rows are not updated).


Generated at Thu Feb 08 07:08:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.